/**
 * Estilos para el reproductor MVP_Reproductor
 *
 * @link       https://example.com
 * @since      1.0.0
 *
 * @package    MVP_Most_Value_Player
 * @subpackage MVP_Most_Value_Player/public/css
 */

/* Estilos para el reproductor */
.mvp-reproductor-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Fila de canción */
.mvp-reproductor-song-row {
    display: flex;
    align-items: flex-start;
    padding: 15px 0 5px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.mvp-reproductor-song-row:last-child {
    border-bottom: none;
}

.mvp-reproductor-song-row:hover {
    background-color: #f9f9f9;
}

/* Columnas */
.mvp-reproductor-col {
    padding: 10px;
}

/* Ajuste para alinear las columnas al inicio */
.mvp-reproductor-col1,
.mvp-reproductor-col2 {
    padding-top: 0;
}

/* Columna 1: Número de posición */
.mvp-reproductor-col1 {
    width: 50px;
    padding: 0;
    margin: 0;
    position: relative;
}

.mvp-reproductor-position {
    min-width: 30px; /* Ancho mínimo para números pequeños */
    height: 30px;
    background-color: #e8fc05;
    color: #000;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-left: 10px;
    padding: 0 5px; /* Añadir padding horizontal para números grandes */
    font-size: 14px; /* Tamaño de fuente base */
    overflow: hidden; /* Evitar desbordamiento */
}

/* Ajuste automático para números de 2 o más cifras */
.mvp-reproductor-position[data-digits="2"] {
    font-size: 13px;
}

.mvp-reproductor-position[data-digits="3"] {
    font-size: 11px;
    min-width: 32px; /* Ligeramente más ancho */
}

.mvp-reproductor-position[data-digits="4"] {
    font-size: 9px;
    min-width: 34px; /* Aún más ancho */
}

.mvp-reproductor-position[data-digits="5"] {
    font-size: 8px;
    min-width: 36px; /* Aún más ancho */
}

.mvp-reproductor-position[data-digits="6"] {
    font-size: 7px;
    min-width: 38px; /* Aún más ancho */
}

/* Columna 2: Cover */
.mvp-reproductor-col2 {
    width: 120px;
}

.mvp-reproductor-cover {
    width: 110px;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
}

.mvp-reproductor-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.1); /* Sombreado en todas direcciones para efecto flotante */
    transform: translateY(-3px); /* Ligera elevación por defecto */
    transition: all 0.3s ease;
}

.mvp-reproductor-cover img:hover {
    transform: translateY(-5px); /* Mayor elevación al pasar el cursor */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2), 0 5px 8px rgba(0, 0, 0, 0.15); /* Sombreado más pronunciado al pasar el cursor */
}

.mvp-reproductor-default-cover {
    width: 100%;
    height: 100%;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mvp-reproductor-default-cover:after {
    content: "W";
    font-size: 40px;
    font-weight: bold;
    color: #000;
}

/* Columna 3: Información de la canción */
.mvp-reproductor-col3 {
    width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mvp-reproductor-info-cell {
    padding: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mvp-reproductor-title {
    font-weight: bold;
    font-size: 16px;
}

.mvp-reproductor-artist {
    font-size: 14px;
}

.mvp-reproductor-album,
.mvp-reproductor-label,
.mvp-reproductor-year {
    font-size: 12px;
    color: #666;
    padding: 1px 0;
    line-height: 1.2;
}

/* Columna 4: Controles y metadatos */
.mvp-reproductor-col4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Media query para ordenadores y tablets - Ajustes para la información de canción y reproductor */
@media (min-width: 769px) {
    /* Ajustes para la columna de información de la canción */
    .mvp-reproductor-col3 {
        margin-top: -5px; /* Ajustado para bajar más la información de la canción */
        padding-top: 0;
        margin-right: 20px; /* Añadir margen derecho para separar de la columna del reproductor */
    }
    
    .mvp-reproductor-info-cell {
        padding: 2px 0; /* Mantener espacio reducido entre elementos */
    }
    
    .mvp-reproductor-title {
        font-size: 18px; /* Mantener tamaño del título */
        margin-bottom: 0; /* Eliminar margen para acercar al artista */
        padding-top: 10px; /* Aumentar espacio arriba para bajar más el título */
        line-height: 1; /* Reducir altura de línea */
    }
    
    .mvp-reproductor-artist {
        font-size: 16px; /* Mantener tamaño del artista */
        margin-top: 0; /* Eliminar espacio desde el título */
        margin-bottom: 2px;
        line-height: 1.2; /* Reducir altura de línea */
    }
    
    /* Ajustes para la columna del reproductor */
    .mvp-reproductor-col4 {
        margin-left: 30px; /* Aumentar margen izquierdo para mayor separación */
        padding-left: 20px; /* Aumentar relleno izquierdo adicional */
        border-left: 1px solid #f0f0f0; /* Mantener borde sutil para separar visualmente */
    }
    
    /* Ajustar el ancho de las columnas para mejor distribución */
    .mvp-reproductor-col3 {
        width: 230px; /* Reducir ligeramente el ancho */
    }
}

/* Filas dentro de la columna 4 */
.mvp-reproductor-row {
    display: flex;
    margin-bottom: 5px;
}

.mvp-reproductor-row:last-child {
    margin-bottom: 0;
}

/* Celdas dentro de las filas */
.mvp-reproductor-cell {
    padding: 0 5px;
}

/* Fila 1: OnFire, FP, REF */
.mvp-reproductor-row1 {
    display: flex;
    justify-content: space-between;
}

.mvp-reproductor-empty {
    width: 100px;
}

.mvp-reproductor-onfire {
    color: #ff3d00;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.mvp-reproductor-onfire svg {
    fill: #ff3d00;
}

/* Estilos para el botón de descarga */
.mvp-reproductor-download {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.mvp-reproductor-download-link {
    color: #4CAF50;
    font-weight: bold;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mvp-reproductor-download-link:hover {
    color: #388E3C;
}

.mvp-reproductor-download-link svg {
    fill: #4CAF50;
    transition: fill 0.2s ease;
}

.mvp-reproductor-download-link:hover svg {
    fill: #388E3C;
}

.mvp-reproductor-fp {
    color: #666;
    font-size: 12px; /* Mismo tamaño que REF */
    text-align: right;
    margin-left: auto;
}

.mvp-reproductor-ref {
    color: #999;
    font-size: 12px;
}

/* Fila 2: Reproductor */
.mvp-reproductor-row2 {
    flex: 1;
}

.mvp-reproductor-player-controls {
    display: flex;
    align-items: center;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
}

.mvp-reproductor-play-pause {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e8fc05;
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.mvp-reproductor-play-pause:hover {
    background-color: #d0e204;
}

.mvp-reproductor-play-pause.playing .fa-play {
    display: none;
}

.mvp-reproductor-play-pause:not(.playing) .fa-pause {
    display: none;
}

.mvp-reproductor-progress-container {
    flex: 1;
    margin: 0 10px;
    display: flex;
    align-items: center;
    height: 36px;
}

.mvp-reproductor-progress-bar {
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0;
}

.mvp-reproductor-progress {
    height: 100%;
    background-color: #e8fc05;
    border-radius: 3px;
    width: 0;
}

.mvp-reproductor-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    min-width: 80px;
    white-space: nowrap;
    align-items: center;
}

.mvp-reproductor-current-time,
.mvp-reproductor-duration {
    margin: 0 5px;
}

/* Fila 3: Géneros y botones */
.mvp-reproductor-row3 {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    margin-bottom: 5px;
}

.mvp-reproductor-genres {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2px;
}

.mvp-reproductor-genre-tag {
    background-color: #f0f0f0;
    color: #333;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mvp-reproductor-action-buttons {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.mvp-reproductor-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.mvp-reproductor-btn:hover {
    color: #000;
}

/* Estilo para el botón de sonido cuando está silenciado */
.mvp-reproductor-sound-btn.muted {
    color: #e74c3c;
}

.mvp-reproductor-sound-btn.muted:hover {
    color: #c0392b;
}

.mvp-reproductor-btn.active {
    color: #666; /* Mantener el color del botón igual */
    background-color: transparent; /* Asegurar que no hay fondo */
}

/* Asegurar que solo el icono cambia de color cuando está activo, no el contador */
.mvp-reproductor-btn.active .fas {
    color: #f0c040; /* Amarillo más mate con tono anaranjado */
}

/* Color rojo para el icono de corazón cuando está activo */
.mvp-reproductor-like-btn.active .fas.fa-heart {
    color: #ff3b30;
}

.mvp-reproductor-btn.active .mvp-reproductor-count {
    color: #666; /* Mantener el mismo color que los otros contadores */
}

.mvp-reproductor-count {
    margin-left: 3px;
    font-size: 12px;
    color: #666; /* Color fijo para todos los contadores */
}

/* Ajuste para el icono de auriculares */
.mvp-reproductor-plays-counter .fas.fa-headphones {
    font-size: 0.8em; /* Reducido para coincidir con el tamaño del icono de estrella */
}

/* Ventanas emergentes */
.mvp-reproductor-share-popup {
    display: none; /* Ocultar por defecto */
    position: absolute;
    top: 30px; /* Posición justo debajo del botón */
    right: 0;
    z-index: 9999; /* Valor alto para asegurar que esté por encima de otros elementos */
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 8px; /* Reducir el padding */
    border: 1px solid #ddd;
    transform-origin: top right; /* Punto de origen para la transformación */
    flex-direction: row !important; /* Forzar dirección horizontal */
    flex-wrap: nowrap !important; /* Evitar que los elementos se envuelvan */
    gap: 5px; /* Espacio entre los iconos */
    visibility: hidden; /* Asegurar que esté oculto */
    opacity: 0; /* Transparente cuando está oculto */
    transition: opacity 0.2s; /* Transición suave */
    width: auto; /* Ancho automático basado en contenido */
    min-width: 120px; /* Ancho mínimo para asegurar visibilidad */
}

/* Para las últimas filas, asegurar que el popup aparezca por encima */
.mvp-reproductor-song-row:last-child .mvp-reproductor-share-popup,
.mvp-reproductor-song-row:nth-last-child(2) .mvp-reproductor-share-popup {
    top: auto; /* Anular top para las últimas filas */
    bottom: 30px; /* Mostrar por debajo del botón */
}

/* Mostrar ventana emergente cuando tiene la clase .active */
.mvp-reproductor-share-popup.active {
    display: flex !important; /* Forzar visualización como flexbox */
    visibility: visible !important; /* Asegurar que sea visible */
    opacity: 1 !important; /* Totalmente opaco cuando está visible */
}

/* Contenedor del botón de compartir */
.mvp-reproductor-share-container {
    position: relative;
    display: inline-block;
    z-index: 3;
}

/* Asegurar que los controles tengan posición relativa */
.mvp-reproductor-controls {
    position: relative;
}

/* Modal para la imagen ampliada */
.mvp-cover-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
}

.mvp-cover-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mvp-cover-modal-content {
    position: relative;
    display: block;
    width: 80%;
    max-width: 700px;
    margin: 0 auto;
}

/* Estilos para los botones de compartir en redes sociales */
.mvp-reproductor-share-popup h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
    color: #333;
}

.mvp-reproductor-share-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 5px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
}

.mvp-reproductor-share-btn-social {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 3px !important;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    margin: 0 2px !important;
    padding: 0 !important;
}

.mvp-reproductor-share-btn-social i {
    font-size: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Estilos específicos para el botón de favoritos */
.mvp-reproductor-favorite-btn {
    transition: all 0.2s ease !important;
    position: relative;
    cursor: pointer !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    background: transparent !important;
    border: none !important;
}

.mvp-reproductor-favorite-btn i {
    color: #ccc !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
}

.mvp-reproductor-favorite-btn.active i {
    color: #FFD700 !important; /* Color dorado para la estrella activa */
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5) !important;
}

/* Efecto de animación al hacer clic */
.mvp-reproductor-favorite-btn:active {
    transform: scale(1.2) !important;
}

/* Eliminado el efecto de círculo alrededor del icono activo */
/* Mantenemos solo el efecto de color y sombra en el icono */

/* Estilos para la ventana emergente de compartir */
.mvp-reproductor-share-container {
    position: relative;
}

.mvp-reproductor-share-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 8px;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 5px;
}

.mvp-reproductor-share-popup.active {
    display: flex !important;
}

.mvp-reproductor-share-btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mvp-reproductor-share-facebook {
    background-color: #3b5998;
}

.mvp-reproductor-share-instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.mvp-reproductor-share-tiktok {
    background-color: #000000;
}

.mvp-reproductor-share-whatsapp {
    background-color: #25D366;
}

.mvp-reproductor-share-btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.mvp-reproductor-close-popup {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.mvp-reproductor-close-popup:hover {
    background-color: #e0e0e0;
}

#mvp-cover-modal-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    max-height: 80vh;
    object-fit: contain;
}

.mvp-cover-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1010;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.mvp-cover-modal-close:hover,
.mvp-cover-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

.mvp-cover-clickable {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mvp-cover-clickable:hover {
    opacity: 0.8;
}

.mvp-reproductor-info-popup.active,
.mvp-reproductor-share-popup.active {
    display: block;
}

.mvp-reproductor-info-popup-content h3,
.mvp-reproductor-share-popup-content h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.mvp-reproductor-close-popup {
    background-color: #ffff00;
    color: #000;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.mvp-reproductor-share-buttons {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.mvp-reproductor-share-buttons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

.mvp-reproductor-share-facebook {
    background-color: #3b5998;
}

.mvp-reproductor-share-instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.mvp-reproductor-share-tiktok {
    background-color: #000;
}

.mvp-reproductor-share-whatsapp {
    background-color: #25D366;
}

/* Responsive */
@media (max-width: 768px) {
    .mvp-reproductor-song-row {
        flex-wrap: wrap;
    }
    
    .mvp-reproductor-col1 {
        width: 40px;
    }
    
    .mvp-reproductor-col2 {
        width: 80px;
    }
    
    .mvp-reproductor-col3 {
        width: calc(100% - 120px);
    }
    
    .mvp-reproductor-col4 {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .mvp-reproductor-col3 {
        width: calc(100% - 120px);
    }
    
    .mvp-reproductor-row1 {
        flex-wrap: wrap;
    }
    
    .mvp-reproductor-empty,
    .mvp-reproductor-onfire,
    .mvp-reproductor-fp,
    .mvp-reproductor-ref {
        margin-bottom: 5px;
    }
}
