/* 
 * Estilos para la funcionalidad "Ver detalles"
 * Este archivo contiene todos los estilos relacionados con el panel de detalles
 * y los modales de búsqueda que se muestran al usar la funcionalidad "Ver detalles"
 */

/* Estilos para el contenedor principal de detalles */
.details-container {
    padding: 25px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Estilos para las secciones de detalles */
.details-section {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.details-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Estilos para los encabezados */
.details-container h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 600;
}

.details-container h3 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 18px;
    font-size: 1.4em;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.details-container h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 20px;
    background-color: #3498db;
    margin-right: 10px;
    border-radius: 3px;
}

/* Estilos para las tablas */
.details-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Estilos para los filtros de tabla */
.table-filter {
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.filter-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s;
}

.filter-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85em;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.results-counter {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 5px;
    margin-bottom: 10px;
    font-style: italic;
}

.details-table th, 
.details-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.details-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-table tr:last-child td {
    border-bottom: none;
}

.details-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Estilos para las estadísticas generales */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos para los botones de acción */
.action-button {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.9em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-button:hover {
    background-color: #ebf5fb;
    color: #2980b9;
}

.action-buttons {
    display: inline-block;
    margin-left: 10px;
}

/* Estilos para la cuadrícula de columnas */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Estilos para las tarjetas de columnas */
.column-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.column-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.column-card-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
}

.column-card-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-card-body {
    padding: 20px;
    text-align: center;
}

.column-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.column-stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.column-stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.column-card-footer {
    padding: 15px;
    border-top: 1px solid #eaeaea;
    text-align: center;
}

.column-button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.column-button:hover {
    background-color: #2980b9;
}

/* Estilos para las etiquetas de columnas (mantenemos para la sección de coincidencias) */
.columns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.column-tag {
    display: inline-block;
    background-color: #ebf5fb;
    border: 1px solid #d6eaf8;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85em;
    color: #2980b9;
    transition: all 0.2s;
}

.column-tag:hover {
    background-color: #d6eaf8;
    color: #2471a3;
}

/* Estilos para el modal de búsqueda */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.search-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    width: 80%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border-top: 5px solid #3498db;
}

.wide-modal {
    max-width: 95%;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #95a5a6;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    color: #2c3e50;
}

.search-category {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-category h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.search-category h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #3498db;
    margin-right: 10px;
    border-radius: 2px;
}

.search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-options button {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-options button:hover {
    background-color: #ebf5fb;
    border-color: #3498db;
    color: #2980b9;
}

.column-values-container {
    max-height: 65vh;
    overflow-y: auto;
    padding: 10px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

/* Estilos para modo oscuro */
body.dark-mode .details-container {
    background-color: #1a202c;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.dark-mode .details-section {
    border-bottom: 1px solid #2d3748;
}

body.dark-mode .details-container h2 {
    color: #90cdf4;
    border-bottom: 2px solid #4299e1;
}

body.dark-mode .details-container h3 {
    color: #a0aec0;
}

body.dark-mode .details-container h3::before {
    background-color: #4299e1;
}

body.dark-mode .details-table {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark-mode .details-table th, 
body.dark-mode .details-table td {
    border-bottom: 1px solid #2d3748;
}

body.dark-mode .details-table th {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* Estilos para los filtros en modo oscuro */
body.dark-mode .filter-input,
body.dark-mode .filter-select {
    background-color: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .filter-input:focus,
body.dark-mode .filter-select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.3);
}

body.dark-mode .results-counter {
    color: #a0aec0;
}

body.dark-mode .details-table tbody tr:hover {
    background-color: #2d3748;
}

body.dark-mode .stat-card {
    background-color: #2d3748;
}

body.dark-mode .stat-value {
    color: #4299e1;
}

body.dark-mode .stat-label {
    color: #a0aec0;
}

body.dark-mode .action-button {
    color: #4299e1;
}

body.dark-mode .action-button:hover {
    background-color: #2d3748;
    color: #90cdf4;
}

body.dark-mode .column-card {
    background-color: #1a202c;
    border: 1px solid #2d3748;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark-mode .column-card-header {
    background-color: #2d3748;
    border-bottom: 1px solid #4a5568;
}

body.dark-mode .column-card-header h4 {
    color: #e2e8f0;
}

body.dark-mode .column-stat-value {
    color: #4299e1;
}

body.dark-mode .column-stat-label {
    color: #a0aec0;
}

body.dark-mode .column-card-footer {
    border-top: 1px solid #2d3748;
}

body.dark-mode .column-button {
    background-color: #4299e1;
}

body.dark-mode .column-button:hover {
    background-color: #2b6cb0;
}

body.dark-mode .column-tag {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    color: #90cdf4;
}

body.dark-mode .column-tag:hover {
    background-color: #4a5568;
    color: #bee3f8;
}

body.dark-mode .search-modal-content {
    background-color: #1a202c;
    color: #e2e8f0;
    border-top: 5px solid #4299e1;
}

body.dark-mode .close-modal {
    color: #a0aec0;
}

body.dark-mode .close-modal:hover {
    color: #e2e8f0;
}

body.dark-mode .search-category {
    background-color: #2d3748;
}

body.dark-mode .search-category h4 {
    color: #e2e8f0;
}

body.dark-mode .search-category h4::before {
    background-color: #4299e1;
}

body.dark-mode .search-options button {
    background-color: #1a202c;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

body.dark-mode .search-options button:hover {
    background-color: #4a5568;
    border-color: #90cdf4;
    color: #bee3f8;
}

body.dark-mode .column-values-container {
    background-color: #2d3748;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}
