/* ==========================================================================
   AstroModal — Universal modal overlay
   Glassmorphic fullscreen overlay with zodiac decor
   ========================================================================== */

/* --- Overlay --- */
.astro-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #f2e9e4 0%, #fdfaf6 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.astro-modal-overlay.astro-modal--active {
    opacity: 1;
    visibility: visible;
}

/* Body scroll lock */
.astro-modal-open {
    overflow: hidden !important;
}

/* --- Close button --- */
.astro-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 30;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #4a4e69;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.astro-modal__close:hover {
    background-color: rgba(154, 140, 152, 0.1);
}

@media (min-width: 768px) {
    .astro-modal__close {
        top: 4px;
        right: 4px;
    }
}

/* --- Decorative SVG --- */
.astro-modal__decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 450px;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.astro-modal__decor svg {
    width: 120%;
    max-width: none;
    transform: translateY(-40px);
}

@media (min-width: 768px) {
    .astro-modal__decor {
        height: 300px;
    }
}

/* --- Content column --- */
.astro-modal__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0 20px 32px;
    margin: 0 auto;
}

/* Desktop: compact card with margins */
@media (min-width: 768px) {
    .astro-modal__content {
        min-height: 0;
        padding: 50px;
        margin: 50px auto;
    }
}

/* --- Header --- */
.astro-modal__header {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 56px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .astro-modal__header {
        margin-top: 0;
        margin-bottom: 24px;
    }
}

.astro-modal__title {
    color: #22223b;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

.astro-modal__subtitle {
    color: #4a4e69;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

/* --- Glass card --- */
.astro-modal__card {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(154, 140, 152, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

/* --- Footer --- */
.astro-modal__footer {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .astro-modal__footer {
        margin-top: 0;
        padding-top: 24px;
    }
}

.astro-modal__trust-icons {
    display: flex;
    align-items: center;
    gap: 32px;
    color: rgba(212, 175, 55, 0.6);
    font-size: 18px;
}

.astro-modal__trust-text {
    font-size: 10px;
    color: #9a8c98;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    line-height: 2;
    padding: 0 16px;
}

/* --- Slide-up animation --- */
@keyframes astro-modal-slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.astro-modal--active .astro-modal__content {
    animation: astro-modal-slideUp 0.35s ease-out;
}

/* --- Mobile: prevent flex centering overflow --- */
@media (max-width: 767px) {
    .astro-modal-overlay {
        align-items: flex-start;
    }
}

/* --- Responsive (small screens) --- */
@media (max-width: 480px) {
    .astro-modal__content {
        padding: 0 16px 24px;
    }

    .astro-modal__header {
        margin-top: 48px;
        margin-bottom: 24px;
    }

    .astro-modal__title {
        font-size: 24px;
    }
}
