/**
 * SmartSearch — chat page + cards + floating ball.
 * BEM, ss- prefix. No inline styles per project rule.
 *
 * Design language aligned with the ShopBot assistant
 * (bubble radii, shadows, composer, tool chip, welcome hero),
 * tinted with the scselects platform blue (#1D5BFF family).
 */

/* ===== floating ball ===== */

.ss-ball {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7b3ff2 0%, #9b52ff 55%, #c26bff 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(123, 63, 242, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ss-ball:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 10px 26px rgba(123, 63, 242, 0.5);
}

/* Soft AI halo — breathing ring behind the ball. */
.ss-ball__halo {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(123, 63, 242, 0.45);
  pointer-events: none;
  animation: ss-ball-halo 2.4s ease-out infinite;
}

@keyframes ss-ball-halo {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  70% {
    opacity: 0;
    transform: scale(1.28);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

/* "AI" chip pinned to the ball's top-right corner. */
.ss-ball__ai {
  position: absolute;
  top: -7px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: #ffffff;
  color: #7b3ff2;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(123, 63, 242, 0.5);
}

.ss-ball__label {
  display: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ss-ball:hover .ss-ball__label {
  display: inline;
}

@media (max-width: 768px) {
  .ss-ball {
    right: 16px;
    bottom: 84px;
    padding: 10px;
  }

  .ss-ball__ai {
    top: -6px;
    right: -3px;
    min-width: 22px;
    height: 14px;
    font-size: 9px;
  }
}

/* ===== chat page shell =====
 * Width follows the homepage .container grid (1368 max, Bootstrap). */

.ss-intro {
  position: relative;
  margin: 0 -12px 28px;
  padding: 56px 56px 52px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1d5bff 0%, #4f7dff 50%, #89b0ff 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(29, 91, 255, 0.18);
}

/* Two decorative blurred blobs — gives the dark banner depth without
 * shipping a real image asset. Clipped to the rounded edges. */
.ss-intro::before,
.ss-intro::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.ss-intro::before {
  width: 360px;
  height: 360px;
  top: -120px;
  right: 18%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 70%);
}

.ss-intro::after {
  width: 420px;
  height: 420px;
  bottom: -160px;
  left: -80px;
  background: radial-gradient(circle, rgba(13, 36, 100, 0.45), transparent 70%);
}

.ss-intro__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.ss-intro__copy {
  text-align: left;
}

.ss-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}

.ss-intro__title {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(13, 36, 100, 0.18);
}

.ss-intro__desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  margin: 0 0 28px;
  max-width: 580px;
}

.ss-intro__stats {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
}

.ss-intro__stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ss-intro__stats li:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.30);
}

.ss-intro__stats strong {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.ss-intro__stats span {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
}

.ss-intro__trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.ss-intro__trust svg {
  color: #6ee7b7;
}

.ss-intro__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  background: #fff;
  color: #1d5bff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(13, 36, 100, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ss-intro__cta:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(13, 36, 100, 0.24);
  color: #1d5bff;
  text-decoration: none;
}

.ss-intro__cta svg {
  transition: transform 0.15s ease;
}

.ss-intro__cta:hover svg {
  transform: translateX(2px);
}

html {
  scroll-behavior: smooth;
}

/* ===== preview card on the right ===== */

.ss-intro__preview {
  position: relative;
  display: flex;
  justify-content: center;
}

.ss-intro__preview-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  color: #0f172a;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(13, 36, 100, 0.25);
  transform: rotate(-1.5deg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ss-intro__preview-card:hover {
  transform: rotate(0);
}

.ss-intro__preview-query {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
}

.ss-intro__preview-query svg {
  color: #1d5bff;
  flex-shrink: 0;
}

.ss-intro__preview-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ss-intro__preview-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.ss-intro__preview-result:hover {
  background: #eef3ff;
}

.ss-intro__preview-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d5bff, #4f7dff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-intro__preview-result > div {
  flex: 1;
  min-width: 0;
}

.ss-intro__preview-result strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-intro__preview-result span {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.ss-intro__preview-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #94a3b8;
}

.ss-intro__preview-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: ss-blink 1.4s infinite ease-in-out;
}

@media (max-width: 1024px) {
  .ss-intro__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ss-intro__copy {
    text-align: center;
  }

  .ss-intro__title,
  .ss-intro__desc,
  .ss-intro__stats {
    margin-left: auto;
    margin-right: auto;
  }

  .ss-intro__trust {
    justify-content: center;
  }

  .ss-intro__preview {
    order: -1;
  }

  .ss-intro__preview-card {
    transform: none;
  }
}

@media (max-width: 640px) {
  .ss-intro {
    padding: 40px 24px 36px;
    margin: 0 -12px 20px;
  }

  .ss-intro__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ss-page {
  padding: 8px 0 40px;
}

.ss-shell {
  display: flex;
  gap: 0;
  align-items: stretch;
}

/* ===== sidebar (session history, desktop) ===== */

.ss-side {
  display: flex;
  flex-direction: column;
  flex: 0 0 250px;
  border: 1px solid #e2e8f0;
  border-right: none;
  border-radius: 16px 0 0 16px;
  background: #fafbfc;
  padding: 16px 12px;
}

.ss-side__new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 14px;
  transition: all 0.15s ease;
}

.ss-side__new:hover {
  border-color: #1d5bff;
  color: #1d5bff;
  background: #eef3ff;
}

.ss-side__title {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 8px 8px;
}

.ss-side__list {
  overflow-y: auto;
  min-height: 0;
}

.ss-side__empty {
  font-size: 12.5px;
  color: #cbd5e1;
  padding: 10px 8px;
}

.ss-side__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.ss-side__item:hover {
  background: #eef3ff;
}

.ss-side__item.is-active {
  background: linear-gradient(135deg, #eef3ff, #dde8ff);
}

.ss-side__link {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-size: 13px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.ss-side__item.is-active .ss-side__link {
  color: #1d5bff;
  font-weight: 600;
}

.ss-side__when {
  flex-shrink: 0;
  font-size: 11px;
  color: #cbd5e1;
}

.ss-side__del {
  flex-shrink: 0;
  border: 0;
  background: none;
  color: #94a3b8;
  padding: 2px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.12s ease;
}

.ss-side__item:hover .ss-side__del {
  opacity: 1;
}

.ss-side__del:hover {
  color: #ef4444;
}

@media (max-width: 768px) {
  .ss-side {
    display: none;
  }
}

/* ===== main column ===== */

.ss-main {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 600px;
  border: 1px solid #e2e8f0;
  border-radius: 0 16px 0 0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
  .ss-main {
    border-radius: 16px;
  }
}

.ss-main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.ss-main__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

/* Current AI model badge — quiet gray pill, ShopBot-style */
.ss-model {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
  white-space: nowrap;
  max-width: 280px;
}

.ss-model__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.ss-model__name {
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-model__sep {
  color: #cbd5e1;
  flex-shrink: 0;
}

.ss-model__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: #94a3b8;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== thread ===== */

.ss-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8fafc;
}

/* Hero state: thread fills the panel between the head and the composer.
 * The composer is always anchored at the bottom (it's a flex sibling);
 * the hero is vertically centered inside whatever space remains. */
.ss-main[data-state="hero"] .ss-thread {
  padding: 0 28px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* ===== welcome hero ===== */

.ss-hero {
  text-align: center;
  max-width: 640px;
}

.ss-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef3ff;
  color: #1d5bff;
  margin-bottom: 12px;
}

.ss-hero__title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.ss-hero__desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 16px;
}

.ss-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.ss-suggest__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 12px;
  padding: 7px 14px 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ss-suggest__chip svg {
  flex-shrink: 0;
  color: #1d5bff;
  transition: transform 0.18s ease;
}

.ss-suggest__chip:hover {
  background: linear-gradient(135deg, #1d5bff 0%, #4f7dff 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 91, 255, 0.25);
}

.ss-suggest__chip:hover svg {
  color: #fff;
  transform: scale(1.1);
}

/* ===== messages ===== */

.ss-msg--user {
  align-self: flex-end;
  max-width: 78%;
}

.ss-msg__bubble {
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
  animation: ss-msg-in 0.25s ease;
}

@keyframes ss-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ss-msg--user .ss-msg__bubble {
  background: linear-gradient(135deg, #1d5bff, #4f7bff);
  color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ss-msg--bot {
  align-self: flex-start;
  max-width: 92%;
}

.ss-msg--bot .ss-msg__bubble {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Bot message markdown */
.ss-md {
  font-size: 14px;
  color: #334155;
  word-break: break-word;
}

.ss-md p {
  margin: 0 0 8px;
}

.ss-md p:last-child {
  margin-bottom: 0;
}

.ss-md ul,
.ss-md ol {
  margin: 6px 0;
  padding-left: 20px;
}

.ss-md li {
  margin: 3px 0;
}

.ss-md li::marker {
  color: #94a3b8;
}

.ss-md a {
  color: #1d5bff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ss-md code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: #e11d48;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ss-md strong {
  font-weight: 650;
  color: #0f172a;
}

.ss-typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ss-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  display: block;
  animation: ss-bounce 1.4s infinite ease-in-out;
}

.ss-typing span:nth-child(2) { animation-delay: 0.16s; }
.ss-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes ss-bounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.ss-tool-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 7px 12px;
  animation: ss-msg-in 0.25s ease;
}

/* pending: breathing dot — the chip is actively waiting on a result */
.ss-tool-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d97706;
  animation: ss-blink 1.2s infinite ease-in-out;
}

.ss-tool-chip.is-done {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.ss-tool-chip.is-done::before {
  content: '✓';
  width: auto;
  height: auto;
  background: none;
  font-size: 11px;
  line-height: 1;
  animation: none;
}

/* ended: stream finished (or failed) before a result arrived for this chip */
.ss-tool-chip.is-ended {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.ss-tool-chip.is-ended::before {
  background: #cbd5e1;
  animation: none;
}

.ss-error {
  align-self: center;
  font-size: 13px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 8px 14px;
}

/* ===== result cards ===== */

.ss-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Products live in their own grid section, below any supplier rows */
.ss-cards__products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

/* Grid items default to min-width:auto, which lets wide content overflow
 * the column. Force min-width:0 on each cell so the cards stay inside
 * their column and text can wrap instead of pushing the layout. */
.ss-cards__products > * {
  min-width: 0;
  max-width: 100%;
}

.ss-cards__empty {
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.ss-cards > .ss-card--supplier ~ .ss-cards__products {
  border-top: 1px dashed #f1f5f9;
  padding-top: 10px;
}

.ss-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ss-card:hover {
  border-color: #1d5bff;
  box-shadow: 0 2px 10px rgba(29, 91, 255, 0.08);
  text-decoration: none;
}

.ss-card__logo,
.ss-card__image {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
}

/* Placeholder tiles when the supplier has no logo / product has no image */
.ss-card__logo--ph,
.ss-card__image--ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #1d5bff;
  background: linear-gradient(135deg, #eef3ff, #dde8ff);
}

.ss-card__image--ph {
  color: #94a3b8;
  background: #f1f5f9;
}

/* Product card: vertical tile inside the products grid */
.ss-card--product {
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.ss-card--product .ss-card__image {
  flex: none;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.ss-card--product .ss-card__name {
  font-size: 12.5px;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ss-card--product .ss-card__price {
  margin-top: 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ss-card__body {
  flex: 1;
  min-width: 0;
}

.ss-card__name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}

.ss-card__meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 2px;
}

.ss-card__desc {
  font-size: 12.5px;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ss-card__price {
  font-size: 14px;
  font-weight: 650;
  color: #dc2626;
  margin-top: 4px;
}

.ss-card__supplier {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-card__foot {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.ss-card__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.ss-card__count {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.ss-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.ss-badge--diamond {
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}

.ss-badge--gold {
  color: #a16207;
  background: #fefce8;
  border: 1px solid #fde68a;
}

.ss-badge--silver {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ss-badge--bronze {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.ss-badge--default {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ss-badge--verified {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

/* ===== composer ===== */

.ss-composer {
  flex-shrink: 0;
  padding: 14px 24px 16px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Composer stays anchored to the bottom of the panel for both hero / chat.
 * Earlier "composer floats to center when hero is showing" caused layout
 * jumps and felt inconsistent — the hero shows above, the composer below,
 * just like every other chat panel. */
.ss-main[data-state="hero"] .ss-composer {
  position: relative;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

.ss-composer__box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 10px 10px 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ss-composer__box:focus-within {
  border-color: #1d5bff;
  box-shadow: 0 0 0 3px rgba(29, 91, 255, 0.15);
}

.ss-composer__box textarea {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  /* 42px min-height matches the send button, 10px vertical padding
   * keeps the single-line text optically centered against it. */
  min-height: 42px;
  padding: 10px 0;
  max-height: 120px;
  background: transparent;
  font-family: inherit;
}

.ss-composer__box textarea::placeholder {
  color: #cbd5e1;
}

.ss-composer__send {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d5bff, #4f7bff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ss-composer__send:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(29, 91, 255, 0.35);
}

.ss-composer__send:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

.ss-composer__tip {
  margin: 8px 4px 0;
  font-size: 11.5px;
  color: #cbd5e1;
  text-align: center;
}
