/* Tornado modal standard — viewport-centered, outside desktop-scale-root */
#tornado-modal-portal {
    position: relative;
    z-index: 100000;
}

#tornado-modal-portal:empty {
    display: none;
}

body.tornado-modal-open {
    overflow: hidden;
}

.tornado-modal-overlay,
.notif-detail-modal,
.recent-hub__modal,
.quote-response-modal,
.support-lightbox,
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.tornado-modal-overlay.is-open,
.notif-detail-modal.is-open,
.recent-hub__modal:not([hidden]),
.quote-response-modal.is-open,
.support-lightbox:not([hidden]),
.product-modal.is-active {
    display: flex;
}

.tornado-modal-panel,
.notif-detail-modal__card,
.recent-hub__modal-panel,
.quote-response-modal__card,
.support-lightbox__dialog,
.product-modal-content,
.swal-tornado-panel {
    position: relative;
    z-index: 1;
    width: min(100%, var(--tornado-modal-width, 520px));
    max-height: min(88dvh, 760px);
    overflow: auto;
    margin: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

.recent-hub__modal-backdrop,
.support-lightbox__backdrop,
.tornado-modal-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.support-lightbox__dialog {
    width: min(920px, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    display: grid;
    gap: 0.65rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

.support-lightbox__image {
    width: 100%;
    max-height: calc(100dvh - 8rem);
    object-fit: contain;
    border-radius: 14px;
    background: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.swal-tornado-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.swal-tornado-panel {
    width: min(100%, var(--swal-width, 420px));
}

.swal-tornado-panel--wide {
    --swal-width: 650px;
}

.swal-tornado-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #eef2f7;
}

.swal-tornado-head__copy {
    flex: 1;
    min-width: 0;
}

.swal-tornado-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.25;
    color: #0f172a;
}

.swal-tornado-text {
    margin: 4px 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
    font-weight: 600;
}

.swal-tornado-body {
    padding: 16px 18px 18px;
}

.swal-tornado-body--html-only {
    padding-top: 18px;
}

.swal-tornado-close {
    border: 0;
    background: #f8fafc;
    color: #0f172a;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.swal-tornado-close--floating {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.swal-tornado-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.swal-tornado-icon--success { background: #f0fdf4; color: #16a34a; }
.swal-tornado-icon--error { background: #fef2f2; color: #dc2626; }
.swal-tornado-icon--warning { background: #fffbeb; color: #d97706; }
.swal-tornado-icon--info { background: #eff6ff; color: #2563eb; }

.swal-tornado-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 18px 18px;
}

.swal-tornado-btn {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.swal-tornado-btn--cancel {
    border: 1px solid #dbeafe;
    background: #fff;
    color: #334155;
}

.swal-tornado-btn--confirm {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.swal-tornado-validation {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .tornado-modal-overlay,
    .notif-detail-modal,
    .recent-hub__modal,
    .quote-response-modal,
    .support-lightbox,
    .product-modal,
    .swal-tornado-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}
