/* Frontend Modal Styling - LaCostaDev */

/* Control de desplazamiento de la página cuando el modal está activo */
body.lcd-modal-active {
    overflow: hidden;
}

/* Overlay (Fondo oscuro) */
.lcd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate 900 con opacidad */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    padding: 20px;
    font-family: inherit; /* Hereda tipografía de la web */
}

/* Efecto Blur */
.lcd-overlay-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lcd-modal-overlay.lcd-show {
    opacity: 1;
}

/* Contenedor del Modal */
.lcd-modal-container {
    background-color: var(--lcd-modal-bg, #ffffff);
    color: var(--lcd-modal-text, #1e293b);
    width: 100%;
    max-width: 550px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: inherit; /* Hereda tipografía de la web */
}

.lcd-modal-overlay.lcd-show .lcd-modal-container {
    transform: scale(1);
    opacity: 1;
}

/* Botón Icono Cerrar (Esquina Superior Derecha) */
.lcd-modal-close-icon {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--lcd-modal-text, #1e293b);
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.lcd-modal-close-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lcd-modal-close-icon:focus {
    outline: 2px solid var(--lcd-modal-btn-bg, #0f172a);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Contenido Interno */
.lcd-modal-content {
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    font-family: inherit; /* Hereda tipografía de la web */
}

/* Título */
.lcd-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.25;
    padding-right: 24px; /* Evitar solapamiento con el icono de cierre */
    color: inherit;
    font-family: inherit; /* Hereda tipografía de la web */
}

/* Cuerpo / Mensaje */
.lcd-modal-body {
    font-size: 16px;
    line-height: 1.6;
    color: inherit;
    margin-bottom: 24px;
    flex-grow: 1;
    font-family: inherit; /* Hereda tipografía de la web */
}

.lcd-modal-body p {
    margin-top: 0;
    margin-bottom: 12px;
    color: inherit;
}

.lcd-modal-body p:last-child {
    margin-bottom: 0;
}

.lcd-modal-body a {
    color: var(--lcd-modal-btn-bg, #0f172a);
    text-decoration: underline;
    font-weight: 600;
}

.lcd-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* Pie del Modal */
.lcd-modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    box-sizing: border-box;
    font-family: inherit; /* Hereda tipografía de la web */
}

/* Botón de Cierre Principal */
.lcd-modal-close-btn {
    background-color: var(--lcd-modal-btn-bg, #0f172a);
    color: var(--lcd-modal-btn-text, #ffffff);
    border: none;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: inherit; /* Hereda tipografía de la web */
}

.lcd-modal-close-btn:hover {
    opacity: 0.95;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.lcd-modal-close-btn:active {
    transform: scale(0.98);
}

.lcd-modal-close-btn:focus {
    outline: 2px solid var(--lcd-modal-btn-bg, #0f172a);
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .lcd-modal-overlay {
        padding: 15px;
    }
    .lcd-modal-container {
        border-radius: 16px;
    }
    .lcd-modal-content {
        padding: 30px 24px;
    }
    .lcd-modal-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .lcd-modal-body {
        font-size: 15px;
        margin-bottom: 20px;
    }
    .lcd-modal-close-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    .lcd-modal-close-icon {
        top: 12px;
        right: 16px;
        font-size: 28px;
    }
}
