/* VYBEON FM 2.3.0 (Pro layer) - created by Ashwani Kumar Sharma for vybeon.online. Loaded after the page's own styles. Includes 1.1.0 - 2.2.1. */

/* FM page = FM only: the tab row is an allow-list of exactly five tabs (an injected "AI Song" item can never show, whatever element it is) */
header nav > :not(button[data-t="eq"]):not(button[data-t="milk"]):not(button[data-t="video"]):not(button[data-t="station"]):not(button[data-t="world"]) { display: none !important; }
[data-fmpro-hide] { display: none !important; }
header a[href*="vybeonstudio" i], header a[href*="ai-song" i], main a[href*="vybeonstudio" i], main a[href*="ai-song" i],
body > a[href*="vybeonstudio" i], body > a[href*="ai-song" i], body > a[href*="/studio" i] { display: none !important; }
header nav { flex-wrap: nowrap !important; }

/* the old bottom-right "minimal mode" square is replaced by the full-screen icon in the new bar (Z still works) */
html.fmpro-on .ovbtn { display: none !important; }

/* long station names stay inside the screen */
#title { max-width: calc(100vw - 24px); box-sizing: border-box; padding: 0 4px; }

/* header: the pink "fm" keeps clear of the station title / tab row. The gap is measured by fm-pro.js (--fmpro-clear), so it is right on every screen. */
:root { --fmpro-clear: 0px; }
header .brand { margin-bottom: var(--fmpro-clear); }
header { border-top: env(safe-area-inset-top, 0px) solid transparent; }     /* notched phones: the header clears the notch (0 elsewhere) */
@media (pointer: coarse) { nav button { min-height: 44px; } }

/* back / forward / full screen: white icons where the key-hint text used to be */
#fmpro-bar {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  display: none; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: #fff; text-shadow: none; transition: opacity .4s ease;
}
body[data-tab="eq"] #fmpro-bar, body[data-tab="milk"] #fmpro-bar, body[data-tab="video"] #fmpro-bar { display: flex; }
#fmpro-bar button {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #fff; opacity: .92; background: transparent; border: 0; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .35));
}
#fmpro-bar button:hover { opacity: 1; background: rgba(255, 255, 255, .16); }
#fmpro-bar button:active { transform: scale(.92); }
#fmpro-bar button svg { display: block; }
#fmpro-bar button[data-a="fs"] { margin-left: 8px; }
@media (max-width: 760px) { #fmpro-bar button { width: 52px; height: 52px; } }

/* full screen: the visual fills the screen; controls fade away after a few seconds and return on touch or movement */
html.fmpro-fs body[data-tab="eq"] header nav,
html.fmpro-fs body[data-tab="milk"] header nav,
html.fmpro-fs body[data-tab="video"] header nav,
html.fmpro-fs body[data-tab="eq"] header .home,
html.fmpro-fs body[data-tab="milk"] header .home,
html.fmpro-fs body[data-tab="video"] header .home,
html.fmpro-fs body[data-tab="eq"] header .gear,
html.fmpro-fs body[data-tab="milk"] header .gear,
html.fmpro-fs body[data-tab="video"] header .gear { display: none !important; }
html.fmpro-fs.fmpro-idle #fmpro-bar { opacity: 0; pointer-events: none; }
html.fmpro-fs.fmpro-idle { cursor: none; }
html.fmpro-fake, html.fmpro-fake body { height: 100dvh; }

/* small message ("Press Esc to exit full screen") */
#fmpro-toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -12px); z-index: 70;
  max-width: calc(100vw - 32px); padding: 6px 16px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .8em; letter-spacing: .06em;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; text-shadow: none;
}
#fmpro-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* settings: scrolls when the screen is short, ends with the credit + contact lines in the FM style */
#settings {
  max-height: calc(100vh - 66px); max-height: calc(100dvh - 66px);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--fg) transparent;
}
#settings::-webkit-scrollbar { width: 8px; }
#settings::-webkit-scrollbar-thumb { background: var(--fg); }
#settings::-webkit-scrollbar-track { background: transparent; }
#settings small { max-width: none; }
#settings .fmpro-sleep { align-items: center; }
#settings .fmpro-sleep select {
  background: var(--bg); color: var(--ac); border: 1px solid color-mix(in srgb, var(--fg) 60%, transparent); padding: 0 6px; min-width: 7.5em; cursor: pointer;
}
#settings .fmpro-sleepnote { margin-top: 2px; color: var(--ac); }
#settings .fmpro-sleepnote:empty { display: none; }
#settings .fmpro-contact { opacity: .85; font-size: .66em; letter-spacing: .08em; }
#settings .fmpro-contact a { color: var(--ac); text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--ac) 70%, transparent); overflow-wrap: anywhere; }
#settings .fmpro-contact a:hover { background: var(--band); color: var(--bandfg); text-shadow: none; }
#settings .fmpro-ver { opacity: .4; font-size: .55em; }
@media (max-width: 760px) { #settings { left: 10px; right: 10px; top: 52px; min-width: 0; max-height: calc(100vh - 62px); max-height: calc(100dvh - 62px); } }

/* Station tab: favourites strip (fixed height) above a list that starts right under it */
:root { --fmpro-favh: 40px; --fmpro-top: 110px; }
@media (max-width: 760px) { :root { --fmpro-favh: 44px; } }
#fmpro-fav {
  position: fixed; left: 0; right: 0; top: var(--fmpro-top); height: var(--fmpro-favh); z-index: 5; display: none; align-items: center; gap: 8px; padding: 0 10px;
  overflow-x: auto; overflow-y: hidden; white-space: nowrap; background: var(--bg); scrollbar-width: none; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
}
#fmpro-fav::-webkit-scrollbar { display: none; }
body[data-tab="station"] #fmpro-fav { display: flex; }
body[data-tab="station"] #p-station { top: var(--fmpro-favh); }
#fmpro-fav .k { flex: none; color: #ff5ad0; font-size: 1.05em; text-shadow: 0 0 6px #ff2bc0; }
#fmpro-fav .e { flex: none; font-size: .7em; letter-spacing: .12em; opacity: .6; }
#fmpro-fav .c {
  flex: none; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 12px; height: calc(var(--fmpro-favh) - 14px); line-height: 1;
  border: 1px solid color-mix(in srgb, var(--fg) 55%, transparent); font-size: .8em; letter-spacing: .04em; touch-action: manipulation;
}
#fmpro-fav .c:hover { background: var(--band); color: var(--bandfg); text-shadow: none; }
#fmpro-fav .c.on { border-color: var(--ac); color: var(--ac); box-shadow: inset 0 0 12px color-mix(in srgb, var(--ac) 30%, transparent); }

/* Station tab: the now-playing box only exists while a station is chosen. There is no "NOT PLAYING" placeholder any more. */
.npbox {
  box-sizing: border-box; height: calc(6.3em + 16px); margin: 6px 10px 8px; padding: 6px 14px; overflow: hidden;
}
#p-station::before { content: none !important; display: none !important; }
.npbox .v, .npbox .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npbox ol { max-height: 2.4em; overflow: hidden; }
.npbox li:nth-child(n+5) { display: none; }
@media (max-width: 760px) {
  .npbox { height: calc(6.3em + 16px); }
  .npbox li:nth-child(n+3) { display: none; }
}
.chrow .a, .chrow .b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) { #fmpro-bar, #fmpro-toast { transition: none; } }
