/* css/tamox-validacion-styles.css */

/* Estilos del Modal Principal */
.tamox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(30, 41, 59, 0.4);
    /* Flexbox para centrar (esto lo activa el JS) */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.tamox-modal-content {
    background-color: #fefefe;
    color: #333;
	margin:auto;
    padding: 25px;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    border-radius: 5px;
    height: auto; /* La altura se ajusta al contenido */
    /*max-height: 90vh; /* Máximo 90% de la altura del viewport */
    /*overflow-y: auto; */
	overflow: visible;
    display: flex;
    flex-direction: column;
	min-height: 0;
}

/* Párrafo específico para el mensaje de error dentro del modal */
.tamox-modal-content p.tamox-error-message-text {
    color: red;
    text-align: center;
    font-weight: bold;
    padding: 20px 0; /* Espacio vertical */
    margin: auto; /* Centra el texto si es el único elemento flex */
}

.tamox-modal-close {
    color: #aaa;
	font-size: 30px;
    font-weight: bold;
    line-height: 1;
	position: absolute; /* Mejor para contenedores flex */
    top: 15px;
    right: 20px;
	z-index: 10;
	
}
.tamox-modal-close:hover,
.tamox-modal-close:focus {
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
}

.tamox-modal-content h2 {
    margin-top: 0;
    color: #1e293b;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
	padding-right: 30px; /* Espacio para el botón de cerrar */
    padding-left: 30px;  /* Espacio equivalente a la izquierda para mantener el centrado visual */
    box-sizing: border-box; /* Buena práctica al usar padding */
}

.tamox-modal-content ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 20px;
}

/*
.tamox-modal-content ul li {
	display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
	align-items: flex-start;
	text-align: center;
}
.tamox-modal-content ul li:last-child {
    border-bottom: none;
}

.tamox-modal-content ul li strong {
    color: #1e293b;
    min-width: 150px;
	width: 150px;
    display: inline-block;
	margin-right: 10px;
	flex-shrink: 0;
	word-break: break-word;    
    overflow-wrap: break-word; 
    hyphens: none;             
    text-align: left;      
    line-height: 1.3; 
}


.tamox-modal-content ul li > *:not(strong) { 
	flex-grow: 1;         
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: none;        
    text-align: left;   
}
*/
/* --- INICIO: CÓDIGO HÍBRIDO RECOMENDADO --- */

/* 1. Definimos la fila con GRID */
.tamox-modal-content ul li {
    display: grid;
    /* La columna de la etiqueta se ajusta a su contenido. El valor toma el resto. */
    grid-template-columns: 1fr 1fr; 
    column-gap: 16px; /* Espacio uniforme entre etiqueta y valor */
    
    /* ¡IMPORTANTE! Usamos tu padding original para no alterar el espaciado vertical */
    padding: 8px 0; 

    border-bottom: 1px solid #eee;
    align-items: start; 
}

.tamox-modal-content ul li:last-child {
    border-bottom: none;
}


/* 2. Definimos la etiqueta (strong) */
.tamox-modal-content ul li strong {
    /* Dejamos que la alineación por defecto (izquierda) funcione dentro de la celda de Grid */
    text-align: right; 
    color: #1e293b;
    line-height: 1.3;

    /* YA NO NECESITAMOS NADA DE ESTO: */
    /* width, min-width, display, margin-right, flex-shrink, etc. */
}

/* 3. Definimos el valor (para consistencia) */
.tamox-modal-content ul li > *:not(strong) {
    text-align: left;
    word-break: break-word;
}
/* --- FIN: CÓDIGO HÍBRIDO RECOMENDADO --- */

/* Estilos para TODOS los botones y botones principales del frontend */
.tamox-modal-button, 
.tamox-search-form-container input[type="submit"], 
#tamoxFormSolicitudDiv .wpcf7-form-control.wpcf7-submit,
.tamox-enlace-nueva-version { /* Se añade .tamox-enlace-nueva-version aquí */
    padding: 10px 20px; 
    color: white !important; 
    background-color: rgb(6, 0, 151) !important; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 1em; 
    font-weight: bold; 
    text-decoration: none !important; 
    display: inline-block; 
    transition: background-color 0.3s ease;
    text-align: center;
    line-height: normal;
}
.tamox-modal-button:hover, 
.tamox-search-form-container input[type="submit"]:hover, 
#tamoxFormSolicitudDiv .wpcf7-form-control.wpcf7-submit:hover,
.tamox-enlace-nueva-version:hover { 
    background-color: rgb(4, 0, 101) !important; 
    color: white !important;
}

/* Botón específico para "Solicitar Descarga" y el submit de CF7 para centrar */
#tamoxAbrirFormSolicitudButton, 
#tamoxFormSolicitudDiv .wpcf7-form-control.wpcf7-submit { 
    display: block; 
    margin: 20px auto 10px auto; 
    min-width: 200px; 
}

/* Botón secundario (Volver a Información) */
.tamox-button-secondary { 
    background-color: #6c757d !important; 
} 
.tamox-button-secondary:hover { 
    background-color: #5a6268 !important; 
}

/* Contenedor para los botones del formulario de solicitud */
#tamoxFormSolicitudDiv .tamox-form-actions { 
    text-align: center; 
    margin-top:15px; 
}

/* Contenido post-modal y formulario de búsqueda principal */
.tamox-post-modal-content { 
    display: none; 
    text-align: center; 
    margin-top: 30px; 
}
.tamox-search-form-container { 
    max-width: 500px; 
    margin-left: auto !important;  /* Forzar margen automático */
    margin-right: auto !important; /* Forzar margen automático */
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px; 
    border: 1px solid #e0e0e0; 
    border-radius: 5px; 
    background-color: #f9f9f9; 
    text-align: center;
    clear: both; /* Por si hay floats afectando su posición */
    box-sizing: border-box; /* Buena práctica */
}
.tamox-search-form-container label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: bold; 
}
.tamox-search-form-container input[type="text"] { 
    width: 100%; 
    max-width: 350px; 
    padding: 10px; 
    margin-bottom: 15px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
}

/* Estilos para el mensaje "En Proceso", "Cancelado" y otros estados */
.tamox-certificado-en-proceso, 
.tamox-certificado-info-general { 
    padding: 15px; 
    margin-top: 10px; 
    border: 1px solid #ffe58f; 
    background-color: #fffbe6; 
    color: #543500; 
    border-radius: 4px; 
    text-align: center; 
}
.tamox-certificado-en-proceso h2, 
.tamox-certificado-info-general h2 { 
    color: #D48806; 
}

.tamox-certificado-info-general.tamox-certificado-cancelado {
    border-left: 5px solid #d63638;
    background-color: #fef7f7;
    border-top: 1px solid #f5c6cb;
    border-right: 1px solid #f5c6cb;
    border-bottom: 1px solid #f5c6cb;
    color: #721c24;
}

.tamox-certificado-cancelado h2 {
    color: #d63638 !important;
}

.tamox-certificado-cancelado p {
    margin-bottom: 12px;
    line-height: 1.6; /* Aplicado también a otros mensajes del modal */
}

.tamox-enlace-nueva-version {
    /* Hereda estilos de .tamox-modal-button a través de la regla combinada */
    margin-top: 15px; 
}

/* Ajustes generales para mensajes dentro del modal */
.tamox-modal-content .tamox-certificado-info-general p,
.tamox-modal-content .tamox-certificado-en-proceso p {
    line-height: 1.6;
}

/* Media Queries para Responsividad */
@media screen and (max-width: 600px) {
    .tamox-modal-content {
        width: 95%;
        margin: 0 auto; /* Centrado por flexbox del padre, no necesita margen % */
        padding: 20px;
        /*max-height: 95vh;*/
    }
    .tamox-search-form-container {
        /* margin: 20px 10px; Si usas esto, no se centrará con auto. */
        /* Mejor mantener margin: auto para centrar si el ancho es menor que el contenedor */
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 15px;
        max-width: 90%; /* Asegura que tenga espacio para centrarse */
        /* width: auto; */ /* Comentado, max-width es más útil para margin:auto */
    }
    #tamoxAbrirFormSolicitudButton,
    #tamoxFormSolicitudDiv .wpcf7-form-control.wpcf7-submit,
    .tamox-search-form-container input[type="submit"],
    .tamox-enlace-nueva-version {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
    .tamox-modal-content h2 {
        font-size: 1.3em;
    }
    .tamox-modal-content ul li {
        font-size: 0.9em;
    }
}