/* Estilos para el shortcode [lista_40] del plugin Historia Los 40 */

.l40-container { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background: #fff; 
    padding: 25px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}
.l40-container *, .l40-container *:before, .l40-container *:after { 
    box-sizing: border-box; 
}
.l40-navegacion { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
}
.l40-container .l40-nav-btn { 
    background-color: #f0f0f0 !important; 
    color: #333 !important; 
    padding: 10px 20px !important; 
    text-decoration: none !important; 
    border-radius: 50px; 
    font-weight: 600; 
    transition: all .2s; 
    border: 1px solid #ddd !important; 
    line-height: 1.5; 
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 4px; /* Espacio entre icono y texto */
}
.l40-container .l40-prev-btn {
    padding-left: 15px !important;
}
.l40-container .l40-next-btn {
    padding-right: 15px !important;
}
.l40-container .l40-prev-btn::before {
    content: '';
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/icons/arrow-left-short.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.l40-container .l40-next-btn::after {
    content: '';
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/icons/arrow-right-short.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.l40-container .l40-nav-btn:hover { 
    background-color: #e0e0e0 !important; 
    color: #000 !important; 
}
.l40-container .l40-disabled { 
    background-color: #f9f9f9 !important; 
    color: #aaa !important; 
    cursor: not-allowed; 
}
.l40-container #l40-datepicker { 
    padding: 10px 15px 10px 35px;
    border: 1px solid #ddd; 
    border-radius: 50px; 
    cursor: pointer; 
    text-align: center; 
    font-weight: 600; 
    background-position: left 12px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/icons/calendar-event.svg') !important;
}
.l40-header { 
    text-align: center; 
    margin-bottom: 25px; 
}
.l40-list-title { 
    font-size: 2.2em; 
    font-weight: 700; 
    margin: 0; 
    color: #111; 
}
.l40-title-separator { 
    font-weight: 300; 
    color: #999; 
}
.l40-table { 
    width: 100%; 
    border-collapse: collapse; 
}
.l40-table th { 
    padding: 12px 15px; 
    background-color: #f9f9f9 !important; 
    color: #666; 
    text-transform: uppercase; 
    font-size: 0.8em; 
    letter-spacing: 0.5px; 
    text-align: left; 
}
.l40-table td { 
    padding: 15px !important; 
    border-bottom: 1px solid #f0f0f0; 
    vertical-align: middle !important; 
}
.l40-table tbody tr:hover { 
    background-color: #f9f9f9 !important; 
}
.l40-center { 
    text-align: center; 
}
.l40-posicion { 
    font-size: 1.4em; 
    font-weight: 700; 
    color: #333; 
}
.l40-play-col { 
    width: 40px; 
}
.l40-play-btn { 
    background: transparent !important; 
    border: none !important; 
    cursor: pointer !important; 
    font-size: 1.2em !important; 
    padding: 5px !important; 
    width: 32px !important; 
    height: 32px !important; 
    border-radius: 50%; 
    line-height: 1; 
    transition: background-color .2s; 
    color: #333 !important; 
}
.l40-play-btn:hover { 
    background-color: #f0f0f0 !important; 
}
.l40-caratula { 
    border-radius: 4px; 
    display: block; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}
.l40-cancion-artista { 
    display: flex; 
    flex-direction: column; 
}
.l40-titulo-cancion { 
    font-weight: 600; 
    color: #111 !important; 
    text-decoration: none !important; 
    margin-bottom: 3px; 
}
.l40-titulo-cancion:hover { 
    text-decoration: underline !important; 
}
.l40-nombre-artista a { 
    color: #555 !important; 
    text-decoration: none !important; 
}
.l40-nombre-artista a:hover { 
    text-decoration: underline !important; 
}
.l40-external-links a { 
    display: inline-block !important; 
    width: 24px !important; 
    height: 24px !important; 
    margin: 0 5px !important; 
    background-size: contain !important; 
    background-repeat: no-repeat !important; 
    background-position: center;
    text-indent: -9999px; 
    vertical-align: middle; 
    transition: transform .2s; 
    background-color: transparent !important; 
}
.l40-external-links a:hover { 
    transform: scale(1.1); 
}
.l40-spotify-link {
    background-image: url('https://www.vectorlogo.zone/logos/spotify/spotify-icon.svg') !important;
}
.l40-youtube-link {
    background-image: url('https://www.vectorlogo.zone/logos/youtube/youtube-icon.svg') !important;
}

/* Estilos específicos para la tabla de Números Uno */
#l40-numeros-uno-app .l40-table th.l40-center,
#l40-numeros-uno-app .l40-table td.l40-center {
    text-align: center;
    vertical-align: middle;
}
#l40-numeros-uno-app .l40-table .l40-caratula-col {
    width: 80px;
}
.l40-timeline-container {
    position: relative;
    padding: 20px 0;
}
.l40-timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: #f1f1f1;
    border-radius: 2px;
}
.l40-timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    box-sizing: border-box;
}
.l40-timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 12px;
    background-color: white;
    border: 4px solid #1DB954; /* Verde Spotify */
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.l40-timeline-item.type-debut::after { border-color: #3498db; } /* Azul para Debut */
.l40-timeline-item.type-peak::after { border-color: #f1c40f; } /* Amarillo para Mejor Posición */
.l40-timeline-item.type-number_one::after { border-color: #e74c3c; } /* Rojo para Número 1 */

.l40-timeline-content {
    padding: 15px 20px;
    background-color: white;
    position: relative;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-left: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
}
.l40-timeline-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
}
.l40-timeline-content h3 a {
    text-decoration: none;
    color: #333;
}
.l40-timeline-content h3 a:hover {
    text-decoration: underline;
}
.l40-timeline-date {
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
    display: block;
}
.l40-timeline-milestone {
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
    display: inline-block;
}
.l40-milestone-debut { background-color: #3498db; }
.l40-milestone-peak { background-color: #f1c40f; }
.l40-milestone-number_one { background-color: #e74c3c; }
.l40-timeline-position {
    font-size: 1.5em;
    font-weight: bold;
    color: #777;
    margin-left: auto;
}

/* === ESTILOS PARA VIAJERO DEL TIEMPO Y BANDA SONORA === */
.l40-viajero-subtitle {
    text-align: center;
    color: #555;
    margin-top: -15px;
    margin-bottom: 25px;
}
#l40-viajero-controls, #l40-bs-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}
.l40-viajero-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1em;
}
.l40-viajero-button {
    background-color: #1DB954 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.2s;
}
.l40-viajero-button:hover {
    background-color: #1ed760 !important;
}
.l40-viajero-placeholder {
    text-align: center;
    color: #888;
    padding: 40px 0;
}
.l40-viajero-n1 {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.l40-viajero-cover {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.l40-viajero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.l40-viajero-n1 .l40-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(4px);
}
.l40-viajero-info .fecha-lista {
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 5px;
}
.l40-viajero-info h3 {
    margin: 0;
    font-size: 2em;
}
.l40-viajero-info h3 a {
    color: #111;
    text-decoration: none;
}
.l40-viajero-info p {
    margin: 5px 0 0;
    font-size: 1.2em;
    color: #333;
}
.l40-viajero-top5 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.l40-viajero-top5-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
}
.l40-viajero-top5-item .posicion {
    font-size: 1.2em;
    font-weight: bold;
    color: #999;
    width: 30px;
    text-align: right;
}
.l40-viajero-top5-item a {
    text-decoration: none;
    color: #333;
}
.l40-viajero-top5-item small {
    color: #666;
}

.l40-bs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.l40-bs-milestone {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}
.l40-bs-milestone h4 {
    margin: 0 0 5px;
}
.l40-bs-milestone .milestone-date {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
    display: block;
}
.l40-bs-song {
    display: flex;
    gap: 10px;
    align-items: center;
}
.l40-bs-song img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.l40-bs-song .info {
    display: flex;
    flex-direction: column;
}
.l40-bs-song .info a {
    color: #111;
    text-decoration: none;
}
.l40-bs-song .info small {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}
.l40-bs-song-empty {
    padding: 20px 0;
    text-align: center;
    color: #999;
}

/* === ESTILOS AMPLIACIÓN RETO MUSICAL === */
.l40-quiz-container { text-align: center; }
.l40-quiz-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 640px; /* Ancho máximo para el vídeo */
    background: #000;
    border-radius: 8px;
    margin: 15px auto 0;
}
.l40-quiz-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.l40-quiz-modes, .l40-quiz-survival-mode {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 25px;
}
.l40-quiz-mode-btn {
    background-color: #f0f0f0 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    padding: 15px !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.2s;
}
.l40-quiz-mode-btn:hover {
    background-color: #e0e0e0 !important;
    border-color: #ccc !important;
    transform: translateY(-2px);
}
.l40-quiz-mode-btn.survival {
    background-color: #1DB954 !important;
    color: white !important;
    border-color: #1DB954 !important;
    grid-column: 1 / -1; /* Ocupa todo el ancho */
    margin-top: 10px;
}
#l40-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: bold;
}
#l40-quiz-timer {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}
#l40-quiz-timer.time-low span {
    color: #e74c3c;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
#l40-quiz-options-area { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin: 20px 0; 
}
.l40-quiz-option { 
    background-color: #f0f0f0; 
    border: 2px solid #ddd; 
    padding: 15px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 1.2em; 
    transition: all 0.2s; 
}
.l40-quiz-option:hover { 
    background-color: #e0e0e0; 
    border-color: #ccc; 
}
.l40-quiz-option:disabled { 
    cursor: not-allowed; 
    opacity: 0.7; 
}
#l40-quiz-options-area.two-options {
    grid-template-columns: 1fr; /* Una columna para 2 opciones */
}
.l40-quiz-title-fragment {
    font-size: 1.8em;
    font-style: italic;
    color: #333;
    margin-top: 20px;
}
.l40-quiz-artist-hint {
    font-size: 1.1em;
    color: #777;
    margin-bottom: 20px;
}
#l40-quiz-feedback-area p { 
    font-size: 1.2em; 
    font-weight: bold; 
    padding: 10px; 
    border-radius: 8px; 
}
#l40-quiz-feedback-area .correct { 
    background-color: #d4edda; 
    color: #155724; 
}
#l40-quiz-feedback-area .incorrect { 
    background-color: #f8d7da; 
    color: #721c24; 
}
#l40-quiz-final-score { 
    font-size: 2.5em; 
    font-weight: bold; 
    margin: 20px 0; 
    color: #1DB954; 
}
#l40-quiz-ingame-controls {
    margin-top: 20px;
    text-align: right;
}
#l40-quiz-hint-btn {
    background: #3498db !important;
    color: white !important;
    border: none !important;
    padding: 8px 15px !important;
    border-radius: 20px !important;
    cursor: pointer;
}
#l40-quiz-hint-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* === ESTILOS PARA ONE-HIT WONDERS === */
.l40-wonders-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.l40-wonder-item { display: flex; align-items: center; gap: 15px; background: #f9f9f9; padding: 15px; border-radius: 8px; }
.l40-wonder-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.l40-wonder-item .info h3 { margin: 0 0 5px; font-size: 1.2em; }
.l40-wonder-item .info h3 a, .l40-wonder-item .info p a { text-decoration: none; color: #333; }
.l40-wonder-item .info p { margin: 0; }
.l40-wonder-item .info .peak-pos { margin-top: 8px; display: inline-block; background: #eee; padding: 3px 8px; border-radius: 4px; font-size: 0.9em; }

/* =============================================
   REGLA FINAL PARA ANULAR TEMA EN TABLAS
   ============================================= */
/*
 * Usamos un selector muy específico para asegurarnos
 * de que nuestra regla tenga más prioridad que la del tema.
 * Esto evita que el texto de la cabecera se divida en varias líneas.
*/
body .l40-container .l40-table thead tr:first-child th {
    white-space: nowrap !important;
}

/* Estilos para la fila de filtros para asegurar alineación */
.l40-table .l40-filter-row th {
    padding-top: 5px;
    padding-bottom: 10px; /* Un poco más de espacio inferior */
    border-bottom: 1px solid #ddd;
}

.l40-table .l40-filter-row input[type="text"] {
    font-size: 0.9em;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 8px;
}