
/* ============================================================
   OVERLAY — full-screen backdrop
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* ============================================================
   MODAL BOX — the card
   ============================================================ */
.modal-box {
    position: relative;
    background: #ffffff;
    padding: 48px 40px 40px;
    border-radius: 48px;
    max-width: 420px;
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18),
                0 0 0 1px rgba(255, 215, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: scale(0.92) translateY(30px);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.45s ease;
}

.modal-overlay.show .modal-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}


/* ============================================================
   CLOSE BUTTON (×) — top-right
   ============================================================ */
.btn-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f1f3f5;
    color: #555;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.35s ease 0.35s,
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s,
                background 0.2s ease,
                color 0.2s ease;
    z-index: 5;
}

.modal-overlay.show .btn-close {
    opacity: 1;
    transform: scale(1);
}

.btn-close:hover {
    background: #e9ecef;
    color: #222;
    transform: scale(1.08) rotate(90deg);
}

.btn-close:active {
    transform: scale(0.92) rotate(90deg);
}

.btn-close:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* ============================================================
   TITLE & TEXT — staggered fade-up
   ============================================================ */
.modal-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: #1a1a2e;
    text-align: center;
    letter-spacing: -0.02em;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(18px);
    transition: transform 0.5s ease 0.08s,
                opacity 0.5s ease 0.08s;
}

.modal-overlay.show .modal-title {
    opacity: 1;
    transform: translateY(0);
}

.modal-title .wave {
    display: inline-block;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
}

.modal-text {
    font-size: 1rem;
    font-weight: 600;
    color: #5a5a7a;
    text-align: center;
    line-height: 1.6;
    max-width: 300px;
    opacity: 0;
    transform: translateY(18px);
    transition: transform 0.5s ease 0.16s,
                opacity 0.5s ease 0.16s;
}

.modal-overlay.show .modal-text {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BUTTONS CONTAINER
   ============================================================ */
.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(18px);
    transition: transform 0.5s ease 0.24s,
                opacity 0.5s ease 0.24s;
}

.modal-overlay.show .modal-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BUTTONS — shared & variants
   ============================================================ */
.modal-btn {
    padding: 15px 22px;
    border: none;
    border-radius: 60px;
    font-family: "Nunito", sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.modal-btn:hover::after {
    background: rgba(255, 255, 255, 0.18);
}

.modal-btn:active {
    transform: scale(0.96);
}

.modal-btn:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 3px;
}

.btn-register {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.30);
    border: 1px solid rgba(255, 165, 0, 0.20);
}

.btn-register:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 28px rgba(255, 165, 0, 0.40);
    background: linear-gradient(135deg, #FFC400, #FF8C00);
}

.btn-register .icon {
    font-size: 1.2rem;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #1DA851);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
    border: 1px solid rgba(37, 211, 102, 0.15);
}

.btn-whatsapp:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.35);
    background: linear-gradient(135deg, #20C857, #189742);
}

.btn-whatsapp .icon {
    font-size: 1.2rem;
}

.modal-skip {
    font-size: 0.8rem;
    font-weight: 700;
    color: #9a9ab0;
    text-decoration: none;
    margin-top: 4px;
    padding: 6px 12px;
    border-radius: 30px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: "Nunito", sans-serif;
}

.modal-skip:hover {
    color: #5a5a7a;
    background: rgba(0, 0, 0, 0.04);
}

.modal-skip:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* ============================================================
   FOOTER / CANCEL CHIP
   ============================================================ */
.modal-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: transform 0.5s ease 0.40s,
                opacity 0.5s ease 0.40s;
}

.modal-overlay.show .modal-footer {
    opacity: 1;
    transform: translateY(0);
}

.btn-cancel-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    border-radius: 60px;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: rgba(255, 255, 255, 0.85);
    font-family: "Nunito", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
}

.btn-cancel-chip:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.04);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-cancel-chip:active {
    transform: scale(0.94);
}

.btn-cancel-chip .icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-cancel-chip:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .modal-box {
        padding: 36px 22px 30px;
        border-radius: 36px;
        width: 94%;
        gap: 14px;
    }
    .modal-title {
        font-size: 1.45rem;
    }
    .modal-text {
        font-size: 0.9rem;
        max-width: 260px;
    }
    .modal-btn {
        font-size: 0.85rem;
        padding: 14px 18px;
    }
    .btn-close {
        top: 12px;
        right: 14px;
        width: 34px;
        height: 34px;
        font-size: 17px;
    }
    .modal-footer {
        margin-top: 12px;
    }
    .btn-cancel-chip {
        font-size: 0.7rem;
        padding: 6px 16px;
    }
}

@media (max-width: 380px) {
    .modal-box {
        padding: 28px 16px 24px;
        border-radius: 28px;
    }
    .modal-title {
        font-size: 1.2rem;
    }
    .modal-text {
        font-size: 0.8rem;
    }
}

/* ============================================================
   UTILITY — screen reader only
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}