/* ============================================================
   ANCHOR — Shared Components
   components.css  |  Requires tokens.css
   ============================================================ */

/* ── Logo ───────────────────────────────────────────────── */
.anchor-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--brand-primary);
  color: #000;
  flex-shrink: 0;
}
.anchor-logo-sm { width: 34px; height: 34px; border-radius: 10px; }
.anchor-logo-lg { width: 56px; height: 56px; border-radius: var(--radius-xl); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: var(--weight-bold);
  border-radius: var(--radius-lg);
  transition: background 0.15s, opacity 0.15s;
  border: none;
  cursor: pointer;
}
.btn-lg { height: var(--input-height-lg); font-size: var(--text-base); padding: 0 24px; }

.btn-kick {
  background: var(--brand-primary);
  color: #000;
}
.btn-kick:hover { opacity: 0.88; }

.kick-icon-box {
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-black);
  font-size: 14px;
}

/* ── Icon button ────────────────────────────────────────── */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.icon-btn:hover { background: #222; color: #aaa; }

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: var(--weight-bold);
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: #333;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-sm   { width: 38px; height: 38px; }
.avatar-md   { width: 42px; height: 42px; }
.avatar-lg   { width: 46px; height: 46px; }

.avatar-brand  { background: #1a2e14; color: #53FC18; }
.avatar-green  { background: #14291a; color: #53FC18; }
.avatar-purple { background: #221828; color: #a055cc; }
.avatar-blue   { background: #141e2e; color: #5588ee; }
.avatar-orange { background: #2d1f12; color: #cc8040; }
.avatar-pink   { background: #2d1224; color: #dd5588; }

/* ── Avatar status dot ──────────────────────────────────── */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid #111;
}
.avatar-status.online  { background: #53FC18; }
.avatar-status.away    { background: #f5a623; }
.avatar-status.offline { background: #555; }
.avatar-status.blocked { background: #e55; }

/* ── Status dot (inline) ────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.online  { background: #53FC18; }
.status-dot.away    { background: #f5a623; }
.status-dot.offline { background: #555; }

/* ── Badge ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--weight-bold);
  border-radius: 999px;
  padding: 0 6px;
  height: 18px;
  min-width: 18px;
}
.badge-dot {
  background: var(--brand-primary);
  color: #000;
}

/* ── Divider label ──────────────────────────────────────── */
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--text-disabled);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--weight-semibold);
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #222;
}

/* ── Tooltip ────────────────────────────────────────────── */
.tooltip-wrap {
  position: relative;
  display: inline-flex;
}
.tooltip-wrap .tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #ccc;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.tooltip-wrap:hover .tooltip { opacity: 1; }

.panel-title-actions .tooltip-wrap .tooltip,
.chat-header-actions .tooltip-wrap .tooltip {
  bottom: auto;
  top: calc(100% + 8px);
  z-index: 300;
}

/* ── Toggle switch ─────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.toggle input { display: none; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface-6);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.toggle input:checked ~ .toggle-track { background: var(--brand-primary-muted); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); background: var(--brand-primary); }

/* ── Form inputs ───────────────────────────────────────── */
.input {
  background: var(--surface-4);
  border: 1px solid var(--surface-6);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}
.input:focus { border-color: var(--brand-primary); }
.input-sm { height: var(--input-height-sm); }

/* ── Select ────────────────────────────────────────────── */
.select-wrap { position: relative; }
.select {
  appearance: none;
  width: 100%;
  background: var(--surface-4);
  border: 1px solid var(--surface-6);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-6) var(--space-2) var(--space-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.select:focus { border-color: var(--brand-primary); }

/* ── Button variants ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast), opacity var(--transition-fast);
}
.btn-secondary {
  background: var(--surface-4);
  border: 1px solid var(--surface-6);
  color: var(--text-secondary);
}
.btn-secondary:hover { background: var(--surface-5); }
.btn-danger {
  background: var(--brand-danger);
  color: #fff;
}
.btn-danger:hover { opacity: 0.85; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }

/* ── Badge variants (extended) ─────────────────────────── */
.badge-green {
  background: rgba(83,252,24,0.1);
  color: var(--brand-primary);
  border: 1px solid rgba(83,252,24,0.2);
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--surface-6);
  color: var(--text-muted);
}
