/* -----------------------------------------------------------------------------
 /* -----------------------------------------------------------------------------
   BlackVault OS - Radio Orb v2 Safe / Click Fix
   Does not touch app layout. Loads as a floating module after app.js.
   ----------------------------------------------------------------------------- */
:root {
  --bv-radio-bg: rgba(5, 6, 10, 0.92);
  --bv-radio-text: #f4f4f7;
  --bv-radio-muted: rgba(235,235,245,.62);
}

.bv-radio-orb {
  position: fixed;
  right: 28px;
  bottom: 104px;
  z-index: 12000;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent, #ff3158), transparent 32%);
  background:
    radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--accent, #ff3158), white 14%), transparent 22%),
    radial-gradient(circle at 50% 75%, rgba(0,0,0,.72), rgba(0,0,0,.96)),
    var(--bv-radio-bg);
  color: var(--bv-radio-text);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 24px color-mix(in srgb, var(--accent, #ff3158), transparent 50%),
    0 20px 60px rgba(0,0,0,.52),
    inset 0 0 22px rgba(255,255,255,.04);
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  user-select: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.bv-radio-orb:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: color-mix(in srgb, var(--accent, #ff3158), white 18%);
  box-shadow:
    0 0 34px color-mix(in srgb, var(--accent, #ff3158), transparent 35%),
    0 24px 70px rgba(0,0,0,.62),
    inset 0 0 24px rgba(255,255,255,.055);
}

.bv-radio-orb svg {
  width: 25px;
  height: 25px;
  filter: drop-shadow(0 0 12px var(--accent, #ff3158));
  pointer-events: none;
}

.bv-radio-orb.is-playing::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent, #ff3158), transparent 35%);
  animation: bvRadioPulse 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes bvRadioPulse {
  0% { opacity:.8; transform:scale(.88); }
  100% { opacity:0; transform:scale(1.35); }
}

.bv-radio-panel {
  position: fixed;
  right: 28px;
  bottom: 174px;
  z-index: 12001;
  width: min(410px, calc(100vw - 34px));
  max-height: min(620px, calc(100vh - 120px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--accent, #ff3158), transparent 42%);
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--accent, #ff3158), transparent 84%), transparent 42%),
    linear-gradient(180deg, rgba(18,19,28,.98), rgba(5,6,10,.98));
  color: var(--bv-radio-text);
  box-shadow:
    0 28px 90px rgba(0,0,0,.72),
    0 0 38px color-mix(in srgb, var(--accent, #ff3158), transparent 72%),
    inset 0 1px 0 rgba(255,255,255,.06);
  pointer-events: auto !important;
  isolation: isolate;
}

.bv-radio-panel.hidden {
  display: none !important;
}

#bvRadioOrb,
#bvRadioPanel,
#bvRadioPanel * {
  pointer-events: auto !important;
}

.bv-radio-head {
  padding: 15px 15px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.bv-radio-kicker {
  color: color-mix(in srgb, var(--accent, #ff3158), white 20%);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
}

.bv-radio-title {
  margin: 4px 0 2px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.bv-radio-subtitle {
  color: var(--bv-radio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.bv-radio-close {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.045);
  color: var(--bv-radio-text);
  cursor: pointer !important;
}

.bv-radio-body {
  padding: 12px;
  overflow: auto;
}

.bv-radio-now {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.035);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 11px;
}

.bv-radio-station-name {
  font-weight: 900;
  margin-bottom: 5px;
}

.bv-radio-status {
  color: var(--bv-radio-muted);
  font-size: 12px;
  line-height: 1.45;
}

.bv-radio-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.bv-radio-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.bv-radio-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.bv-radio-controls button,
.bv-radio-search button,
.bv-radio-quick button,
.bv-radio-station {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.045);
  color: var(--bv-radio-text);
  border-radius: 13px;
  padding: 9px 10px;
  cursor: pointer !important;
  transition: border-color .14s ease, background .14s ease, transform .14s ease, box-shadow .14s ease;
}

.bv-radio-controls button:hover,
.bv-radio-search button:hover,
.bv-radio-quick button:hover,
.bv-radio-station:hover {
  border-color: color-mix(in srgb, var(--accent, #ff3158), transparent 36%);
  background: color-mix(in srgb, var(--accent, #ff3158), transparent 88%);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent, #ff3158), transparent 82%);
  transform: translateY(-1px);
}

.bv-radio-search input {
  min-width: 0;
  height: 39px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--bv-radio-text);
  padding: 0 11px;
  outline: none;
}

.bv-radio-search input:focus {
  border-color: color-mix(in srgb, var(--accent, #ff3158), transparent 34%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent, #ff3158), transparent 82%);
}

.bv-radio-list {
  display: grid;
  gap: 8px;
}

.bv-radio-station {
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
}

.bv-radio-station strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.bv-radio-station small {
  grid-column: 1 / -1;
  color: var(--bv-radio-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.bv-radio-pill {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 3px 7px;
  color: color-mix(in srgb, var(--accent, #ff3158), white 18%);
  font-size: 10px;
}

.bv-radio-note {
  margin-top: 10px;
  color: rgba(235,235,245,.48);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width:760px) {
  .bv-radio-orb {
    right: 16px;
    bottom: 92px;
    z-index: 12000;
  }

  .bv-radio-panel {
    right: 14px;
    bottom: 160px;
    z-index: 12001;
    max-height: min(560px, calc(100vh - 120px));
  }
}

/* v3 — keep Radio beside Chat and Owner in the top utility group. */
body.bv7-reference-shell .bv6-floating-stack #bvRadioOrb {
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  flex: 0 0 30px;
}

body.bv7-reference-shell .bv6-floating-stack #bvRadioOrb:hover {
  transform: translateY(-1px) !important;
}

body.bv7-reference-shell .bv6-floating-stack #bvRadioOrb svg {
  width: 16px !important;
  height: 16px !important;
  filter: none;
}

body.bv7-reference-shell .bv6-floating-stack #bvRadioOrb.is-playing::after {
  inset: -3px;
}

body.bv7-reference-shell #bvRadioPanel {
  top: 48px !important;
  right: 14px !important;
  bottom: auto !important;
  max-height: calc(100vh - 64px);
  transform-origin: top right;
}

@media (max-width:760px) {
  body.bv7-reference-shell .bv6-floating-stack {
    top: 8px !important;
    right: 10px !important;
    bottom: auto !important;
    display: flex !important;
    gap: 6px !important;
  }

  body.bv7-reference-shell #bvRadioPanel {
    top: 48px !important;
    right: 10px !important;
    bottom: auto !important;
    width: min(410px, calc(100vw - 20px));
    max-height: calc(100vh - 64px);
  }
}
