#rh-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    z-index: 999999;
    padding: 0 12px;
    box-sizing: border-box;
}

#rh-player {
    --max-width: 1300px;
    width: 100%;
    background: #1e1e1e;
    color: #fff;
    border-top: 1px solid #FE6800;
    --border-radius: 14px 14px 14px 14px;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.4);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.rh-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: none;
    border-radius: 50%;
    background: #FE6800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.15s ease;
    padding: 0;
    flex-shrink: 0;
}

.rh-btn:hover {
    background: #ff7b1a;
    transform: scale(1.05);
}

.rh-btn svg { width: 22px; height: 22px; }

#rh-logo {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.rh-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    margin-right: auto;
}

.rh-info .rh-title {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rh-info .rh-subtitle {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

/* Control de Volum */
.rh-volume-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    margin-right: 20px;
}

.rh-btn-icon {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.rh-btn-icon:hover { 
    color: #fff; 
    background-color: rgba(255, 255, 255, 0.05);
}

.rh-btn-icon svg { width: 22px; height: 22px; }

/* Slider de Volum */
#rh-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 3px;
    border-radius: 3px;
    background: #444444;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

#rh-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FE6800;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: transform 0.15s ease;
}

#rh-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FE6800;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

#rh-volume::-moz-range-track {
    background: #444444;
    height: 3px;
    border: none !important;
}

#rh-volume::-webkit-slider-thumb:hover,
#rh-volume::-moz-range-thumb:hover { 
    transform: scale(1.15); 
}

#live {
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    background: rgba(232, 232, 232, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(232, 232, 232, 0.2);
    color: #e8e8e8;
    flex-shrink: 0;
}

#dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff2d2d;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1.2s infinite ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.8); }
}

[data-barba="container"] {
    will-change: opacity;
}

/* Oculta l'indicador "EN DIRECTE" quan es reprodueix àudio a la carta */
#rh-player[data-is-live="false"] #live {
    display: none !important;
}

/* ==========================================================================
   ESTILS DELS BOTONS EXTERNS (SHORTCODES)
   ========================================================================== */

.rh-audio-shortcode-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    background: transparent !important;
}

.rh-external-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    background-color: #FE6800 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: normal !important;
    cursor: pointer;
    transition: background-color 0.15s ease;
    box-sizing: border-box;
    line-height: 1;
    margin-bottom: 30px;
    transform: none !important;
    -webkit-tap-highlight-color: transparent;
}

.rh-audio-shortcode-wrap .rh-external-play {
    margin-bottom: 0;
}

.rh-external-play:hover {
    background-color: #ff7b1a !important;
    letter-spacing: normal !important;
    transform: none !important;
}

.rh-external-play.is-playing {
    background-color: #d85800 !important;
    font-weight: 600;
    letter-spacing: normal !important;
}

/* Configuració i color de les icones SVG dels botons rh-external-play */
.rh-external-play svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: #ffffff !important;
    color: #ffffff !important;
    pointer-events: none;
    transition: fill 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.rh-external-play svg path {
    fill: #ffffff !important;
    transition: fill 0.15s ease;
}

/* Canvi de color de la icona SVG a negre quan es passa el punter per sobre (hover) */
@media (hover: hover) {
    .rh-external-play:hover svg,
    .rh-external-play:hover svg path {
        fill: #000000 !important;
        color: #000000 !important;
    }
}

/* Botó d'Escolta en directe [rh_play_live] */
.rh-audio-shortcode-wrap:has(.rh-play-live-btn) {
    margin-bottom: 0 !important;
    background: transparent !important;
}

.rh-external-play.rh-play-live-btn {
    height: 40px !important;
    max-height: 40px !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 0 18px;
    margin-bottom: 0 !important;
    letter-spacing: normal !important;
    border: 2px solid #FE6800 !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
    transform: none !important;
}

.rh-external-play.rh-play-live-btn:hover,
.rh-external-play.rh-play-live-btn:active,
.rh-external-play.rh-play-live-btn:focus {
    background-color: #FFC266 !important;
    color: #000000 !important;
    border-color: #FE6800 !important;
    letter-spacing: normal !important;
    transform: none !important;
}

.rh-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    background-color: #e0e0e0 !important;
    color: #333333 !important;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.15s ease;
    box-sizing: border-box;
    line-height: 1;
}

.rh-download-btn:hover {
    background-color: #d0d0d0 !important;
    color: #111111 !important;
    transform: none !important;
}

.rh-icon-download {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Integració als menús de navegació */
.nav-menu .rh-audio-shortcode-wrap,
.main-navigation .rh-audio-shortcode-wrap,
li .rh-audio-shortcode-wrap {
    margin-bottom: 0 !important;
    display: inline-flex;
    align-items: center;
    background: transparent !important;
}

/* ==========================================================================
   ESTIL PER A L'ÍTEM DE NAVEGACIÓ menu-item-73867
   ========================================================================== */

.menu-item-73867 > a,
#menu-item-73867 > a {
    transition: background-color 0.15s ease;
}

.menu-item-73867:hover > a,
.menu-item-73867:active > a,
.menu-item-73867:focus > a,
#menu-item-73867:hover > a,
#menu-item-73867:active > a,
#menu-item-73867:focus > a {
    background-color: #FE6800 !important;
    color: #ffffff !important;
}

/* Responsivitat mòbil */
@media (max-width: 768px) {
    #rh-player { padding: 10px 14px; gap: 12px; }
    #rh-logo { width: 38px; height: 38px; min-width: 38px; }
    .rh-info .rh-title { font-size: 13px; }
    .rh-info .rh-subtitle { font-size: 11px; }
    .rh-volume-wrap { margin-left: 0; margin-right: 0; }
    #rh-volume { width: 80px; }
}

@media (max-width: 480px) {
    #rh-wrap { padding: 0; }
    #rh-player { border-radius: 0; border-top-width: 2px; }
    #rh-volume { display: none; }
    .rh-volume-wrap { margin-left: auto; margin-right: 0; }
    #live { padding: 4px 8px; background: transparent; border: none; }
    .rh-live-text { display: none; }
    #dot { margin-right: 0; width: 10px; height: 10px; }
}

/* Correcció de maquetació fora d'Elementor */
body:not(.elementor-page) .site-content,
body:not(.elementor-page) .content-wrapper,
body:not(.elementor-page) #content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

body:not(.elementor-page) #primary,
body:not(.elementor-page) .content-area,
body:not(.elementor-page) main.site-main {
    flex: 1 1 65%;
    min-width: 0;
}

body:not(.elementor-page) #secondary,
body:not(.elementor-page) .sidebar,
body:not(.elementor-page) aside.widget-area {
    flex: 0 0 30%;
    box-sizing: border-box;
}

body {
    padding-bottom: 90px !important;
}

@media (max-width: 768px) {
    body:not(.elementor-page) .site-content,
    body:not(.elementor-page) .content-wrapper,
    body:not(.elementor-page) #content {
        flex-direction: column;
        gap: 20px;
    }

    body:not(.elementor-page) #primary,
    body:not(.elementor-page) #secondary,
    body:not(.elementor-page) .content-area,
    body:not(.elementor-page) .sidebar {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* ==========================================================================
   BOTÓ MINIMALISTA (rh_play_icon) - OPTIMITZAT PER A IOS / IPHONE
   ========================================================================== */
.rh-external-play.rh-mini-play-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 50% !important;
    background-color: #fe6800 !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: transform 0.15s ease, background-color 0.15s ease !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;

    /* Reset d'estils tàctils per a iOS Safari */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.rh-external-play.rh-mini-play-btn:hover,
.rh-external-play.rh-mini-play-btn:focus,
.rh-external-play.rh-mini-play-btn:active {
    background-color: #ff7b1a !important;
    outline: none !important;
}

/* Mantenir el fons en estat is-playing */
.rh-external-play.rh-mini-play-btn.is-playing {
    background-color: #fe6800 !important;
}

.rh-external-play.rh-mini-play-btn.is-playing:hover {
    background-color: #ff7b1a !important;
}

/* Icones SVG del botó mini */
.rh-external-play.rh-mini-play-btn svg {
    margin-right: 0 !important;
}

.rh-external-play.rh-mini-play-btn svg,
.rh-external-play.rh-mini-play-btn svg path,
.rh-external-play.rh-mini-play-btn i {
    width: 18px !important;
    height: 18px !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
    color: #ffffff !important;
    pointer-events: none;
    transition: fill 0.15s ease, color 0.15s ease;
}

/* Color de la icona en hover (només en dispositius amb punter com a PC) */
@media (hover: hover) {
    .rh-external-play.rh-mini-play-btn:hover svg,
    .rh-external-play.rh-mini-play-btn:hover svg path,
    .rh-external-play.rh-mini-play-btn:hover i {
        fill: #000000 !important;
        stroke: #000000 !important;
        color: #000000 !important;
    }
}

/* CONTROL STRICTE DE COMMUTACIÓ DE DISSENY PLAY / PAUSE */
/* Estat ATURAT (Pausa): Mostra PLAY, amaga PAUSE */
.rh-external-play.rh-mini-play-btn:not(.is-playing) .rh-icon-play {
    display: block !important;
}
.rh-external-play.rh-mini-play-btn:not(.is-playing) .rh-icon-pause {
    display: none !important;
}

/* Estat EN REPRODUCCIÓ (Playing): Amaga PLAY, mostra PAUSE */
.rh-external-play.rh-mini-play-btn.is-playing .rh-icon-play {
    display: none !important;
}
.rh-external-play.rh-mini-play-btn.is-playing .rh-icon-pause {
    display: block !important;
}

/* ==========================================================================
   LLISTA DE REPRODUCCIÓ PODCAST (rh_podcast_playlist)
   ========================================================================== */
.rh-playlist-container {
    background: #252525;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.rh-playlist-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rh-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid #383838;
    gap: 15px;
}

.rh-playlist-item:last-child {
    border-bottom: none;
}

.rh-playlist-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.rh-playlist-item-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.rh-playlist-item-date {
    color: #aaaaaa;
    font-size: 12px;
    margin-top: 4px;
}

.rh-playlist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rh-playlist-actions .rh-download-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
}

.rh-playlist-footer {
    text-align: center;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid #383838;
}

.rh-load-more-btn {
    background-color: transparent !important;
    color: #fe6800 !important;
    border: 2px solid #fe6800 !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rh-load-more-btn:hover {
    background-color: #fe6800 !important;
    color: #ffffff !important;
}

.rh-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   ESTAT DESACTIVAT PER A BOTONS AMB URL DE L'ÀUDIO INEXISTENT
   ========================================================================== */
.rh-external-play.is-disabled,
.rh-external-play.is-disabled:hover,
.rh-external-play.is-disabled:active,
.rh-external-play.is-disabled:focus {
    background-color: rgb(224, 224, 224) !important;
    color: #888888 !important;
    cursor: not-allowed !important;
    border-color: rgb(224, 224, 224) !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none !important;
}

/* Icona en botons desactivats */
.rh-external-play.is-disabled svg,
.rh-external-play.is-disabled svg path,
.rh-external-play.is-disabled:hover svg,
.rh-external-play.is-disabled:hover svg path {
    fill: #888888 !important;
    color: #888888 !important;
}

/* ==========================================================================
   ESTAT DESACTIVAT PER A BOTONS AMB URL DE L'ÀUDIO INEXISTENT
   ========================================================================== */
.rh-external-play.is-disabled:not(.rh-play-live-btn),
.rh-external-play.is-disabled:not(.rh-play-live-btn):hover,
.rh-external-play.is-disabled:not(.rh-play-live-btn):active,
.rh-external-play.is-disabled:not(.rh-play-live-btn):focus {
    background-color: rgb(224, 224, 224) !important;
    color: #888888 !important;
    cursor: not-allowed !important;
    border-color: rgb(224, 224, 224) !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none !important;
}

/* Icona en botons desactivats */
.rh-external-play.is-disabled:not(.rh-play-live-btn) svg,
.rh-external-play.is-disabled:not(.rh-play-live-btn) svg path,
.rh-external-play.is-disabled:not(.rh-play-live-btn):hover svg,
.rh-external-play.is-disabled:not(.rh-play-live-btn):hover svg path {
    fill: #888888 !important;
    color: #888888 !important;
}


