/* ═══════════════════════════════════════════════════════════
   FABCARE — SPLIT-VIEW ENGINE
   split-view.css  ·  Link after styles.css
   Architecture: Viewport → Panels → Divider → Feed → Composer
═══════════════════════════════════════════════════════════ */

/* ── EASING & LAYOUT TOKENS ── */
:root {
  --sv-ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --sv-dur:        350ms;
  --sv-chat-width: 33.3333%;
  --sv-chat-min:   320px;
}

/* ══════════════════════════════════════════════════════════
   1. MASTER SPLIT VIEWPORT
══════════════════════════════════════════════════════════ */
.app-split-viewport {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: calc(100dvh - 62px);
  overflow: hidden;
  position: relative;
}

/* ══════════════════════════════════════════════════════════
   2. PANELS
══════════════════════════════════════════════════════════ */

/* ── Vault Panel (Left, 2/3) ── */
.split-panel--vault {
  flex: 1 1 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: flex var(--sv-dur) var(--sv-ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.split-panel--vault::-webkit-scrollbar { width: 4px; }
.split-panel--vault::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}
.split-panel--vault .main {
  max-width: none;
  padding: 32px 36px;
}

/* ── Chat Panel (Right, 1/3) ── */
.split-panel--chat {
  flex: 0 0 var(--sv-chat-width);
  min-width: var(--sv-chat-min);
  max-width: 480px;
  display: flex;
  flex-direction: column;
  background: #0D1017;
  border-left: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
  transition:
    flex-basis var(--sv-dur) var(--sv-ease),
    min-width  var(--sv-dur) var(--sv-ease),
    opacity    var(--sv-dur) var(--sv-ease),
    transform  var(--sv-dur) var(--sv-ease);
}

/* Subtle top glow */
.split-panel--chat::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 280px;
  background: radial-gradient(ellipse at center top,
    rgba(201,169,110,0.045) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════════════════
   3. COLLAPSE STATE
══════════════════════════════════════════════════════════ */
.app-split-viewport.chat-collapsed .split-panel--chat {
  flex-basis: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  overflow: hidden;
}
.app-split-viewport.chat-collapsed .split-toggle-arrow {
  transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════════════
   4. SPLIT DIVIDER + TOGGLE BUTTON
══════════════════════════════════════════════════════════ */
.split-divider {
  flex: 0 0 auto;
  width: 0;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
}

.split-toggle-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 48px;
  background: #141820;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  color: rgba(138,146,166,0.7);
  margin-left: -13px;
  transition:
    background    160ms ease,
    border-color  160ms ease,
    color         160ms ease,
    box-shadow    160ms ease;
}
.split-toggle-btn:hover {
  background: #1C2230;
  border-color: rgba(201,169,110,0.35);
  color: #C9A96E;
  box-shadow: 0 0 12px rgba(201,169,110,0.12);
}
.split-toggle-btn:focus-visible {
  outline: 2px solid rgba(201,169,110,0.5);
  outline-offset: 2px;
}
.split-toggle-arrow {
  display: block;
  transition: transform var(--sv-dur) var(--sv-ease);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   5. CHAT PANEL HEADER
══════════════════════════════════════════════════════════ */
.sv-chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(8,10,13,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 5;
}
.sv-chat-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sv-brand-gem {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.sv-brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #F2F0EC;
  line-height: 1.1;
}
.sv-brand-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(138,146,166,0.55);
  margin-top: 2px;
}
.sv-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #3DBE7A;
  flex-shrink: 0;
  animation: sv-pulse-dot 2.4s ease-in-out infinite;
}
.sv-status-dot.sv-status-dot--thinking {
  background: #C9A96E;
  animation: sv-pulse-dot 0.8s ease-in-out infinite;
}
@keyframes sv-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* Header right: new-chat + expand */
.sv-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sv-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 6px;
  color: rgba(138,146,166,0.45);
  transition: background 130ms ease, color 130ms ease;
  flex-shrink: 0;
  text-decoration: none;
}
.sv-icon-btn:hover {
  background: rgba(201,169,110,0.08);
  color: #C9A96E;
}

/* ══════════════════════════════════════════════════════════
   6. MESSAGE FEED
══════════════════════════════════════════════════════════ */
.sv-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}
.sv-feed::-webkit-scrollbar { width: 3px; }
.sv-feed::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
}

/* ── Welcome State ── */
.sv-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 24px 16px;
  animation: sv-fade-up 0.45s var(--sv-ease) both;
}
.sv-welcome[hidden] { display: none; }

.sv-welcome-emblem {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(201,169,110,0.05);
  border: 1px solid rgba(201,169,110,0.13);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.sv-welcome-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #F2F0EC;
  line-height: 1.2;
  margin-bottom: 8px;
}
.sv-welcome-heading em { font-style: italic; color: #E2C99A; }
.sv-welcome-sub {
  font-size: 0.76rem;
  color: rgba(138,146,166,0.7);
  line-height: 1.6;
  max-width: 240px;
  margin-bottom: 20px;
}

/* Prompt chips */
.sv-prompt-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  width: 100%;
}
.sv-chip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: rgba(20,24,32,0.85);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 8px 9px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  color: rgba(138,146,166,0.8);
  text-align: left;
  line-height: 1.4;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.sv-chip svg { flex-shrink: 0; margin-top: 1px; color: rgba(201,169,110,0.45); }
.sv-chip:hover {
  background: rgba(28,34,48,0.95);
  border-color: rgba(201,169,110,0.2);
  color: #F2F0EC;
}
.sv-chip:hover svg { color: #C9A96E; }

/* ── Messages container ── */
.sv-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

/* ── Individual message ── */
.sv-msg {
  display: flex;
  flex-direction: column;
  animation: sv-fade-up 0.28s var(--sv-ease) both;
}
.sv-msg--user  { align-items: flex-end; }
.sv-msg--assistant { align-items: flex-start; }

/* User bubble */
.sv-msg--user .sv-bubble {
  background: #1C2230;
  border: 1px solid rgba(255,255,255,0.07);
  border-bottom-right-radius: 4px;
  border-radius: 14px;
  padding: 9px 13px;
  max-width: 88%;
  color: #EAECEF;
  font-size: 0.845rem;
  line-height: 1.58;
  word-break: break-word;
}

/* Assistant bubble */
.sv-msg--assistant .sv-bubble {
  background: transparent;
  padding: 0;
  max-width: 100%;
}

/* Assistant header row */
.sv-msg__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.sv-msg__avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(201,169,110,0.07);
  border: 1px solid rgba(201,169,110,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.45rem;
  color: #C9A96E;
  flex-shrink: 0;
}
.sv-msg__role {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.55);
  font-weight: 500;
}

/* Assistant text */
.sv-msg__content {
  font-size: 0.845rem;
  line-height: 1.7;
  color: rgba(234,236,239,0.88);
  word-break: break-word;
}
.sv-msg__content p { margin-bottom: 0.6em; }
.sv-msg__content p:last-child { margin-bottom: 0; }
.sv-msg__content strong { color: #EAECEF; font-weight: 600; }
.sv-msg__content em { color: rgba(234,236,239,0.65); }
.sv-msg__content ul, .sv-msg__content ol {
  margin: 0.4em 0 0.6em 1.1em;
  display: flex; flex-direction: column; gap: 0.25em;
}
.sv-msg__content ul { list-style: disc; }
.sv-msg__content ol { list-style: decimal; }
.sv-msg__content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.78rem;
  color: #C9A96E;
}
.sv-msg__content pre {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 0.6em 0;
}
.sv-msg__content pre code {
  background: none; border: none; padding: 0;
  color: #EAECEF; font-size: 0.8rem;
}

/* Attached images inside user message */
.sv-msg__images {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
  max-width: 88%;
  justify-content: flex-end;
}
.sv-msg__img-thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
}

/* ── Typing / loading indicator ── */
.sv-msg--loading .sv-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 2px;
  background: transparent;
}
.sv-typing-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #C9A96E;
  opacity: 0.4;
  animation: sv-bounce 1.4s ease-in-out infinite;
}
.sv-typing-dot:nth-child(1) { animation-delay: 0ms; }
.sv-typing-dot:nth-child(2) { animation-delay: 180ms; }
.sv-typing-dot:nth-child(3) { animation-delay: 360ms; }
@keyframes sv-bounce {
  0%, 80%, 100% { transform: translateY(0);   opacity: 0.4; }
  40%            { transform: translateY(-5px); opacity: 1;   }
}

/* ── Streaming cursor ── */
.sv-stream-cursor {
  display: inline-block;
  width: 2px; height: 0.9em;
  background: #C9A96E;
  vertical-align: text-bottom;
  margin-left: 2px;
  border-radius: 1px;
  animation: sv-blink 0.9s step-end infinite;
}
@keyframes sv-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Error bubble ── */
.sv-msg--error .sv-bubble {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.18);
  color: #F87171;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.8rem;
  max-width: 96%;
}

/* ══════════════════════════════════════════════════════════
   7. INPUT ZONE
══════════════════════════════════════════════════════════ */
.sv-input-zone {
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  background: #0D1017;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Image queue */
.sv-image-queue {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: #0D1017;
}
.sv-image-queue[hidden] { display: none; }

/* Composer */
.sv-composer {
  padding: 10px 14px 12px;
}
.sv-composer__inner {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #1A1D24;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 9px 9px 7px 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.sv-composer__inner:focus-within {
  border-color: rgba(201,169,110,0.24);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.055);
}
.sv-composer__field-wrap { width: 100%; }
.sv-composer__field {
  width: 100%;
  background: transparent;
  border: none; outline: none;
  color: #EAECEF;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.865rem;
  line-height: 1.55;
  resize: none;
  max-height: 130px;
  overflow-y: auto;
  padding: 3px 0 0;
  caret-color: #C9A96E;
  scrollbar-width: thin;
}
.sv-composer__field::placeholder { color: rgba(234,236,239,0.26); }

.sv-composer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.sv-composer__actions-left {
  display: flex; align-items: center; gap: 3px;
}
.sv-composer__action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: rgba(234,236,239,0.28);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.sv-composer__action-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #EAECEF;
}
.sv-composer__send {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #C9A96E;
  color: #080A0D;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 120ms ease, transform 120ms ease;
}
.sv-composer__send:hover:not(:disabled) {
  background: #D4B87A;
  transform: scale(1.07);
}
.sv-composer__send:active:not(:disabled) { transform: scale(0.93); }
.sv-composer__send:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(234,236,239,0.22);
  cursor: not-allowed;
}
/* Spinner while sending */
.sv-composer__send.sv-sending { pointer-events: none; }
.sv-composer__send.sv-sending svg { display: none; }
.sv-composer__send.sv-sending::after {
  content: '';
  width: 13px; height: 13px;
  border: 2px solid rgba(8,10,13,0.3);
  border-top-color: #080A0D;
  border-radius: 50%;
  animation: sv-spin 0.7s linear infinite;
}
@keyframes sv-spin { to { transform: rotate(360deg); } }

.sv-composer__hints {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 0.61rem;
  color: rgba(234,236,239,0.2);
  padding: 0 2px;
}
.sv-composer__hints .hint-sep { opacity: 0.4; }

/* ══════════════════════════════════════════════════════════
   8. DROP-ZONE OVERLAY (scoped to panel)
══════════════════════════════════════════════════════════ */
.sv-dropzone-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(8,10,13,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  border: 2px dashed rgba(201,169,110,0.32);
  border-radius: 12px;
  margin: 8px;
}
.sv-dropzone-overlay.is-active { opacity: 1; pointer-events: none; }
.sv-dropzone-overlay .dropzone-overlay__inner span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #C9A96E;
}

/* ══════════════════════════════════════════════════════════
   9. ANIMATIONS
══════════════════════════════════════════════════════════ */
@keyframes sv-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ══════════════════════════════════════════════════════════
   10. RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .app-split-viewport {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .split-panel--vault {
    height: auto;
    overflow: visible;
  }
  .split-panel--vault .main { padding: 24px 20px; }
  .split-divider,
  .split-panel--chat { display: none; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  :root { --sv-chat-width: 38%; }
}
/* ══════════════════════════════════════════════════════════
   11. TOOLS DROPDOWN (split-view scoped)
══════════════════════════════════════════════════════════ */
.sv-composer__action-btn--text {
  gap: 5px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  width: auto;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.sv-composer__action-btn--text:hover,
.sv-composer__action-btn--active {
  border-color: rgba(201,169,110,0.28);
  background: rgba(201,169,110,0.07);
  color: #C9A96E;
}

/* Relative wrapper so the dropdown anchors correctly */
.sv-composer__actions-left {
  position: relative;
}

.sv-tools-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #1A1D24;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 5px;
  min-width: 170px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.97);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 40;
}

.sv-tools-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sv-tools-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(234,236,239,0.7);
  text-align: left;
  transition: background 110ms, color 110ms;
}

.sv-tools-option:hover {
  background: rgba(255,255,255,0.06);
  color: #EAECEF;
}

.sv-tools-option__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(201,169,110,0.1);
  color: #C9A96E;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   12. GARMENT CONTEXT STRIP
══════════════════════════════════════════════════════════ */
.sv-garment-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(201,169,110,0.14);
  background: rgba(201,169,110,0.04);
  flex-shrink: 0;
}

.sv-garment-strip[hidden] { display: none; }

.sv-garment-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.sv-garment-strip__clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: rgba(234,236,239,0.35);
  transition: background 120ms, color 120ms;
}

.sv-garment-strip__clear:hover {
  background: rgba(239,68,68,0.14);
  color: #F87171;
}

.sv-garment-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 0.67rem;
  font-weight: 500;
  color: #C9A96E;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════════════════════
   13. GARMENT PICKER OVERLAY
══════════════════════════════════════════════════════════ */
.sv-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(8,10,13,0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.sv-picker-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sv-picker-panel {
  background: #141820;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.65);
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 280ms cubic-bezier(0.16,1,0.3,1);
}

.sv-picker-overlay.is-open .sv-picker-panel {
  transform: translateY(0) scale(1);
}

.sv-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sv-picker-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #F2F0EC;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.sv-picker-sub {
  font-size: 0.75rem;
  color: rgba(138,146,166,0.7);
  margin-top: 4px;
  line-height: 1.5;
}

.sv-picker-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(138,146,166,0.6);
  transition: background 120ms, color 120ms;
}

.sv-picker-close:hover {
  background: rgba(255,255,255,0.1);
  color: #EAECEF;
}

.sv-picker-grid {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}

.sv-picker-grid::-webkit-scrollbar { width: 3px; }
.sv-picker-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 2px; }

.sv-picker-empty {
  font-size: 0.82rem;
  color: rgba(138,146,166,0.55);
  text-align: center;
  padding: 32px 16px;
}

/* Individual picker card */
.sv-picker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(20,24,32,0.7);
  cursor: pointer;
  position: relative;
  transition: background 130ms, border-color 130ms, box-shadow 130ms;
}

.sv-picker-card:hover {
  background: rgba(28,34,48,0.9);
  border-color: rgba(255,255,255,0.1);
}

.sv-picker-card--selected {
  border-color: rgba(201,169,110,0.45);
  background: rgba(201,169,110,0.06);
  box-shadow: 0 0 0 2px rgba(201,169,110,0.12);
}

.sv-picker-card__img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sv-picker-card__placeholder {
  width: 44px;
  height: 44px;
  border-radius: 7px;
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: rgba(201,169,110,0.6);
  flex-shrink: 0;
}

.sv-picker-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sv-picker-card__brand {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(138,146,166,0.55);
}

.sv-picker-card__name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #EAECEF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-picker-card__meta {
  font-size: 0.72rem;
  color: rgba(138,146,166,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Check mark badge */
.sv-picker-card__check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: transparent;
  transition: background 130ms, border-color 130ms, color 130ms;
}

.sv-picker-card--selected .sv-picker-card__check {
  background: #C9A96E;
  border-color: #C9A96E;
  color: #080A0D;
}

/* Picker footer */
.sv-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: rgba(8,10,13,0.4);
}

.sv-picker-count {
  font-size: 0.78rem;
  color: rgba(138,146,166,0.6);
  font-weight: 500;
}

.sv-picker-confirm {
  height: 36px;
  padding: 0 20px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.sv-picker-confirm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── MARKDOWN RENDERED LINKS & IMAGES (AI responses) ─────── */
.md-link {
  color: #C9A96E;
  text-decoration: underline;
  text-decoration-color: rgba(201,169,110,0.35);
  text-underline-offset: 3px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
.md-link:hover {
  color: #D4B87A;
  text-decoration-color: rgba(201,169,110,0.8);
}

.md-inline-img {
  display: block;
  max-width: 100%;
  max-height: 200px;
  width: auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  margin: 8px 0;
  object-fit: cover;
}