/* ═══════════════════════════════════════════════════════
   Radio Player Pro — Theme / Elementor isolation
   Caricato per ultimo nel footer per massima priorità.
═══════════════════════════════════════════════════════ */

#rpp-root.rpp-wrapper {
    isolation: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    word-wrap: normal !important;
}

#rpp-root.rpp-wrapper *,
#rpp-root.rpp-wrapper *::before,
#rpp-root.rpp-wrapper *::after {
    box-sizing: border-box !important;
}

/* ── Pulsanti: Elementor e temi applicano stili globali aggressivi ── */
#rpp-root.rpp-wrapper button,
#rpp-root.rpp-wrapper .rpp-btn,
#rpp-root.rpp-wrapper .rpp-tab,
#rpp-root.rpp-wrapper .rpp-star,
#rpp-root.rpp-wrapper .rpp-mute-btn,
#rpp-root.rpp-wrapper .rpp-theme-toggle {
    font-family: inherit !important;
    font-weight: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    min-height: unset !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: none;
}

#rpp-root.rpp-wrapper button:focus,
#rpp-root.rpp-wrapper button:focus-visible {
    outline: none !important;
}

/* ── Immagini ── */
#rpp-root.rpp-wrapper img {
    border: none !important;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

#rpp-root.rpp-wrapper .rpp-tab__logo,
#rpp-root.rpp-wrapper .rpp-brand__logo,
#rpp-root.rpp-wrapper .rpp-np__cover {
    object-fit: contain;
}

#rpp-root.rpp-wrapper .rpp-np__cover {
    object-fit: cover;
}

/* ── Input range ── */
#rpp-root.rpp-wrapper input[type="range"] {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: unset !important;
}

/* ── Link e testo ── */
#rpp-root.rpp-wrapper a,
#rpp-root.rpp-wrapper a:hover,
#rpp-root.rpp-wrapper a:focus,
#rpp-root.rpp-wrapper a:active {
    text-decoration: none !important;
    outline: none !important;
}

#rpp-root.rpp-wrapper p {
    margin: 0 !important;
    padding: 0 !important;
}

#rpp-root.rpp-wrapper span,
#rpp-root.rpp-wrapper div {
    text-transform: none;
}

/* ── SVG play/pause (mute gestito separatamente sotto) ── */
#rpp-root.rpp-wrapper .rpp-btn svg:not(.rpp-icon--hidden) {
    display: block;
    fill: currentColor;
    pointer-events: none;
}

#rpp-root.rpp-wrapper svg.rpp-icon--hidden {
    display: none !important;
}

/* Mute: toggle via classe .muted sul bottone */
#rpp-root.rpp-wrapper .rpp-mute-btn .ico-vol-on {
    display: block !important;
}
#rpp-root.rpp-wrapper .rpp-mute-btn .ico-vol-off {
    display: none !important;
}
#rpp-root.rpp-wrapper .rpp-mute-btn.muted .ico-vol-on {
    display: none !important;
}
#rpp-root.rpp-wrapper .rpp-mute-btn.muted .ico-vol-off {
    display: block !important;
}
#rpp-root.rpp-wrapper .rpp-mute-btn svg {
    fill: none;
    stroke: currentColor;
    pointer-events: none;
}

/* ── Layout: impedisce override display da tema/Elementor ── */
#rpp-root.rpp-wrapper .rpp-tabs {
    display: flex !important;
}

#rpp-root.rpp-wrapper .rpp-tab-shell {
    display: flex !important;
}

#rpp-root.rpp-wrapper .rpp-controls {
    display: grid !important;
}

#rpp-root.rpp-wrapper .rpp-volume {
    display: flex !important;
}

#rpp-root.rpp-wrapper .rpp-stars {
    display: flex !important;
}

#rpp-root.rpp-wrapper .rpp-vote-side {
    display: flex !important;
}

/* ── Contenitori Elementor / Gutenberg / Astra ── */
.elementor-widget-shortcode #rpp-root.rpp-wrapper,
.elementor-element #rpp-root.rpp-wrapper,
.elementor-widget-container #rpp-root.rpp-wrapper,
.wp-block-shortcode #rpp-root.rpp-wrapper,
.ast-container #rpp-root.rpp-wrapper,
.entry-content #rpp-root.rpp-wrapper {
    float: none !important;
    clear: both !important;
}

/* Evita che Elementor imposti width:100% su tutti gli img del widget */
.elementor-widget-shortcode #rpp-root.rpp-wrapper img,
.elementor-element #rpp-root.rpp-wrapper img {
    width: auto;
}

/* Dimensioni dei loghi: il width:auto sopra (più specifico di player.css) mostrava
   le immagini alla loro grandezza naturale (logo 2560 px → largo quanto la pagina) */
.elementor-widget-shortcode #rpp-root.rpp-wrapper .rpp-brand__logo,
.elementor-element #rpp-root.rpp-wrapper .rpp-brand__logo,
#rpp-root.rpp-wrapper .rpp-brand__logo {
    width: 260px;
    max-width: 80vw;
    height: auto;
}
.elementor-widget-shortcode #rpp-root.rpp-wrapper .rpp-tab__logo,
.elementor-element #rpp-root.rpp-wrapper .rpp-tab__logo,
#rpp-root.rpp-wrapper .rpp-tab__logo {
    width: min(110px, 80%);
    height: auto;
}
@media (max-width: 768px) {
    .elementor-widget-shortcode #rpp-root.rpp-wrapper .rpp-tab__logo,
    .elementor-element #rpp-root.rpp-wrapper .rpp-tab__logo,
    #rpp-root.rpp-wrapper .rpp-tab__logo { width: min(84px, 80%); }
}
@media (max-width: 540px) {
    .elementor-widget-shortcode #rpp-root.rpp-wrapper .rpp-brand__logo,
    .elementor-element #rpp-root.rpp-wrapper .rpp-brand__logo,
    #rpp-root.rpp-wrapper .rpp-brand__logo { width: 190px; }
    .elementor-widget-shortcode #rpp-root.rpp-wrapper .rpp-tab__logo,
    .elementor-element #rpp-root.rpp-wrapper .rpp-tab__logo,
    #rpp-root.rpp-wrapper .rpp-tab__logo { width: min(60px, 80%); }
}

/* Notice fuori dal wrapper */
.rpp-notice {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif !important;
    text-align: center !important;
}

.rpp-notice a {
    text-decoration: none !important;
}

/* ═══════════════════════════════════════════════════════
   Elementor Global Kit — override esplicito
   Batte: .elementor-kit-XXX button { background-color; color; font-* }
   Specificità: body.kit + #id + .class + button.class
═══════════════════════════════════════════════════════ */

body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-btn,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-star,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-mute-btn,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-theme-toggle,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-btn,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-star,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-mute-btn,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-theme-toggle {
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    line-height: normal !important;
    min-height: unset !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Tab canali */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 1 !important;
    width: 100% !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 18px 8px 38px !important;
    color: #fff !important;
    background-color: transparent !important;
    background-image: linear-gradient(180deg, #3B82F6 0%, #1E3A8A 100%) !important;
    cursor: pointer !important;
}

body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab[data-channel="1"],
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab[data-channel="1"] {
    background-image: linear-gradient(180deg, #3B82F6 0%, #1E3A8A 100%) !important;
}

body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab[data-channel="2"],
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab[data-channel="2"] {
    background-image: linear-gradient(180deg, #22C55E 0%, #15803D 100%) !important;
}

body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab[data-channel="3"],
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab[data-channel="3"] {
    background-image: linear-gradient(180deg, #A855F7 0%, #6B21A8 100%) !important;
}

/* Play */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-btn--play,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-btn--play {
    width: 72px !important;
    height: 72px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 0 !important;
    background-color: #fff !important;
    background-image: none !important;
    color: #1d4ed8 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* Stop */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-btn--stop,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-btn--stop {
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 220, 255, .65) !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* Mute */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-mute-btn,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-mute-btn {
    padding: 2px !important;
    border: none !important;
    border-radius: 6px !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

/* Theme toggle */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-theme-toggle,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-theme-toggle {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid var(--rpp-border) !important;
    background-color: var(--rpp-bg) !important;
    background-image: none !important;
    color: var(--rpp-text) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* Stelle voto — spente di default, gialle solo se .on / hover */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-star,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-star {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    font-size: 42px !important;
    line-height: 1.05 !important;
    color: #d1d5db !important;
    cursor: pointer !important;
}

body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-star.on,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-star:hover,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-star.on,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-star:hover {
    color: #facc15 !important;
    background-color: transparent !important;
    background-image: none !important;
}

body[class*="elementor-kit"] #rpp-root.rpp-wrapper[data-theme="dark"] button.rpp-star:not(.on):not(:hover),
[class*="elementor-kit-"] #rpp-root.rpp-wrapper[data-theme="dark"] button.rpp-star:not(.on):not(:hover) {
    color: rgba(255, 255, 255, .24) !important;
}

/* Descrizioni canale: Elementor impone white-space:nowrap sui button */
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab .rpp-tab__name,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab .rpp-tab__desc,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab .rpp-tab__name,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab .rpp-tab__desc,
#rpp-root.rpp-wrapper .rpp-tab,
#rpp-root.rpp-wrapper .rpp-tab__name,
#rpp-root.rpp-wrapper .rpp-tab__desc {
    white-space: normal !important;
    text-overflow: clip !important;
}
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-tab .rpp-tab__desc,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-tab .rpp-tab__desc,
#rpp-root.rpp-wrapper .rpp-tab__desc {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

#rpp-root.rpp-wrapper .rpp-stars-display,
#rpp-root.rpp-wrapper .rpp-avg,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper .rpp-stars-display,
body[class*="elementor-kit"] #rpp-root.rpp-wrapper .rpp-avg,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper .rpp-stars-display,
[class*="elementor-kit-"] #rpp-root.rpp-wrapper .rpp-avg {
    color: #facc15 !important;
}

@media (max-width: 540px) {
    body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-btn--play,
    [class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-btn--play {
        width: 68px !important;
        height: 68px !important;
    }
    body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-btn--stop,
    [class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-btn--stop {
        width: 48px !important;
        height: 48px !important;
    }
    body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-star,
    [class*="elementor-kit-"] #rpp-root.rpp-wrapper button.rpp-star {
        font-size: 38px !important;
    }
}

/* ── Pulsante "Ascolta in una finestra separata" ── */
#rpp-root.rpp-wrapper .rpp-popup-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    text-align: center;
}
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-popup-btn,
#rpp-root.rpp-wrapper button.rpp-popup-btn {
    position: static !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 22px !important;
    border-radius: 999px !important;
    border: 2px solid #1E3A8A !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #1E3A8A !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(30, 58, 138, .15) !important;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease !important;
}
body[class*="elementor-kit"] #rpp-root.rpp-wrapper button.rpp-popup-btn:hover,
#rpp-root.rpp-wrapper button.rpp-popup-btn:hover,
#rpp-root.rpp-wrapper button.rpp-popup-btn:focus-visible {
    background: #1E3A8A !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(30, 58, 138, .28) !important;
}
#rpp-root.rpp-wrapper .rpp-popup-btn svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none !important;
    stroke: currentColor;
    pointer-events: none;
}
#rpp-root.rpp-wrapper .rpp-popup-hint {
    font-size: 12px;
    color: var(--rpp-text);
    opacity: .65;
}
/* Tema scuro: il pulsante resta bianco, ben leggibile sul fondo scuro */
/* Mobile */
@media (max-width: 540px) {
    #rpp-root.rpp-wrapper button.rpp-popup-btn { font-size: 14px !important; padding: 10px 16px !important; }
}
/* Dentro la finestra separata il pulsante non serve */
body.rpp-popup #rpp-root.rpp-wrapper .rpp-popup-cta {
    display: none !important;
}
