/* ── Floater — Reusable draggable floating window ──
   Usage: wrap content in .floater with .floater-bar title bar.
   JS: fathomFloater() Alpine component handles drag + collapse + persist.
*/

.floater {
  position: fixed;
  z-index: 900;
  min-width: 200px;
  border-radius: 8px;
  background: rgba(15, 25, 38, 0.88);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: box-shadow 0.2s;
  user-select: none;
}
.floater:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 1px rgba(255,255,255,0.08);
}
.floater.collapsed .floater-body {
  display: none;
}

/* ── Title bar ── */
.floater-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-dim);
  cursor: grab;
  min-height: 30px;
}
.floater-bar:active { cursor: grabbing; }
.floater.collapsed .floater-bar {
  border-bottom-color: transparent;
}

.floater-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
  pointer-events: none;
}
.floater-title svg {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  flex-shrink: 0;
}

.floater-collapse-icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
  pointer-events: none;
}
.floater.collapsed .floater-collapse-icon {
  transform: rotate(-90deg);
}

/* ── Body ── */
.floater-body {
  padding: 8px 10px;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Status dot (optional) ── */
.floater-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.floater-dot.live   { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.floater-dot.paused { background: var(--color-warning); }
.floater-dot.off    { background: var(--text-muted); }

/* ── Responsive: hide floaters on very small screens ── */
@media (max-width: 640px) {
  .floater { display: none !important; }
}

/* ── Vaporwave theme ── */
[data-theme="Vaporwave"] .floater {
  background: rgba(15, 10, 30, 0.92);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255,46,204,0.15), 0 8px 32px rgba(0,0,0,0.6);
}
[data-theme="Vaporwave"] .floater-bar {
  background: rgba(255,46,204,0.04);
}
[data-theme="Vaporwave"] .floater-title {
  text-shadow: 0 0 6px rgba(0,255,238,0.4);
}
