/* frontend/styles/inbox.css — 원본 sinbox.css 이식 + 신설 클래스
   (공유 dash 기본 클래스는 dash-base.css) */
@import "./dash-base.css";

/* ---------- 입력 ---------- */
.sb-cmd {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  border-radius: 15px;
  padding: 6px 6px 6px 15px;
  margin-bottom: 11px;
}
.sb-cmd > svg:first-child {
  width: 17px;
  height: 17px;
  color: var(--coral);
  flex-shrink: 0;
}
.sb-cmd input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  color: var(--ink);
  font-size: 14px;
}
.sb-cmd input::placeholder {
  color: var(--faint);
}
.sb-mode {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.13s, color 0.13s;
}
.sb-mode .ic {
  width: 16px;
  height: 16px;
}
.sb-mode:hover {
  background: var(--card-2);
  color: var(--ink);
}
/* phase-14: 녹음 중 상태 (coral 펄스 — sb-pulse 재사용) */
.sb-mode.rec {
  color: var(--coral);
  background: color-mix(in oklab, var(--coral) 14%, transparent);
  animation: sb-pulse 1s ease-in-out infinite;
}
.sb-send {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  flex-shrink: 0;
  background: var(--fill);
  color: var(--on-fill);
  display: grid;
  place-items: center;
  transition: filter 0.14s;
}
.sb-send .ic {
  width: 16px;
  height: 16px;
}
.sb-send:hover {
  filter: brightness(1.1);
}

/* ---------- 컨텍스트 필터 ---------- */
.sb-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sb-f {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: var(--glass-2);
  transition: background 0.13s, color 0.13s;
}
.sb-f .fdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.sb-f:hover {
  color: var(--ink);
}
.sb-f.on {
  background: var(--fill);
  color: var(--on-fill);
  border-color: transparent;
}
.sb-hint {
  font-size: 11px;
  color: var(--faint);
  margin-left: auto;
  text-align: right;
  min-width: 140px;
  flex: 1;
}

/* ---------- 목록 ---------- */
.sb-list {
  display: flex;
  flex-direction: column;
}
.sb-cap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.sb-cap:first-child {
  border-top: none;
  padding-top: 2px;
}
.sb-cap.fresh {
  margin: 0 -10px;
  padding: 13px 10px;
  border-radius: var(--radius-sm);
  border-top: none;
  background: linear-gradient(
      100deg,
      color-mix(in oklab, var(--coral) 9%, transparent),
      transparent 65%
    ),
    var(--glass-2);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--coral) 26%, var(--glass-brd));
}
.sb-cap.fresh + .sb-cap {
  border-top: none;
}
.sb-body {
  flex: 1;
  min-width: 0;
}
.sb-raw {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.sb-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.sb-route .r-arrow {
  color: var(--coral);
  display: inline-flex;
}
.sb-route .r-arrow .ic {
  width: 14px;
  height: 14px;
}
.r-chip.type {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.r-chip.type .ic {
  color: var(--ink-2);
}
.r-chip.type.event {
  color: var(--blue);
  border-color: color-mix(in oklab, var(--blue) 30%, var(--glass-brd));
}
.r-chip.type.event .ic {
  color: var(--blue);
}
.r-chip.type.idea {
  color: var(--violet);
  border-color: color-mix(in oklab, var(--violet) 30%, var(--glass-brd));
}
.r-chip.type.idea .ic {
  color: var(--violet);
}
.r-chip.type:disabled {
  cursor: default;
}
.r-chip.sphere {
  font-weight: 700;
}
.r-chip.auto {
  color: var(--amber);
  font-weight: 700;
  border-color: color-mix(in oklab, var(--amber) 36%, var(--glass-brd));
  background: color-mix(in oklab, var(--amber) 9%, transparent);
}
.r-chip.auto .ic {
  color: var(--amber);
}

.sb-reason {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 7px;
  max-width: 62ch;
}
.sb-fallback {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--amber);
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--amber) 36%, var(--glass-brd));
  background: color-mix(in oklab, var(--amber) 9%, transparent);
}
.sb-fallback .ic {
  width: 10px;
  height: 10px;
}

/* ---------- 확인 액션 ---------- */
.sb-acts {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}
.sb-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime-ink);
  background: var(--lime);
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: 0 4px 12px -6px color-mix(in oklab, var(--lime-ink) 50%, transparent);
  transition: background 0.13s, transform 0.12s;
}
.sb-ok .ic {
  width: 12px;
  height: 12px;
}
.sb-ok:hover {
  background: var(--lime-hi);
  transform: translateY(-1px);
}
.sb-alt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: color 0.13s, border-color 0.13s;
}
.sb-alt .ic {
  width: 12px;
  height: 12px;
}
.sb-alt:hover {
  color: var(--ink);
  border-color: var(--line-2);
}

/* ---------- 생각 중 ---------- */
.sb-think {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.sb-think .tdot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  animation: sb-pulse 1s ease-in-out infinite;
}
.sb-think .tdot:nth-child(2) {
  animation-delay: 0.15s;
}
.sb-think .tdot:nth-child(3) {
  animation-delay: 0.3s;
  margin-right: 4px;
}
@keyframes sb-pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.sb-done {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--green) 16%, transparent);
  color: var(--green);
}
.sb-done .ic {
  width: 11px;
  height: 11px;
}

/* 빈 상태 / 에러 (신설) */
.sb-empty {
  font-size: 12.5px;
  color: var(--muted);
  padding: 16px 2px;
}
.sb-err {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--coral);
  margin-top: 9px;
}
.sb-retry {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
}
.inbox-loaderr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--coral) 8%, var(--card));
  border: 1px solid color-mix(in oklab, var(--coral) 26%, transparent);
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 14px;
}

/* ===== 분류 원칙 + 행선지 ===== */
.prin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prin {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-brd);
  background: var(--glass-2);
}
.prin-ic {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--tone) 14%, transparent);
  color: var(--tone);
}
.prin-ic .ic {
  width: 14px;
  height: 14px;
}
.prin-body {
  min-width: 0;
}
.prin-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.prin-desc {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}

.dest-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}
.dest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.dest:first-child {
  border-top: none;
  padding-top: 2px;
}
.dest-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dest-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dest-sub {
  font-size: 11.5px;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.dest-n {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
}
.dest-go {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.13s, color 0.13s, transform 0.13s;
}
.dest-go .ic {
  width: 13px;
  height: 13px;
}
.dest.go:hover .dest-go {
  background: var(--card-2);
  color: var(--ink);
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .sb-think .tdot {
    animation: none !important;
  }
}
