/* =========================================================
   BASE
   ========================================================= */
.rp-player{
  --rp-bar:#0d0d0d;
  --rp-btn:#f36c21;
  --rp-accent:#f36c21;
  --rp-text:#ffffff;
  --rp-ink:#111111;
  --rp-track:rgba(255,255,255,.30);
  --rp-line:rgba(255,255,255,.18);
  box-sizing:border-box;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.rp-player *{box-sizing:border-box;}
.rp-player .rp-logo{display:block;object-fit:cover;}

.rp-icon{width:22px;height:22px;fill:currentColor;display:block;flex:0 0 auto;}
.rp-icon--pause{display:none;}
.rp-icon--muted{display:none;}
.rp-player.is-playing .rp-icon--play{display:none;}
.rp-player.is-playing .rp-icon--pause{display:block;}
.rp-player.is-muted .rp-icon--mute{display:none;}
.rp-player.is-muted .rp-icon--muted{display:block;}

.rp-btn{
  border:0;background:transparent;padding:0;margin:0;
  cursor:pointer;color:inherit;font:inherit;
  display:inline-flex;align-items:center;justify-content:center;
  -webkit-tap-highlight-color:transparent;
}
.rp-btn:focus-visible{outline:2px solid var(--rp-accent);outline-offset:2px;}

/* =========================================================
   BARRA FIXA E VERSÃO INLINE
   ========================================================= */
.rp-bar{
  position:fixed;left:0;right:0;bottom:0;
  z-index:999999;
}
body.rp-has-bar{padding-bottom:var(--rp-bar-h,68px);}

.rp-player--bar,
.rp-player--inline{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  min-height:66px;
  padding-left:18px;
  padding-right:0;
  background:var(--rp-bar,#0d0d0d);
  color:var(--rp-text,#fff);
  border-top:1px solid var(--rp-line,rgba(255,255,255,.18));
}
.rp-player--bar{
  padding-bottom:env(safe-area-inset-bottom,0px);
  box-shadow:0 -8px 28px rgba(0,0,0,.28);
}
.rp-player--inline{
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--rp-line,rgba(255,255,255,.18));
  box-shadow:0 6px 22px rgba(0,0,0,.14);
}

/* ---- marca ---- */
.rp-brand{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-width:0;}
.rp-brand .rp-logo{width:34px;height:34px;border-radius:8px;}
.rp-brand-name{
  font-size:17px;font-weight:800;letter-spacing:.10em;text-transform:uppercase;
  white-space:nowrap;
}
.rp-logo--placeholder{
  width:34px;height:34px;border-radius:8px;
  background:var(--rp-btn,#f36c21);opacity:.35;
}

/* ---- divisor ---- */
.rp-divider{
  flex:0 0 auto;width:1px;height:26px;
  background:var(--rp-line,rgba(255,255,255,.18));
}

/* ---- programa e horário ---- */
.rp-air{
  display:flex;align-items:baseline;gap:10px;flex:0 1 auto;
  min-width:0;
}
.rp-prog{
  font-size:14px;font-weight:600;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:280px;
}
.rp-slot{
  font-size:12.5px;font-weight:600;line-height:1.2;
  color:var(--rp-accent,#f36c21);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.rp-grow{flex:1 1 auto;min-width:8px;}

/* ---- volume ---- */
.rp-volume{display:flex;align-items:center;gap:10px;flex:0 0 auto;}
.rp-btn--mute{width:26px;height:26px;opacity:.85;transition:opacity .15s ease;}
.rp-btn--mute:hover{opacity:1;}

.rp-range{
  -webkit-appearance:none;appearance:none;
  width:110px;height:3px;border-radius:3px;
  background:var(--rp-track,rgba(255,255,255,.30));
  cursor:pointer;
  margin:0;
}
.rp-range::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;
  width:13px;height:13px;border-radius:50%;
  background:var(--rp-text,#fff);
  border:0;cursor:pointer;
  box-shadow:0 0 0 1px rgba(0,0,0,.15);
}
.rp-range::-moz-range-thumb{
  width:13px;height:13px;border-radius:50%;
  background:var(--rp-text,#fff);
  border:0;cursor:pointer;
}
.rp-range:focus-visible{outline:2px solid var(--rp-accent);outline-offset:4px;}

/* ---- bloco do botão (canto direito) ---- */
.rp-playblock{
  flex:0 0 auto;
  align-self:stretch;
  width:84px;
  min-height:66px;
  background:var(--rp-btn,#f36c21);
  color:var(--rp-ink,#111);
  border-radius:0;
  transition:filter .16s ease,transform .12s ease;
}
.rp-playblock:hover{filter:brightness(1.08);}
.rp-playblock:active{transform:scale(.97);}
.rp-playblock:focus-visible{outline:2px solid var(--rp-text,#fff);outline-offset:-4px;}
.rp-playblock .rp-icon{width:24px;height:24px;}

.rp-status{
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;
}

/* =========================================================
   POPUP FLUTUANTE
   ========================================================= */
.rp-player--popup{
  position:fixed;
  z-index:999999;
  bottom:calc(20px + env(safe-area-inset-bottom,0px));
  right:20px;
  width:62px;height:62px;
  display:block;
}
.rp-pop--bl{right:auto;left:20px;}
.rp-player--popup audio{display:none;}

.rp-card{
  position:absolute;
  bottom:calc(100% + 12px);
  right:0;
  width:320px;
  max-width:calc(100vw - 40px);
  padding:14px;
  border-radius:16px;
  background:var(--rp-bar,#0d0d0d);
  color:var(--rp-text,#fff);
  border:1px solid var(--rp-line,rgba(255,255,255,.18));
  box-shadow:0 16px 44px rgba(0,0,0,.32);
  opacity:0;
  visibility:hidden;
  transform:translateY(10px) scale(.94);
  transform-origin:bottom right;
  transition:opacity .2s ease,transform .2s ease,visibility .2s;
}
.rp-pop--bl .rp-card{right:auto;left:0;transform-origin:bottom left;}
.rp-player--popup.is-open .rp-card{opacity:1;visibility:visible;transform:none;}

.rp-card-top{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.rp-card-top .rp-logo{width:44px;height:44px;border-radius:10px;}
.rp-card-top .rp-logo--placeholder{width:44px;height:44px;}

.rp-card-info{display:flex;flex-direction:column;gap:3px;flex:1 1 auto;min-width:0;}
.rp-card-info .rp-name{
  font-size:14px;font-weight:700;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.rp-card-info .rp-air{gap:6px;}
.rp-card-info .rp-prog{
  font-size:12px;font-weight:500;opacity:.85;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;
}
.rp-card-info .rp-slot{font-size:11.5px;}

.rp-btn--collapse{width:28px;height:28px;border-radius:8px;opacity:.5;flex:0 0 auto;}
.rp-btn--collapse:hover{opacity:1;background:var(--rp-line,rgba(255,255,255,.18));}

.rp-card-bottom{display:flex;align-items:center;gap:14px;}
.rp-card-bottom .rp-volume{flex:1 1 auto;min-width:0;}
.rp-card-bottom .rp-range{flex:1 1 auto;width:100%;}

.rp-btn--toggle{
  width:46px;height:46px;flex:0 0 auto;
  border-radius:50%;
  background:var(--rp-btn,#f36c21);
  color:var(--rp-ink,#111);
  transition:filter .16s ease,transform .12s ease;
}
.rp-btn--toggle:hover{filter:brightness(1.08);}
.rp-btn--toggle:active{transform:scale(.95);}

/* ---- bolha ---- */
.rp-bubble{
  position:relative;
  width:62px;height:62px;
  border:0;padding:0;border-radius:50%;
  cursor:pointer;overflow:visible;
  display:flex;align-items:center;justify-content:center;
  background:var(--rp-btn,#f36c21);
  box-shadow:0 10px 28px rgba(0,0,0,.28);
  transition:transform .18s ease;
  -webkit-tap-highlight-color:transparent;
}
.rp-bubble:hover{transform:scale(1.05);}
.rp-bubble:active{transform:scale(.95);}
.rp-bubble:focus-visible{outline:2px solid var(--rp-text,#fff);outline-offset:3px;}
.rp-bubble .rp-logo{width:100%;height:100%;border-radius:50%;object-fit:cover;}

.rp-bubble-letter{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:26px;font-weight:800;line-height:1;
  color:var(--rp-ink,#111);text-transform:uppercase;user-select:none;
}

.rp-player--popup.is-playing .rp-bubble::after{
  content:"";
  position:absolute;inset:-5px;
  border-radius:50%;
  border:2px solid var(--rp-btn,#f36c21);
  animation:rp-pulse 1.8s ease-out infinite;
  pointer-events:none;
}
@keyframes rp-pulse{
  0%{transform:scale(.85);opacity:.85}
  70%{transform:scale(1.35);opacity:0}
  100%{transform:scale(1.35);opacity:0}
}

/* =========================================================
   INDICADOR DE CARREGAMENTO DO PJAX
   ========================================================= */
html.rp-loading::before{
  content:"";
  position:fixed;top:0;left:0;height:3px;width:100%;
  background:var(--rp-accent,#f36c21);
  z-index:1000000;
  animation:rp-progress 1.2s ease-in-out infinite;
  transform-origin:0 50%;
}
@keyframes rp-progress{
  0%{transform:scaleX(0);opacity:1}
  50%{transform:scaleX(.7);opacity:1}
  100%{transform:scaleX(1);opacity:0}
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width:820px){
  .rp-player--bar,
  .rp-player--inline{gap:10px;padding-left:12px;min-height:60px;}
  .rp-brand-name{font-size:13px;letter-spacing:.06em;}
  .rp-brand .rp-logo,
  .rp-logo--placeholder{width:30px;height:30px;}
  .rp-prog{font-size:12.5px;max-width:38vw;}
  .rp-slot{font-size:11.5px;}
  .rp-playblock{width:66px;min-height:60px;}
  .rp-playblock .rp-icon{width:22px;height:22px;}
  body.rp-has-bar{padding-bottom:var(--rp-bar-h,62px);}
}

@media (max-width:620px){
  .rp-divider{display:none;}
  .rp-range{display:none;}
  .rp-player--bar,
  .rp-player--inline{gap:8px;}
  .rp-air{flex-wrap:wrap;gap:0 8px;}
}