/* ═══════════════════════════════════════════
   TOOLBAR
═══════════════════════════════════════════ */

.toolbar {
  height: var(--toolbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar::-webkit-scrollbar {
  display: none;
}

/* ═══════════════════════════════════════════
   TOOLBAR SECTIONS
═══════════════════════════════════════════ */

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 4px;
  animation: fadeIn 0.15s ease both;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

.toolbar-spacer {
  flex: 1;
}

/* ═══════════════════════════════════════════
   TOOLBAR BUTTONS
═══════════════════════════════════════════ */

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
}

.toolbar-btn svg {
  flex-shrink: 0;
}

.toolbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.toolbar-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Accent variant (confirm, download) */
.toolbar-btn--accent {
  color: var(--accent);
  background: var(--accent-glow);
}

.toolbar-btn--accent:hover {
  background: rgba(232, 213, 163, 0.2);
  color: var(--accent);
}

/* Danger variant (delete) */
.toolbar-btn--danger {
  color: var(--danger);
}

.toolbar-btn--danger:hover {
  background: var(--danger-dim);
  color: var(--danger);
}

/* Grouped state variant */
.toolbar-btn--grouped {
  color: var(--grouped-ring);
  background: rgba(126, 200, 164, 0.1);
}

.toolbar-btn--grouped:hover {
  background: rgba(126, 200, 164, 0.2);
}

/* ═══════════════════════════════════════════
   TOOLBAR SELECTION BADGE
═══════════════════════════════════════════ */

.toolbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #0f0f0f;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   TOOLBAR STATE LABEL
═══════════════════════════════════════════ */

.toolbar-state-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: 0 4px;
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  color: var(--text-primary);
  max-width: 320px;
  pointer-events: all;
  animation: toastIn 0.25s var(--ease) both;
}

.toast.toast--error {
  border-color: var(--danger);
  color: var(--danger);
}

.toast.toast--success {
  border-color: var(--grouped-ring);
}

.toast.toast--exit {
  animation: toastOut 0.2s var(--ease) forwards;
}

.toast__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.toast--error .toast__dot  { background: var(--danger); }
.toast--success .toast__dot { background: var(--grouped-ring); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
