/* =========================
   MODAL BASE
========================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    position: relative;
    animation: modalFade .3s ease;
}

@keyframes modalFade {
    from {
        opacity: 0;
        transform: scale(.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================
   BOTÓN CERRAR
========================= */

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: #000;
}

/* =========================
   AVISO LEGAL
========================= */

.modal-warning {
    background: #fff3cd;
    border-left: 4px solid #f1c40f;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* =========================
   FORMULARIO
========================= */

.modal-form label {
    display: block;
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 4px;
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
}

.modal-form textarea {
    resize: vertical;
}

.modal-form button {
    margin-top: 15px;
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.modal-form button:hover {
    background: #27ae60;
}

/* =========================
   MODAL REVISIÓN LEGAL
========================= */

.review-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.review-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: modalFade .3s ease;
}

/* =========================
   BARRA PROGRESO
========================= */

.progress-container {
    width: 100%;
    height: 10px;
    background: #e6e6e6;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 15px;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    transition: width linear;
}


/* ===== MODAL RESPONSIVE ===== */
@media (max-width: 600px) {

    .modal-overlay,
    .review-modal-overlay {
        align-items: flex-end; /* 👈 estilo sheet */
        padding: 0;
    }

    .modal-content,
    .review-modal-content {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        padding: 20px 18px;
        animation: modalSlideUp .25s ease-out;
        overflow-y: auto;
    }

    @keyframes modalSlideUp {
        from {
            transform: translateY(20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .modal-close {
        top: 8px;
        right: 12px;
        font-size: 28px;
    }

    .modal-warning {
        font-size: 0.95rem;
        padding: 14px;
    }

    .modal-form label {
        font-size: 1rem;
    }

    .modal-form input,
    .modal-form textarea {
        font-size: 1rem;
        padding: 14px;
    }

    .modal-form button {
        font-size: 1.05rem;
        padding: 14px;
        border-radius: 12px;
    }

    .review-modal-content {
        padding: 22px 18px;
    }

    .progress-container {
        height: 12px;
    }
}
