/** GI Radio Player - basic styles **/
.gi-radio-sticky {
    position: fixed;
    left: 0;
    right: 0;
    background: rgba(30,30,30,0.95);
    color: #fff;
    z-index: 99999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    /* Hide by default, show when active */
    display: none;
}

.gi-radio-sticky.active {
    display: block;
}

.gi-radio-sticky-bottom { bottom: 0; }
.gi-radio-sticky-top { top: 0; }

.gi-radio-sticky .gi-radio-sticky-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.gi-radio-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: inherit;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.gi-radio-btn.playing {
    background-color: rgba(220, 60, 60, 0.8);
}

.gi-radio-btn:hover { opacity: 0.95; }

.gi-radio-meta {
    flex: 1;
    font-size: 13px;
    opacity: 0.95;
}

.gi-radio-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

@media (max-width:600px){
    .gi-radio-sticky .gi-radio-meta { display:none; }
    .gi-radio-btn { padding:6px 8px; font-size:13px; }
}

/* Hidden iframe container */
#gi-radio-iframe {
    display: none;
    width: 0;
    height: 0;
    border: none;
}

/* Volume control styles */
.gi-radio-volume-bar {
    display: flex;
    align-items: center; /* Centrage vertical */
    gap: 8px;
    flex-wrap: nowrap;
    max-width: 100%;
    margin: 10px 0;
    position: relative; /* Pour permettre des ajustements précis */
    height: 20px; /* Hauteur fixe pour tous les éléments */
}

/* Style de base pour le curseur de volume */
.gi-radio-volume-bar input[type=range] {
    -webkit-appearance: none; /* Supprime l'apparence par défaut */
    -moz-appearance: none;
    appearance: none;
    height: 4px;
    cursor: pointer;
    width: 100%;
    max-width: 80px; /* Réduit à 80px comme demandé */
    flex: 1;
    background: #dddddd; /* Fond gris clair comme dans l'image */
    border-radius: 10px;
    outline: none;
    margin: 0;
    padding: 0;
    position: relative;
    top: 0; /* Assure l'alignement vertical avec l'icône */
    vertical-align: middle;
}

/* Style pour le bouton du curseur (thumb) - Chrome, Edge, Safari */
.gi-radio-volume-bar input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
    margin-top: -6px; /* Centrer verticalement le thumb */
}

/* Style pour le bouton du curseur (thumb) - Firefox */
.gi-radio-volume-bar input[type=range]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative; /* Pour ajustement précis */
    vertical-align: middle;
}

/* Style pour la piste du curseur (track) - Firefox */
.gi-radio-volume-bar input[type=range]::-moz-range-track {
    background: #dddddd;
    height: 4px;
    border-radius: 10px;
}

/* Style pour la partie remplie du curseur - Firefox */
.gi-radio-volume-bar input[type=range]::-moz-range-progress {
    background-color: #292727;
    height: 4px;
    border-radius: 10px;
}

.gi-radio-volume-bar #gi-radio-volume-icon {
    cursor: pointer;
    flex-shrink: 0;
    font-size: 20px;
    transition: color 0.2s;
    width: 20px;
    height: 20px; /* Définir une hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 0; /* Aligner avec le curseur */
}

.gi-radio-volume-bar .gi-radio-volume-icon i {
    font-size: 16px;
    display: inline-block;
    text-align: center;
}

.gi-radio-volume-bar .gi-radio-volume-value {
    flex-shrink: 0;
    font-size: 13px;
    position: relative;
    top: 0; /* Aligner avec le curseur et l'icône */
    line-height: 1;
}

/* Iframe player styles */
.gi-iframe-body {
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gi-player-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.gi-iframe-btn {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.gi-iframe-btn:hover {
    background-color: #135e96;
}

.gi-iframe-btn.playing {
    background-color: #d63638;
}

.gi-iframe-meta {
    margin-left: 10px;
    font-size: 14px;
}

/* Style pour l'affichage de la progression (remplissage) du curseur pour Chrome */
.gi-radio-volume-bar input[type=range]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 10px;
    background: linear-gradient(to right, #292727 0%, #dddddd 100%);
}

/* Style pour la partie active (filled) du curseur pour IE */
.gi-radio-volume-bar input[type=range]::-ms-fill-lower {
    background: #292727;
    border-radius: 10px;
}

.gi-radio-volume-bar input[type=range]::-ms-fill-upper {
    background: #dddddd;
    border-radius: 10px;
}

.gi-radio-volume-bar input[type=range]::-ms-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Styles pour les petits écrans */
@media (max-width: 480px) {
    .gi-radio-volume-bar {
        gap: 4px;
    }
    .gi-radio-volume-bar input[type=range] {
        max-width: 40px; /* Réduit proportionnellement pour les mobiles */
    }
    .gi-radio-volume-bar #gi-radio-volume-icon {
        font-size: 16px;
        width: 16px;
    }
    .gi-radio-volume-bar #gi-radio-volume-icon i {
        font-size: 14px;
    }
    .gi-radio-volume-bar #gi-radio-volume-value {
        font-size: 11px;
    }
}

/* Fix pour assurer l'affichage des icônes play/pause */
.fa-play, .fa-pause, .fa-volume-high, .fa-volume-low, .fa-volume-off, .fa-volume-xmark {
    display: inline-block !important;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    line-height: 1;
    text-align: center;
    margin-right: 0;
}

/* Correction spécifique pour l'icône dans le bouton icon-only */
.gi-radio-btn-icon-only .fa-play, 
.gi-radio-btn-icon-only .fa-pause {
    vertical-align: middle !important;
    margin: 0 auto !important;
}

/* S'assurer que les boutons ont un espace suffisant pour les icônes */
[data-gi-role="play-btn"], [data-gi-role="play-btn-sticky"], .gi-iframe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    min-width: 100px;
}

/* Style spécifique pour le bouton radio_play sans texte */
.gi-radio-btn-icon-only {
    padding: 0 !important;
    margin: 0 !important;
    min-width: unset !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background-color: #FFFFFF !important;
    color: #000000 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    border: none !important;
    position: relative !important;
    overflow: visible !important;
    line-height: 0 !important;
}

/* Style spécifique pour les boutons lors de la lecture */
[data-gi-role="play-btn"].playing, [data-gi-role="play-btn-sticky"].playing {
    background-color: rgba(220, 60, 60, 0.8) !important;
    color: #fff !important;
}

/* Style spécifique pour le bouton radio_play avec icône noire et fond blanc */
.gi-radio-btn-icon-only.playing {
    background-color: #FFFFFF !important; 
    color: #000000 !important;
}

/* Taille de l'icône dans le bouton play/pause */
.gi-radio-btn-icon-only i {
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    position: relative !important;
    text-align: center !important;
}
