/* ===========================================================
   AdHush — Shared design tokens & primitives.
   Consumed by both panel.css (full app) and mini.css (overlay).
   Edit values here and BOTH surfaces stay in lockstep.
   =========================================================== */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/Geist.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/GeistMono.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/InstrumentSerif.woff2') format('woff2');
}

:root {
  /* ------- Surfaces ---------------------------------------- */
  --bg-window:      #0a0a12;
  --bg-titlebar:    rgba(255,255,255,0.03);

  /* Glass / panels — used by the panel cards, NOT the mini pill */
  --glass-1:        rgba(255,255,255,0.025);
  --glass-2:        rgba(255,255,255,0.045);
  --glass-3:        rgba(255,255,255,0.075);

  /* True prism glass — used by the mini pill */
  --pill-tint:      rgba(15, 17, 25, 0.18);
  --pill-blur:      blur(4px) saturate(125%);

  /* ------- Hairlines --------------------------------------- */
  --line-1:         rgba(255,255,255,0.06);
  --line-2:         rgba(255,255,255,0.10);
  --line-3:         rgba(255,255,255,0.16);
  --line-soft:      rgba(255,255,255,0.10);

  /* ------- Ink --------------------------------------------- */
  --ink-0:          #f6f6fb;
  --ink-1:          #d8d8e3;
  --ink-2:          #9a9ab0;
  --ink-3:          #6b6b80;
  --ink-4:          #44445a;

  /* ------- Accents ----------------------------------------- */
  --cyan:           #5cf2ea;
  --violet:         #8a7cff;
  --green:          #4ade80;
  --amber:          #fbbf24;
  --red:            #ff5c6f;

  --accent:         var(--cyan);
  --accent-soft:    rgba(92, 242, 234, 0.16);
  --accent-line:    rgba(92, 242, 234, 0.32);

  /* State-dot palette — used in BOTH surfaces */
  --dot-idle:        #fbbf24;   /* amber: ready, no audio */
  --dot-observing:   #60a5fa;
  --dot-playing:     #34d399;   /* green: music passing through */
  --dot-ad-muted:    #ff5c6f;   /* red:   ad muted, pulses */
  --dot-paused:      #71717a;
  --dot-muted:       #ff5c6f;

  /* ------- Type -------------------------------------------- */
  --font-display:   "Instrument Serif", "Times New Roman", serif;
  --font-sans:      "Geist", -apple-system, "Segoe UI Variable", "Segoe UI", sans-serif;
  --font-mono:      "Geist Mono", ui-monospace, "Cascadia Mono", monospace;

  /* ------- Easing ------------------------------------------ */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-morph:     cubic-bezier(0.55, 0, 0.25, 1);

  /* ------- Radii ------------------------------------------- */
  --r-window:       8px;
  --r-card:         12px;
  --r-input:        10px;
  --r-pill:         10px;     /* mini pill corner */
  --r-btn:          6px;
}

/* ===========================================================
   Universal tooltip — appears above any element with [data-tip].
   Wrap-friendly so longer copy doesn't run off the screen.
   =========================================================== */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 17, 25, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 16px rgba(0,0,0,0.55);
  white-space: normal;
  width: max-content;
  max-width: 180px;
  text-align: center;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
}
[data-tip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(15, 17, 25, 0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 1000;
}
[data-tip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0.35s;
}
[data-tip]:hover::before {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.35s;
}
/* Some buttons want the tooltip below instead of above (window-button row). */
[data-tip-pos="below"]::after {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
}
[data-tip-pos="below"]::before {
  bottom: auto;
  top: calc(100% + 4px);
  border-top-color: transparent;
  border-bottom-color: rgba(15, 17, 25, 0.95);
}
[data-tip-pos="below"]:hover::after {
  transform: translateX(-50%) translateY(0);
}
