/* ================================================
   sidebar-enhance.css — v10.3 Phase A
   Injects polish into the existing .sidebar-bottom:
   - animated online-status block
   - live regime mini-widget
   - command palette hint (⌘K)
   - subtle token refinements (hover glow, ease tokens)
   Works with the React bundle, does not override it.
   ================================================ */

:root {
  --ease-snappy: cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth: cubic-bezier(.22, 1, .36, 1);
  --accent-soft: rgba(0, 212, 170, .08);
  --accent-glow-sm: 0 0 12px rgba(0, 212, 170, .25);
}

/* ---- sidebar item hover polish ---- */
.sidebar-item {
  transition: background .18s var(--ease-smooth),
              border-left-color .18s var(--ease-smooth),
              color .18s var(--ease-smooth),
              transform .18s var(--ease-smooth) !important;
}
.sidebar-item:hover {
  background: var(--accent-soft);
  border-left-color: rgba(0, 212, 170, .35);
  color: var(--text-primary);
  transform: translateX(2px);
}
.sidebar-item.active {
  background: linear-gradient(90deg, rgba(0,212,170,.12), rgba(0,212,170,0));
  border-left-color: var(--accent);
  color: var(--text-primary);
  box-shadow: inset 0 0 24px rgba(0,212,170,.06);
}
.sidebar-item.active .icon {
  color: var(--accent);
}

/* ---- brand subtle glow on hover ---- */
.sidebar-brand {
  transition: background .2s var(--ease-smooth);
}
.sidebar-brand:hover {
  background: linear-gradient(90deg, rgba(0,212,170,.04), transparent);
}

/* ================================================
   sidebar-bottom additions — mounted by JS
   ================================================ */

#eb-sb-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.05);
  background: linear-gradient(180deg, transparent, rgba(0,212,170,.02));
  animation: eb-sb-in .5s var(--ease-smooth);
}
@keyframes eb-sb-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Online status block ---- */
.eb-sb-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0,212,170,.04);
  border: 1px solid rgba(0,212,170,.1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .02em;
  color: var(--text-secondary);
  cursor: default;
  transition: background .2s var(--ease-smooth),
              border-color .2s var(--ease-smooth);
}
.eb-sb-status:hover {
  background: rgba(0,212,170,.07);
  border-color: rgba(0,212,170,.2);
}
.eb-sb-status.offline {
  background: rgba(239,68,68,.05);
  border-color: rgba(239,68,68,.15);
}
.eb-sb-status.offline .eb-sb-status-dot {
  background: var(--bear);
  box-shadow: 0 0 0 0 rgba(239,68,68,.5);
  animation: eb-sb-pulse-red 2s infinite;
}
.eb-sb-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0,212,170,.5);
  animation: eb-sb-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes eb-sb-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,212,170,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(0,212,170,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,212,170,0); }
}
@keyframes eb-sb-pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.eb-sb-status-body {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}
.eb-sb-status-label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.eb-sb-status-sub {
  color: var(--text-muted);
  font-size: 9.5px;
  letter-spacing: .02em;
}

/* ---- Regime mini-widget ---- */
.eb-sb-regime {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border-subtle);
  transition: background .2s var(--ease-smooth),
              border-color .2s var(--ease-smooth),
              transform .2s var(--ease-smooth);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.eb-sb-regime::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--regime-tint, rgba(0,212,170,.08)), transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--ease-smooth);
  pointer-events: none;
}
.eb-sb-regime:hover {
  border-color: rgba(255,255,255,.1);
}
.eb-sb-regime:hover::before {
  opacity: 1;
}
.eb-sb-regime-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--regime-color, var(--accent));
  background: var(--regime-tint, rgba(0,212,170,.08));
  transition: background .3s var(--ease-smooth),
              color .3s var(--ease-smooth);
}
.eb-sb-regime-body {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
  z-index: 1;
  position: relative;
}
.eb-sb-regime-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eb-sb-regime-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.eb-sb-regime-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--regime-color, var(--accent));
  flex-shrink: 0;
  z-index: 1;
  position: relative;
  letter-spacing: .02em;
}
.eb-sb-regime.loading .eb-sb-regime-value {
  color: var(--text-muted);
  font-style: italic;
}
.eb-sb-regime.loading .eb-sb-regime-score::after {
  content: '…';
}

/* ---- Command palette hint ---- */
.eb-sb-cmd {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px dashed rgba(255,255,255,.06);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s var(--ease-smooth),
              border-color .18s var(--ease-smooth),
              color .18s var(--ease-smooth);
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.eb-sb-cmd:hover {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.12);
  color: var(--text-secondary);
}
.eb-sb-cmd-icon {
  opacity: .7;
  display: flex;
  align-items: center;
}
.eb-sb-cmd-label {
  flex: 1;
}
.eb-sb-cmd-kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .02em;
  transition: background .18s var(--ease-smooth),
              color .18s var(--ease-smooth);
}
.eb-sb-cmd:hover .eb-sb-cmd-kbd {
  background: rgba(0,212,170,.08);
  color: var(--accent);
  border-color: rgba(0,212,170,.2);
}

/* ---- Toast for cmd+K feedback ---- */
.eb-sb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(10,14,22,.92);
  border: 1px solid rgba(0,212,170,.25);
  box-shadow: var(--glow), 0 8px 32px #000a;
  backdrop-filter: blur(12px);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-smooth),
              transform .3s var(--ease-snappy);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eb-sb-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.eb-sb-toast-icon {
  color: var(--accent);
  display: flex;
}
