/* ───────────────────────────────────────────────────────
   kariochi · components-feedback.css
   Feedback patterns: toasts, alerts, banners, empty states,
   skeleton loaders, and progress indicators.
   Extracted from components.css (split 2026-05-30).
   ─────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════
   FEEDBACK
   ════════════════════════════════════════════════════════════════════════ */

.toast {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 320px; max-width: 480px;
}
.toast .icon {
  width: 28px; height: 28px; border-radius: var(--radius-md);
  display: grid; place-items: center; flex-shrink: 0;
}
.toast .icon svg { width: 14px; height: 14px; }
.toast .body { flex: 1; min-width: 0; }
.toast .title { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.toast .desc  { font-size: var(--text-sm); color: var(--fg-secondary); margin-top: 2px; }
.toast .close {
  width: 24px; height: 24px;
  display: grid; place-items: center; border-radius: var(--radius-sm);
  color: var(--fg-tertiary);
  transition: color var(--duration-fast), background var(--duration-fast);
}
.toast .close:hover { color: var(--fg-primary); background: var(--bg-hover); }
.toast .close svg { width: 10px; height: 10px; }
.toast-success .icon { background: var(--status-success-bg); color: var(--status-success-fg); }
.toast-warning .icon { background: var(--status-warning-bg); color: var(--status-warning-fg); }
.toast-error   .icon { background: var(--status-error-bg);   color: var(--status-error-fg); }
.toast-info    .icon { background: var(--status-info-bg);    color: var(--status-info-fg); }

.alert {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--text-sm); line-height: 1.5;
  width: 100%;
}
.alert .icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }
.alert .icon svg { width: 16px; height: 16px; }
.alert .title { font-weight: var(--weight-semibold); }
.alert .body { font-size: var(--text-sm); }
.alert-success { background: var(--status-success-bg); color: var(--status-success-fg); }
.alert-warning { background: var(--status-warning-bg); color: var(--status-warning-fg); }
.alert-error   { background: var(--status-error-bg);   color: var(--status-error-fg); }
.alert-info    { background: var(--status-info-bg);    color: var(--status-info-fg); }
.alert .text { display: flex; flex-direction: column; gap: 2px; }

/* empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: var(--space-3);
  padding: var(--space-12) var(--space-6);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}
.empty-state .icon-bubble {
  width: 56px; height: 56px; border-radius: var(--radius-xl);
  background: var(--bg-brand-soft); color: var(--fg-brand);
  display: grid; place-items: center;
  margin-bottom: var(--space-2);
}
.empty-state .icon-bubble svg { width: 24px; height: 24px; }
.empty-state h3 {
  font-size: var(--text-lg); font-weight: var(--weight-semibold);
  letter-spacing: -0.015em; color: var(--fg-primary);
}
.empty-state p {
  font-size: var(--text-sm); color: var(--fg-secondary);
  max-width: 320px;
}
.empty-state .actions { margin-top: var(--space-3); display: inline-flex; gap: var(--space-2); }

/* Toast — auto-dismiss progress line */
.toast { position: relative; overflow: hidden; }
.toast .progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
}
.toast .progress::after {
  content: ""; display: block; height: 100%;
  background: currentColor;
  animation: toast-progress 4s linear forwards;
  transform-origin: left;
}
.toast-success .progress { color: var(--status-success-fg); }
.toast-warning .progress { color: var(--status-warning-fg); }
.toast-error   .progress { color: var(--status-error-fg); }
.toast-info    .progress { color: var(--status-info-fg); }
@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ═════════════════════════════════════════════════════════════════
   PROGRESS — linear + circular
   ═════════════════════════════════════════════════════════════════ */

.progress-linear {
  width: 100%; height: 4px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.progress-linear .fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
  transition: width var(--duration-base) var(--ease-out);
}
.progress-linear.is-indeterminate .fill {
  width: 30%;
  animation: progress-indeterminate 1.4s ease-in-out infinite;
}
@keyframes progress-indeterminate {
  0%   { transform: translateX(-200%); }
  100% { transform: translateX(400%); }
}
.progress-linear.is-error .fill { background: var(--status-error-fg); }

.progress-row {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-sm); color: var(--fg-secondary);
  width: 100%;
}
.progress-row .progress-linear { flex: 1; }
.progress-row .pct {
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
  color: var(--fg-primary);
  min-width: 36px; text-align: right;
  font-size: var(--text-sm);
}
.progress-row .label {
  flex: 1;
  font-size: var(--text-sm);
}

.progress-circle {
  width: 36px; height: 36px;
  transform: rotate(-90deg);
}
.progress-circle .track-c { stroke: var(--bg-subtle); fill: transparent; }
.progress-circle .fill-c {
  stroke: var(--brand-primary); fill: transparent;
  transition: stroke-dashoffset var(--duration-base) var(--ease-out);
}
.progress-circle.is-indeterminate { animation: spin 1.4s linear infinite; }
.progress-circle.is-indeterminate .fill-c { stroke-dasharray: 60 100; }

/* ═════════════════════════════════════════════════════════════════
   SKELETON — loading placeholders
   ═════════════════════════════════════════════════════════════════ */

.skel {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.55) 50%,
    transparent 100%
  );
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
@keyframes skel-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skel-text { height: 12px; border-radius: var(--radius-sm); }
.skel-text.lg { height: 16px; }
.skel-text.sm { height: 10px; }
.skel-thumb { width: 44px; height: 44px; border-radius: var(--radius-md); }
.skel-row {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.skel-row:last-child { border-bottom: 0; }
.skel-row .skel-stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.skel-card {
  display: grid; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 220px;
}
.skel-card .skel-thumb-lg { aspect-ratio: 1/1; width: 100%; height: auto; border-radius: var(--radius-md); }

/* ═════════════════════════════════════════════════════════════════
   BANNER — full-width inline, system messages
   ═════════════════════════════════════════════════════════════════ */

.banner {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm); line-height: 1.5;
  width: 100%;
}
.banner .banner-icon {
  flex-shrink: 0; width: 18px; height: 18px;
  display: grid; place-items: center;
}
.banner .banner-icon svg { width: 18px; height: 18px; }
.banner .body { flex: 1; min-width: 0; }
.banner .body strong { font-weight: var(--weight-semibold); }
.banner .actions { display: inline-flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.banner .actions .banner-link {
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  color: inherit; text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.banner .actions .banner-close {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: inherit; opacity: 0.7;
  transition: opacity var(--duration-fast), background var(--duration-fast);
}
.banner .actions .banner-close:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.banner .actions .banner-close svg { width: 10px; height: 10px; }

.banner-info    { background: var(--status-info-bg);    color: var(--status-info-fg); }
.banner-warning { background: var(--status-warning-bg); color: var(--status-warning-fg); }
.banner-success { background: var(--status-success-bg); color: var(--status-success-fg); }
.banner-error   { background: var(--status-error-bg);   color: var(--status-error-fg); }
