/* Cadence-feature stylesheet.
 *
 * Owns every selector that exists ONLY for the cadence plane: bucket-band
 * backgrounds, bucket labels, and the topbar Workspace/Cadence toggle.
 *
 * Lifted out of styles/components.css (F37) so the cadence subsystem stays
 * removable as a unit -- if we ever decide to delete cadence, this file +
 * the JS modules under js/cadence and js/topbar/plane-toggle.js plus the
 * <link> in index.html are the surface that disappears. The shared
 * components.css stays plane-agnostic.
 */

/* ---- Plane toggle (pill variant -- topbar) ---- */
.plane-toggle {
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 6px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.plane-toggle-pill {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  text-align: center;
}

.plane-toggle-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.plane-toggle-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plane-toggle-pill.active:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plane-toggle-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* ---- Cadence band backgrounds ---- */
.cadence-band-bg-even {
  background: rgba(255, 255, 255, 0.02);
}

.cadence-band-bg-odd {
  background: rgba(255, 255, 255, 0.04);
}

.cadence-band-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Cadence empty-state banner ---- */
/* Shown when active plane is cadence and no waypoints/vision lines carry
 * cadence metadata. Pre-cadence workspaces would otherwise render a blank
 * canvas on first plane swap, which reads as a broken toggle. */
#cadence-empty-state {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  max-width: 420px;
  padding: 16px 20px;
  background: var(--glass-overlay, rgba(20, 24, 32, 0.92));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text, #e2e8f0);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

#cadence-empty-state .cadence-empty-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text, #e2e8f0);
}

#cadence-empty-state .cadence-empty-hint {
  color: var(--text-muted, rgba(226, 232, 240, 0.65));
  font-size: 12px;
}

#cadence-empty-state kbd {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  font-family: inherit;
  font-size: 11px;
}

/* ---- Plane toggle (container/btn variant) ---- */
.plane-toggle-container {
  display: flex;
  gap: 4px;
  align-items: center;
}

.plane-toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}

.plane-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.plane-toggle-btn:focus-visible {
  outline: 2px solid rgba(99, 179, 237, 0.5);
  outline-offset: 2px;
}

.plane-toggle-btn.active {
  background: var(--glass-surface);
  border-color: rgba(99, 179, 237, 0.4);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(99, 179, 237, 0.1);
}

.plane-toggle-btn.active:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 179, 237, 0.6);
}
