/* ============================================================
   MODALS — BIOLUGA
   /assets/css/components/modal.css
   ============================================================ */

/* ============================================================
   WHO INTERSTITIAL MODAL — FULL PAGE TAKEOVER (Zone A)
   FORCED CENTERED
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0; /* Shorthand for top:0; right:0; bottom:0; left:0; */
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    margin: 0; /* Remove any default margin */
    box-sizing: border-box;
    /* No backdrop-filter — full takeover */
}

.modal-container {
    max-width: 560px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Prevent any margin/padding pushing it off-center */
    margin: 0 auto;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    text-align: center;
    margin-bottom: 16px;
}

.modal-icon i {
    background: #7B9E87;
    padding: 16px;
    border-radius: 50%;
    display: inline-block;
    color: #FFFFFF;
    font-size: 48px;
}

.modal-headline {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #003366;
    margin-bottom: 16px;
}

.modal-body p {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 16px;
    color: var(--brand-slate, #415A77);
    line-height: 1.7;
    margin-bottom: 16px;
    text-align: center;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   STORE LOCATOR MODAL (Zone C — Coming Soon)
   ============================================================ */
.store-locator-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: none; /* Hidden by default, shown via JS */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    margin: 0;
    box-sizing: border-box;
}

.store-locator-modal-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 27, 18, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.store-locator-modal-container {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    z-index: 1;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
}

.store-locator-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #5C3D2E;
    cursor: pointer;
    transition: var(--transition-fast, all 0.2s ease);
}
.store-locator-modal-close:hover {
    color: #2D1B12;
}

.store-locator-modal-icon {
    margin-bottom: 16px;
}

.store-locator-modal-headline {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 28px;
    font-weight: 600;
    color: #2D1B12;
    margin-bottom: 12px;
}

.store-locator-modal-text {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 15px;
    color: #5C3D2E;
    line-height: 1.6;
    margin-bottom: 16px;
}

.store-locator-modal-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.store-locator-modal-form input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #E0D6C8;
    background: #FDFBF7;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 15px;
}
.store-locator-modal-form input:focus {
    outline: none;
    border-color: #C47B2E;
}
.store-locator-modal-form .btn {
    flex-shrink: 0;
}

.store-locator-modal-retailer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(45, 27, 18, 0.08);
}

/* ============================================================
   RESPONSIVE — Modals
   ============================================================ */
@media (max-width: 768px) {
    .modal-container {
        padding: 32px 24px;
        margin: 16px;
    }
    .modal-headline {
        font-size: 22px;
    }
    .modal-body p {
        font-size: 15px;
    }

    .store-locator-modal-container {
        padding: 32px 24px;
        margin: 16px;
    }
    .store-locator-modal-headline {
        font-size: 22px;
    }
    .store-locator-modal-form {
        flex-direction: column;
    }
    .store-locator-modal-form input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-container {
        padding: 24px 16px;
        margin: 12px;
    }
    .modal-headline {
        font-size: 20px;
    }
    .modal-body p {
        font-size: 14px;
    }

    .store-locator-modal-container {
        padding: 24px 16px;
        margin: 12px;
    }
    .store-locator-modal-headline {
        font-size: 20px;
    }
    .store-locator-modal-text {
        font-size: 14px;
    }
}