/* VYBEON Encore 1.0.1 - the final polish. Created by Ashwani Kumar Sharma.
   Loaded last, additive only. It does not decide whether a provider (YouTube / SoundCloud / ...) player is shown: Nova does, as before Deck
   (out of sight until the eye button is tapped; localStorage.novaAlwaysShow = '1' keeps it on screen). When the player IS shown, this file
   only makes sure it is never smaller than 200 x 200 on the screen.
   Switch it off for a test:  localStorage.vybEncore = 'off'  and reload (encore.js then disables this style sheet). */

/* ---------- 0. the sidebar "Now playing" card is gone (the player bar at the bottom shows the same song) ----------
   Phase 3 adds it above the sidebar footer. It is hidden here, and the footer keeps its normal place at the bottom of the sidebar. */
html body .p3-np{display:none!important}
html body .p3-np:not([hidden])+.side-foot{margin-top:auto}

/* ---------- 1. voice search: the typing bar takes the whole pill, the mic sits at the far right ----------
   Enterprise 1.0 has a rule that gives the pill "display: revert !important" (to keep it visible on phones). For a <form> that
   means display:block, which made the input shrink to its own width and pulled the mic to the left. It is a flex row again. */
html body .voice form.voice-pill,
html[data-en] body .voice form.voice-pill{display:flex!important;align-items:center;gap:6px;width:100%;min-height:54px;box-sizing:border-box}
html body .voice form.voice-pill input{flex:1 1 auto;min-width:0;width:auto;max-width:none;text-overflow:ellipsis}
html body .voice form.voice-pill .icon-btn{flex:none;margin-left:auto;width:42px;height:42px}
html body .voice .voice-bottom{width:min(94vw,640px)}

/* ---------- 2. the accent words in the hero ("one place.", "Slow down.") stay bright ----------
   Avava puts a dark text-shadow on the whole heading; on a gradient-filled word that shadow is painted over the gradient and turns it brown. */
html[data-theme=dark] .hero:not(.live) h1 em,
html[data-avava][data-theme=dark] .hero:not(.live) h1 em{text-shadow:none;filter:drop-shadow(0 2px 12px #000a)}

/* ---------- 3. artists are round, everywhere ---------- */
html .cover.round,html .card.artist .cover,html .entity-head .cover.round,html .sg .cover.round{border-radius:50%!important}

/* ---------- 4. album / artist / playlist / shared-song page on a phone: the cover gets room, centred ---------- */
@media (max-width:760px){
  html[data-view=mobile] .entity-head{flex-direction:column;align-items:center;text-align:center;gap:14px;margin-top:2px}
  html[data-view=mobile] .entity-head>.cover{width:min(60vw,248px);font-size:62px;box-shadow:0 26px 56px -22px hsl(var(--enc-hue,18) 80% 55%/.55),0 12px 30px -12px #000b}
  html[data-view=mobile] .entity-head>div:not(.cover){width:100%;min-width:0}
  html[data-view=mobile] .entity-head h1{overflow-wrap:anywhere}
  html[data-view=mobile] .entity-head .row{justify-content:center}
}
@media (max-height:560px) and (orientation:landscape){
  html[data-view=mobile] .entity-head{flex-direction:row;align-items:flex-end;text-align:left}
  html[data-view=mobile] .entity-head>.cover{width:clamp(110px,22vw,160px)}
  html[data-view=mobile] .entity-head .row{justify-content:flex-start}
}

/* ---------- 5. touch: no grey tap flash, no 300 ms delay, a small press response on phones ---------- */
a,button,[role=button],[data-play],.card,.trow,.chip,.tile,.btn,.icon-btn{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
@media (hover:none){
  .card:active,.trow:active,.chip:active,.tile:active,.btn:active{transform:scale(.978);transition:transform .08s ease-out}
  .icon-btn:active,.play-btn:active{transform:scale(.92);transition:transform .08s ease-out}
}

/* ---------- 6. musical touches while a song plays ---------- */
/* a thin line of the song's own colour glides along the top edge of the player bar */
.player::before{content:"";position:absolute;left:14px;right:14px;top:-1px;height:2px;border-radius:2px;pointer-events:none;opacity:0;transition:opacity .4s;
  background:linear-gradient(90deg,transparent 0,hsl(var(--enc-hue,18) 90% 62%) 35%,hsl(calc(var(--enc-hue,18) + 40) 95% 66%) 65%,transparent 100%);background-size:220% 100%}
.player.playing::before{opacity:.85;animation:encGlide 3.6s linear infinite}
@keyframes encGlide{from{background-position:120% 0}to{background-position:-120% 0}}
/* the song's cover in the player bar carries a soft glow of its colour */
.player.playing .p-cover{box-shadow:0 0 0 1px hsl(var(--enc-hue,18) 80% 60%/.35),0 6px 22px -6px hsl(var(--enc-hue,18) 90% 55%/.55)}
/* the song that is playing in a list */
.trow.cur{box-shadow:inset 3px 0 0 hsl(var(--enc-hue,18) 90% 60%)}

/* ---------- 7. Luna's round button steps back while the page is scrolling, so it never covers a like / more button ----------
   The visible Luna is Enterprise's (.en-root, the older #lunaFab is switched off by Enterprise); both are covered. The panel, when it is open, is never touched. */
html body .en-root,html body #lunaFab{transition:opacity .25s ease,transform .25s ease}
body.enc-scrolling:not(.voice-open) .en-root:not(.en-open){opacity:.3;transform:scale(.84);transform-origin:100% 100%}
body.enc-scrolling:not(.voice-open):not(.np-open) #lunaFab{opacity:.3;transform:scale(.84)}
body.enc-scrolling .en-root .en-tip,body.enc-scrolling #lunaTip{opacity:0}
/* the voice screen has its own mic: Luna and her speech bubble stay out of it (the old Luna button was hidden there too) */
body.voice-open .en-root,body.voice-open #lunaFab,body.voice-open #lunaTip,body.np-open #lunaTip{opacity:0;pointer-events:none}
/* ...and out of the way of a pop-up sheet (she sat right beside its edge) */
body:has(#modal:not([hidden])) .en-root:not(.en-open),body:has(#modal:not([hidden])) #lunaFab,body:has(#modal:not([hidden])) #lunaTip{opacity:0;pointer-events:none}

/* ---------- 8. when the YouTube player is shown, it is never smaller than 200 x 200 on the screen ----------
   Enterprise 1.0 shrinks the whole page a little on some screens (html zoom, kept in --en-z). That made the YouTube tile measure
   about 195 x 195 on the screen. This only makes the tile grow, never shrink, and never changes whether it is shown. */
html body .yt-dock:not(.big){min-width:calc(204px / var(--en-z,1) + 2px)}
html body .yt-dock .yt-frame{min-height:calc(204px / var(--en-z,1))}

/* ---------- 9. Frequency Lab: the wave no longer blows out to white ----------
   The Lab draws its aurora with additive blending; with five layers the middle of the wave added up to pure white. In the dark theme it is
   now recoloured warm (the same trick Avava uses for the voice screen) and fades toward the bottom, so the crests stay the bright part. */
html[data-theme=dark] #labViz{-webkit-mask-image:linear-gradient(to top,transparent 0%,rgba(0,0,0,.5) 40%,#000 72%);mask-image:linear-gradient(to top,transparent 0%,rgba(0,0,0,.5) 40%,#000 72%);filter:sepia(1) saturate(3.2) hue-rotate(-14deg) brightness(.9)}

/* ---------- 10. small finishes ---------- */
::selection{background:color-mix(in srgb,var(--vio,#ff5a36) 38%,transparent)}
.toast{backdrop-filter:blur(14px) saturate(1.3);-webkit-backdrop-filter:blur(14px) saturate(1.3)}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .player.playing::before{animation:none;opacity:.6}
  body.enc-scrolling .en-root,body.enc-scrolling #lunaFab{transform:none}
  .card:active,.trow:active,.chip:active,.tile:active,.btn:active,.icon-btn:active,.play-btn:active{transform:none}
}
