/* Radiofy — reproductor global (player.js). Usa los tokens de radiofy.css. */

/* ---------- barra ---------- */
#globalPlayer.rfp{position:fixed;left:0;right:0;bottom:0;z-index:100;box-sizing:border-box;
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:18px;
  min-height:76px;padding:10px 20px 10px 14px;
  background:linear-gradient(90deg,rgba(12,16,30,.96),rgba(18,14,38,.96));
  backdrop-filter:blur(20px) saturate(1.3);-webkit-backdrop-filter:blur(20px) saturate(1.3);
  border-top:1px solid rgba(255,255,255,.07);box-shadow:0 -18px 40px -24px #000;
  font-family:var(--font);color:#fff;contain:layout paint;}
#globalPlayer.rfp::before{content:"";position:absolute;left:0;right:0;top:-1px;height:2px;
  background:linear-gradient(90deg,#22d3ee,#8b5cf6,#ec4899,#22d3ee);background-size:300% 100%;opacity:.55;transition:opacity .3s;}
#globalPlayer.rfp.is-playing::before{opacity:1;animation:gp-flow 4s linear infinite;}
#globalPlayer.rfp.is-loading::before,#globalPlayer.rfp.is-retry::before{opacity:1;animation:gp-flow 1.2s linear infinite;}
#globalPlayer.rfp.is-error::before{background:#ef4444;opacity:.8;}
@keyframes gp-flow{to{background-position:300% 0;}}

/* portada */
.rfp-art{position:relative;width:56px;height:56px;padding:0;border:0;border-radius:12px;cursor:pointer;flex-shrink:0;
  background:#0d1120;box-shadow:0 8px 22px -10px rgba(100,90,246,.9);overflow:visible;-webkit-tap-highlight-color:transparent;}
.rfp-art #gpLogo{display:block;width:100%;height:100%;border-radius:12px;object-fit:cover;background:#0d1120;transition:opacity .16s ease;}
.rfp-fade{opacity:0!important;}
.rfp-badge{position:absolute;right:-6px;bottom:-6px;width:24px;height:24px;border-radius:7px;object-fit:cover;
  background:#0d1120;border:2px solid #121428;box-shadow:0 2px 6px rgba(0,0,0,.5);}
.rfp-art-up{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:12px;
  background:rgba(8,10,20,.55);opacity:0;transition:opacity .18s;color:#fff;}
.rfp-art-up svg{width:22px;height:22px;}
.rfp-art:hover .rfp-art-up,.rfp-art:focus-visible .rfp-art-up{opacity:1;}
.rfp-art:focus-visible{outline:2px solid var(--accent-3);outline-offset:3px;}

/* texto */
.rfp-meta{min-width:0;display:flex;flex-direction:column;gap:5px;}
.rfp-line1{overflow:hidden;white-space:nowrap;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 22px),transparent);}
.rfp-title{display:inline-block;font-weight:700;font-size:.98rem;letter-spacing:-.01em;line-height:1.25;white-space:nowrap;}
.rfp-title.rfp-marq{animation:rfp-marq var(--marq-t,8s) ease-in-out 1.5s infinite alternate;}
@keyframes rfp-marq{0%,12%{transform:translateX(0)}88%,100%{transform:translateX(var(--marq))}}
.rfp-line2{display:flex;align-items:center;gap:8px;min-width:0;font-size:.8rem;color:var(--muted);}
.rfp-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.rfp-live{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:2px 8px 2px 7px;border-radius:999px;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);font-size:.68rem;letter-spacing:.04em;text-transform:uppercase;color:#c9d1e6;}
.rfp-live b{font-weight:700;}
.rfp-eq{display:inline-flex;align-items:flex-end;gap:2px;height:10px;}
.rfp-eq i{width:2.5px;height:30%;border-radius:2px;background:#5b6480;}
.is-playing .rfp-live,[data-state="playing"] .rfp-live{background:rgba(239,68,68,.14);border-color:rgba(239,68,68,.35);color:#fff;}
.is-playing .rfp-eq i,[data-state="playing"] .rfp-eq i{background:#ff5a5a;animation:gp-eq 1s ease-in-out infinite;}
.is-playing .rfp-eq i:nth-child(2),[data-state="playing"] .rfp-eq i:nth-child(2){animation-delay:-.3s;}
.is-playing .rfp-eq i:nth-child(3),[data-state="playing"] .rfp-eq i:nth-child(3){animation-delay:-.6s;}
.is-playing .rfp-eq i:nth-child(4),[data-state="playing"] .rfp-eq i:nth-child(4){animation-delay:-.15s;}
@keyframes gp-eq{0%,100%{height:25%}50%{height:100%}}
.is-error .rfp-live,[data-state="error"] .rfp-live{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.3);color:#fca5a5;text-transform:none;letter-spacing:0;}

/* grupos */
.rfp-left{display:flex;align-items:center;gap:14px;min-width:0;}
.rfp-center{display:flex;align-items:center;justify-content:center;}
.rfp-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;}
.rfp-ib{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;flex-shrink:0;
  border-radius:50%;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.05);color:#cdd4e6;cursor:pointer;
  transition:background .18s,color .18s,border-color .18s,transform .12s;-webkit-tap-highlight-color:transparent;}
.rfp-ib svg{width:19px;height:19px;}
.rfp-ib:hover{background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.18);}
.rfp-ib:active{transform:scale(.92);}
.rfp-ib:focus-visible,.rfp-main:focus-visible{outline:2px solid var(--accent-3);outline-offset:2px;}
.rfp-fav.on{color:#ff4d8d;border-color:rgba(255,77,141,.45);background:rgba(255,77,141,.12);}
.rfp-fav.on svg{fill:currentColor;}
.rfp-fav.on svg{animation:rfp-pop .35s ease;}
@keyframes rfp-pop{50%{transform:scale(1.25)}}

.rfp-main{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;flex-shrink:0;
  border:0;border-radius:50%;cursor:pointer;color:#0b0f1c;background:#fff;
  box-shadow:0 10px 26px -10px rgba(139,92,246,.95),0 0 0 0 rgba(139,92,246,.5);transition:transform .12s,box-shadow .3s;-webkit-tap-highlight-color:transparent;}
.rfp-main:hover{transform:scale(1.05);}
.rfp-main:active{transform:scale(.93);}
.rfp-main svg{width:22px;height:22px;}
.rfp-i-play svg{margin-left:3px;}
.rfp-i-play,.rfp-i-pause{display:inline-flex;}
.rfp-i-pause{display:none;}
.is-playing .rfp-i-play,.is-loading .rfp-i-play,.is-retry .rfp-i-play,
[data-state="playing"] .rfp-i-play,[data-state="loading"] .rfp-i-play,[data-state="retry"] .rfp-i-play{display:none;}
.is-playing .rfp-i-pause,.is-loading .rfp-i-pause,.is-retry .rfp-i-pause,
[data-state="playing"] .rfp-i-pause,[data-state="loading"] .rfp-i-pause,[data-state="retry"] .rfp-i-pause{display:inline-flex;}
.rfp-spin{position:absolute;inset:-4px;border-radius:50%;border:2.5px solid transparent;border-top-color:var(--accent-3);border-right-color:#8b5cf6;opacity:0;pointer-events:none;}
.is-loading .rfp-spin,.is-retry .rfp-spin,[data-state="loading"] .rfp-spin,[data-state="retry"] .rfp-spin{opacity:1;animation:rfp-rot .8s linear infinite;}
@keyframes rfp-rot{to{transform:rotate(360deg)}}
.is-playing .rfp-main{animation:rfp-glow 2.4s ease-in-out infinite;}
@keyframes rfp-glow{0%,100%{box-shadow:0 10px 26px -10px rgba(139,92,246,.95),0 0 0 0 rgba(139,92,246,.45)}50%{box-shadow:0 10px 26px -10px rgba(139,92,246,.95),0 0 0 9px rgba(139,92,246,0)}}

/* volumen */
.rfp-vol{display:flex;align-items:center;gap:6px;}
.rfp-vol .rfp-ib,.rfp-sh-vol .rfp-ib{border:0;background:transparent;}
#gpVol,#rfpShVol{-webkit-appearance:none;appearance:none;width:104px;height:4px;border-radius:4px;cursor:pointer;margin:0;
  background:linear-gradient(90deg,#fff var(--v,100%),rgba(255,255,255,.18) var(--v,100%));}
#gpVol::-webkit-slider-thumb,#rfpShVol::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#fff;border:0;box-shadow:0 1px 4px rgba(0,0,0,.4);}
#gpVol::-moz-range-thumb,#rfpShVol::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#fff;border:0;}
#gpVol:hover,#rfpShVol:hover{background:linear-gradient(90deg,var(--accent-3) var(--v,100%),rgba(255,255,255,.18) var(--v,100%));}
#gpAudio{display:none!important;}

/* ---------- móvil / tableta (barra encima de la navegación inferior) ---------- */
@media (max-width:980px){
  #globalPlayer.rfp{grid-template-columns:minmax(0,1fr) auto auto;}
  .rfp-left{gap:12px;}
  .rfp-right{order:2;gap:0;}
  .rfp-center{order:3;}
  #globalPlayer.rfp{bottom:calc(62px + env(safe-area-inset-bottom));min-height:66px;padding:8px 10px 8px 10px;gap:8px;
    margin:0 8px;border-radius:14px;border:1px solid rgba(255,255,255,.08);box-shadow:0 12px 30px -10px rgba(0,0,0,.85);}
  #globalPlayer.rfp::before{left:14px;right:14px;top:auto;bottom:0;height:2px;border-radius:2px;}
  .rfp-art{width:48px;height:48px;border-radius:10px;}
  .rfp-art #gpLogo,.rfp-art-up{border-radius:10px;}
  .rfp-art-up{display:none;}
  .rfp-badge{width:20px;height:20px;border-radius:6px;right:-4px;bottom:-4px;}
  .rfp-meta{cursor:pointer;}
  .rfp-title{font-size:.92rem;}
  .rfp-vol,.rfp-desk{display:none!important;}
  .rfp-right .rfp-fav{border:0;background:transparent;}
  .rfp-right .rfp-fav:not(.on){color:rgba(255,255,255,.7);}
  .rfp-main{width:44px;height:44px;}
  .rfp-main svg{width:20px;height:20px;}
  body.has-player{padding-bottom:calc(140px + env(safe-area-inset-bottom));}
  body.has-player .whatsapp-fab{bottom:calc(146px + env(safe-area-inset-bottom))!important;}
}
@media (max-width:360px){ .rfp-right .rfp-fav{display:none;} .rfp-live{padding:2px 6px;} }

/* ---------- vista ampliada ---------- */
.rfp-sheet{position:fixed;inset:0;z-index:1200;display:block;overflow:hidden;background:#070a14;color:#fff;font-family:var(--font);
  opacity:0;transform:translateY(24px);transition:opacity .26s ease,transform .3s cubic-bezier(.2,.8,.2,1);}
.rfp-sheet.open{opacity:1;transform:none;}
.rfp-sheet[hidden]{display:none;}
.rfp-sh-bg{position:absolute;inset:-60px;pointer-events:none;}
.rfp-sh-bg img{width:100%;height:100%;object-fit:cover;filter:blur(60px) saturate(1.5) brightness(.55);transform:scale(1.15);transition:opacity .4s;}
.rfp-sh-bg::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,10,20,.35) 0%,rgba(7,10,20,.75) 55%,#070a14 100%);}
.rfp-sh-in{position:relative;height:100%;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;
  padding:max(14px,env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));transition:transform .2s;}
.rfp-sh-top{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:10px;max-width:1100px;margin:0 auto 18px;}
.rfp-sh-top .rfp-ib{width:44px;height:44px;}
.rfp-sh-top .rfp-ib svg{width:22px;height:22px;}
.rfp-sh-kicker{text-align:center;min-width:0;}
.rfp-sh-kicker small{display:block;font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.6);}
.rfp-sh-kicker a{display:block;font-weight:700;font-size:.92rem;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rfp-sh-kicker a:hover{text-decoration:underline;}
.rfp-sh-body{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:1fr;gap:22px;}
.rfp-sh-cover{display:flex;justify-content:center;}
.rfp-sh-art{position:relative;width:min(78vw,380px);aspect-ratio:1;}
.rfp-sh-art #rfpShArt{width:100%;height:100%;object-fit:cover;border-radius:18px;background:#111726;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.85),0 0 0 1px rgba(255,255,255,.06);transition:opacity .16s ease,transform .4s ease;}
.rfp-sheet:not([data-state="playing"]) #rfpShArt{transform:scale(.94);}
.rfp-sh-art .rfp-badge{width:54px;height:54px;border-radius:14px;right:-10px;bottom:-10px;border-width:3px;}
.rfp-sh-side{min-width:0;display:flex;flex-direction:column;gap:18px;max-width:520px;width:100%;margin:0 auto;}
.rfp-sh-info{display:flex;align-items:center;gap:14px;}
.rfp-sh-txt{min-width:0;flex:1;}
.rfp-sh-txt h2{margin:0;font-family:var(--font-head,var(--font));font-size:clamp(1.35rem,4.6vw,2rem);line-height:1.15;letter-spacing:-.02em;
  overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.rfp-sh-txt p{margin:6px 0 0;font-size:1rem;color:rgba(255,255,255,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rfp-sh-info .rfp-fav{width:46px;height:46px;}
.rfp-sh-info .rfp-fav svg{width:22px;height:22px;}
.rfp-sh-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.rfp-live-lg{font-size:.72rem;padding:4px 11px 4px 9px;}
.rfp-sh-lis{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;color:rgba(255,255,255,.75);}
.rfp-sh-lis[hidden]{display:none;}
.rfp-sh-lis svg{width:16px;height:16px;}
.rfp-sh-ctrl{display:flex;align-items:center;justify-content:center;gap:34px;padding:4px 0;}
.rfp-main-lg{width:76px;height:76px;}
.rfp-main-lg svg{width:32px;height:32px;}
.rfp-sh-small{width:auto;height:auto;flex-direction:column;gap:4px;border:0;background:transparent;border-radius:12px;padding:6px 8px;color:rgba(255,255,255,.75);}
.rfp-sh-small:hover{background:rgba(255,255,255,.08);}
.rfp-sh-small svg{width:22px;height:22px;}
.rfp-sh-small small{font-size:.68rem;font-weight:600;}
.rfp-sh-small.on{color:var(--accent-3);}
.rfp-sh-small{text-decoration:none;}
.rfp-only-mob{display:none!important;}
@media (max-width:980px){ .rfp-only-desk{display:none!important;} .rfp-only-mob{display:inline-flex!important;} }
.rfp-sleep-menu{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;font-size:.8rem;color:rgba(255,255,255,.7);}
.rfp-sleep-menu[hidden]{display:none;}
.rfp-sleep-menu button{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;border-radius:999px;padding:6px 12px;font:600 .78rem var(--font);cursor:pointer;}
.rfp-sleep-menu button:hover,.rfp-sleep-menu button.on{background:#fff;color:#0b0f1c;}
.rfp-sh-vol{display:flex;align-items:center;gap:8px;}
.rfp-sh-vol #rfpShVol{flex:1;width:auto;}
.rfp-sh-links{display:flex;gap:8px;flex-wrap:wrap;}
.rfp-sh-links[hidden]{display:none;}
.rfp-sh-links a,.rfp-sh-links button{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:999px;cursor:pointer;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#fff;font:600 .8rem var(--font);text-decoration:none;}
.rfp-sh-links a:hover,.rfp-sh-links button:hover{background:rgba(255,255,255,.12);}
.rfp-sh-links svg{width:16px;height:16px;}
#rfpShSpotify svg{color:#1ed760;}
#rfpShYoutube svg{color:#ff3d3d;}
.rfp-sh-hist{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:16px;padding:14px 14px 8px;}
.rfp-sh-hist[hidden]{display:none;}
.rfp-sh-hist h3{margin:0 0 8px;font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.6);}
.rfp-sh-hist ol{list-style:none;margin:0;padding:0;}
.rfp-sh-hist li{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:7px 0;border-top:1px solid rgba(255,255,255,.05);}
.rfp-sh-hist li:first-child{border-top:0;}
.rfp-sh-hist img{width:42px;height:42px;border-radius:8px;object-fit:cover;background:#111726;}
.rfp-sh-hist b{display:block;font-size:.88rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rfp-sh-hist span{display:block;font-size:.78rem;color:rgba(255,255,255,.6);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rfp-sh-hist time{font-size:.72rem;color:rgba(255,255,255,.45);white-space:nowrap;}
.rfp-sh-note{display:flex;align-items:center;gap:10px;margin:0;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04);font-size:.84rem;color:rgba(255,255,255,.65);}
.rfp-sh-note[hidden]{display:none;}
.rfp-sh-note svg{width:20px;height:20px;flex-shrink:0;color:var(--accent-3);}

@media (min-width:900px){
  .rfp-sh-in{padding:28px 40px 40px;}
  .rfp-sh-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:56px;min-height:calc(100vh - 140px);}
  .rfp-sh-art{width:min(42vw,480px);}
  .rfp-sh-side{margin:0;}
  .rfp-sh-ctrl{justify-content:flex-start;gap:28px;}
  .rfp-sleep-menu{justify-content:flex-start;}
}
body.rfp-sheet-open{overflow:hidden;}
body.rfp-sheet-open .whatsapp-fab{display:none!important;}

/* aviso breve */
.rfp-toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));z-index:1300;transform:translate(-50%,16px);opacity:0;pointer-events:none;
  background:#fff;color:#0b0f1c;font:600 .86rem var(--font);padding:10px 16px;border-radius:999px;box-shadow:0 12px 30px -8px rgba(0,0,0,.6);transition:.25s;white-space:nowrap;max-width:92vw;overflow:hidden;text-overflow:ellipsis;}
.rfp-toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto;}
.rfp-toast a{color:#6d28d9;margin-left:6px;}
@media (max-width:980px){ .rfp-toast{bottom:calc(150px + env(safe-area-inset-bottom));} }

@media (prefers-reduced-motion:reduce){
  #globalPlayer.rfp::before,.rfp-eq i,.rfp-title.rfp-marq,.is-playing .rfp-main{animation:none!important;}
  .rfp-sheet{transition:opacity .15s;transform:none;}
}
@media print{ #globalPlayer,.rfp-sheet,.rfp-toast{display:none!important;} }
