/* Voice Reader — floating control bar. Futuristic-minimal glass pill.
   All selectors scoped under .vr-bar / .vr-panel; buttons reset with `all: unset`. */
.vr-bar {
  position: fixed;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 8px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(20, 24, 34, 0.82), rgba(12, 14, 20, 0.86));
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(120, 190, 255, 0.16);
  border-radius: 999px;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 22px rgba(70, 150, 255, 0.10);
  color: #eaf2ff;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  cursor: grab;
  opacity: 1;
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.vr-bar--dragging { cursor: grabbing; transition: none; box-shadow: 0 14px 44px rgba(0,0,0,0.55), 0 0 26px rgba(70,150,255,0.18); }

.vr-bar--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

/* drag grip dots */
.vr-bar__grip {
  width: 10px; height: 18px; margin-left: 3px; flex: none;
  background-image: radial-gradient(currentColor 1.1px, transparent 1.2px);
  background-size: 5px 6px;
  color: rgba(150, 190, 255, 0.45);
  border-radius: 3px;
}

/* mode tag */
.vr-bar__mode {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb6ff;
}
.vr-bar__mode:empty { display: none; }

/* generic button reset */
.vr-bar__btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  color: #c8d6ee;
  font-size: 14px;
  transition: background 0.14s ease, color 0.14s ease, transform 0.08s ease;
}
.vr-bar__btn:hover { background: rgba(140, 190, 255, 0.14); color: #fff; }
.vr-bar__btn:active { transform: scale(0.92); }

/* play / pause — accent gradient orb */
.vr-bar__play {
  position: relative;
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #38e8ff, #6a7bff 70%, #a45bff);
  color: #06121f;
  box-shadow: 0 2px 10px rgba(74, 130, 255, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.vr-bar__play:hover { filter: brightness(1.08); }
.vr-bar__play:active { transform: scale(0.94); }

.vr-bar__ico { position: absolute; display: none; }
.vr-bar__ico--play {
  display: block; width: 0; height: 0;
  border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}
.vr-bar__ico--pause { gap: 3px; }
.vr-bar__ico--pause i { display: block; width: 3px; height: 12px; background: currentColor; border-radius: 1px; }
.vr-bar--playing .vr-bar__ico--play { display: none; }
.vr-bar--playing .vr-bar__ico--pause { display: flex; }

.vr-bar__ico--spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(6, 18, 31, 0.35); border-top-color: #06121f;
  animation: vr-spin 0.7s linear infinite;
}
.vr-bar--loading .vr-bar__ico--play,
.vr-bar--loading .vr-bar__ico--pause { display: none; }
.vr-bar--loading .vr-bar__ico--spin { display: block; }
@keyframes vr-spin { to { transform: rotate(360deg); } }

/* speed cluster */
.vr-bar__speed { display: inline-flex; align-items: center; gap: 2px; }
.vr-bar__sd, .vr-bar__su { width: 24px; height: 24px; font-size: 15px; font-weight: 600; }
.vr-bar__speed-label {
  min-width: 38px; text-align: center;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
  font-size: 12.5px; font-weight: 600; color: #dce8ff;
}

.vr-bar__cc {
  width: auto; padding: 0 7px; height: 22px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: #9fb2d4;
  border: 1px solid rgba(140, 190, 255, 0.22);
}
.vr-bar__cc--on { color: #06121f; background: linear-gradient(135deg, #38e8ff, #6a7bff); border-color: transparent; }
.vr-bar__cc--on:hover { color: #06121f; filter: brightness(1.08); }
.vr-bar__gear { font-size: 15px; color: #9fb2d4; }
.vr-bar__gear:hover { color: #fff; transform: rotate(45deg); }
.vr-bar__sep { width: 1px; height: 18px; background: rgba(140, 190, 255, 0.18); margin: 0 1px; }
.vr-bar__close { font-size: 11px; color: #7e8aa3; }
.vr-bar__close:hover { color: #ff7a90; background: rgba(255, 122, 144, 0.14); }

/* ---- settings panel (anchored above the bar) ------------------------------- */
.vr-panel {
  position: absolute;
  left: 8px; right: 8px; bottom: calc(100% + 10px);
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(22, 26, 37, 0.96), rgba(13, 15, 22, 0.97));
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(120, 190, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 22px rgba(70, 150, 255, 0.10);
  cursor: default;
}
.vr-panel--hidden { display: none; }
.vr-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vr-panel__row > span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #93a6c6;
}
.vr-panel select {
  all: unset;
  flex: 1; max-width: 200px;
  box-sizing: border-box;
  padding: 6px 10px;
  background: rgba(10, 14, 22, 0.85);
  border: 1px solid rgba(120, 190, 255, 0.22);
  border-radius: 8px;
  color: #eaf2ff; font-size: 12.5px; cursor: pointer;
}
.vr-panel select:hover { border-color: rgba(120, 190, 255, 0.4); }
.vr-panel select option { background: #11151e; color: #eaf2ff; }

@media (prefers-reduced-motion: reduce) {
  .vr-bar, .vr-bar__btn { transition: none; }
  .vr-bar__ico--spin { animation-duration: 1.2s; }
}
