/**
 * Popup Styles - Casa Armando
 * 
 * Estilos para popups/anuncios emergentes
 * Diseño responsive y moderno acorde al restaurante
 */

/* Backdrop (fondo oscuro) */
.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-backdrop.active {
    opacity: 1;
}

/* Modal Container */
.popup-modal {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.popup-modal.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Botón Cerrar */
.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.popup-close .material-icons {
    color: #991b1b;
    font-size: 24px;
}

/* Contenido */
.popup-content {
    display: flex;
    flex-direction: column;
}

/* Imagen */
.popup-image {
    width: 100%;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Cuerpo del popup */
.popup-body {
    padding: 2rem;
}

.popup-modal.popup-with-image .popup-body {
    padding: 1.5rem 2rem 2rem;
}

/* Título */
.popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #991b1b;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

/* Texto */
.popup-text {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 1.5rem 0;
}

/* Call to Action Button */
.popup-cta {
    display: inline-block;
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
    color: white;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(153, 27, 27, 0.3);
}

.popup-cta:hover {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(153, 27, 27, 0.4);
}

/* Responsive */
@media (max-width: 640px) {
    .popup-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
        max-height: 95vh;
    }

    .popup-image img {
        max-height: 250px;
    }

    .popup-body {
        padding: 1.5rem;
    }

    .popup-title {
        font-size: 1.5rem;
    }

    .popup-text {
        font-size: 0.9375rem;
    }

    .popup-close {
        width: 36px;
        height: 36px;
        top: 0.75rem;
        right: 0.75rem;
    }

    .popup-close .material-icons {
        font-size: 20px;
    }
}

/* Animación de entrada suave */
@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Scrollbar personalizado para el modal */
.popup-modal::-webkit-scrollbar {
    width: 8px;
}

.popup-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 16px 16px 0;
}

.popup-modal::-webkit-scrollbar-thumb {
    background: #991b1b;
    border-radius: 4px;
}

.popup-modal::-webkit-scrollbar-thumb:hover {
    background: #7f1d1d;
}

/* Prevenir scroll del body cuando el popup está abierto */
body.popup-open {
    overflow: hidden;
}