.launcher-card-shopbot {
  background: linear-gradient(180deg, #ffffff, #f6f8fb);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.shopbot-admin-shell {
  padding: 1.5rem;
  color: #0f172a;
}

.shopbot-top-stack,
.shopbot-bottom-stack {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.shopbot-section-stack {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.shopbot-card {
  border: 1px solid #dbe3ec;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.shopbot-card-full {
  width: 100%;
}

.shopbot-card h2,
.shopbot-card p,
.shopbot-card strong,
.shopbot-card label,
.shopbot-card span {
  color: inherit;
}

.shopbot-inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.shopbot-accordion-toggle {
  min-width: 7rem;
}

.shopbot-accordion-body[hidden] {
  display: none;
}

.shopbot-inline-field,
.shopbot-form label {
  display: grid;
  gap: 0.35rem;
}

.shopbot-static-field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.shopbot-inline-field span,
.shopbot-form label span,
.shopbot-static-field span {
  font-size: 0.82rem;
  color: #475569;
}

.shopbot-static-field strong {
  display: inline-flex;
}

.shopbot-tenant-tag {
  align-self: start;
  width: fit-content;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.shopbot-inline-field select,
.shopbot-form input,
.shopbot-form select,
.shopbot-form textarea,
.shopbot-live-composer textarea {
  min-height: 2.75rem;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.shopbot-inline-field select:focus,
.shopbot-form input:focus,
.shopbot-form select:focus,
.shopbot-form textarea:focus,
.shopbot-live-composer textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.shopbot-form textarea,
.shopbot-live-composer textarea {
  resize: vertical;
  min-height: 6rem;
}

.shopbot-form {
  display: grid;
  gap: 0.9rem;
}

.shopbot-embed-panel {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.2rem;
  border-top: 1px solid #e2e8f0;
}

.shopbot-form-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shopbot-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.shopbot-checkbox {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: #0f172a;
}

.shopbot-checkbox input {
  min-height: auto;
  width: 1rem;
  height: 1rem;
}

.shopbot-history-list,
.shopbot-history-detail {
  min-height: 220px;
}

.shopbot-empty-copy {
  margin: 0;
  color: #64748b;
}

.shopbot-live-bubble a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.shopbot-product-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.shopbot-product-card,
.shopbot-live-result-card {
  display: grid;
  gap: 0.55rem;
  border-radius: 16px;
  padding: 0.95rem;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
}

.shopbot-product-card p,
.shopbot-live-result-card p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.shopbot-product-card a,
.shopbot-link-list a,
.shopbot-live-result-card a {
  color: #1d4ed8;
  text-decoration: none;
}

.shopbot-product-card a:hover,
.shopbot-link-list a:hover,
.shopbot-live-result-card a:hover {
  text-decoration: underline;
}

.shopbot-product-meta,
.shopbot-live-result-meta,
.shopbot-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: #64748b;
}

.shopbot-link-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shopbot-pretty-json {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.95rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  color: #0f172a;
  font: 0.8rem/1.55 "IBM Plex Mono", monospace;
}

.shopbot-note-box {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  color: #334155;
  white-space: pre-wrap;
  line-height: 1.6;
}

.shopbot-note-box[data-tone="success"] {
  border-color: #86efac;
  background: #f0fdf4;
}

.shopbot-note-box[data-tone="warning"] {
  border-color: #fcd34d;
  background: #fffbeb;
}

.shopbot-note-box[data-tone="error"] {
  border-color: #fca5a5;
  background: #fef2f2;
}

.shopbot-history-stack {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
}

.shopbot-history-list {
  display: grid;
  gap: 0.55rem;
  max-height: 980px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.shopbot-history-row {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  border: 1px solid #dbe3ec;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.shopbot-history-row:hover {
  border-color: #94a3b8;
}

.shopbot-history-row.is-active {
  border-color: #2563eb;
  background: #eff6ff;
}

.shopbot-history-row span {
  color: #64748b;
  font-size: 0.78rem;
}

.shopbot-history-detail {
  border-radius: 18px;
  padding: 0.95rem;
  border: 1px solid #dbe3ec;
  background: #f8fafc;
  display: grid;
  gap: 1rem;
  min-height: 420px;
}

.shopbot-diagnostics-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.shopbot-diagnostic-card {
  display: grid;
  gap: 0.28rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbe3ec;
}

.shopbot-diagnostic-card span {
  font-size: 0.76rem;
  color: #64748b;
}

.shopbot-diagnostic-card strong {
  color: #0f172a;
  line-height: 1.35;
}

.shopbot-transcript {
  display: grid;
  gap: 0.75rem;
}

.shopbot-transcript-turn {
  display: grid;
  gap: 0.55rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.shopbot-transcript-turn:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.shopbot-transcript-turn p {
  margin: 0.25rem 0 0;
  line-height: 1.55;
  color: #0f172a;
}

.shopbot-detail-section,
.shopbot-feedback-inline {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.2rem;
  border-top: 1px solid #dbe3ec;
}

.shopbot-feedback-context {
  display: grid;
  gap: 0.2rem;
}

.shopbot-feedback-context span {
  font-size: 0.8rem;
  color: #64748b;
}

.shopbot-feedback-list,
.shopbot-policy-list {
  display: grid;
  gap: 0.75rem;
}

.shopbot-feedback-item,
.shopbot-policy-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbe3ec;
}

.shopbot-feedback-item p,
.shopbot-policy-item p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.shopbot-feedback-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.shopbot-live-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 0.75rem;
}

.shopbot-live-launcher {
  min-width: 116px;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.shopbot-live-panel {
  width: min(364px, calc(100vw - 18px));
  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.shopbot-live-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.shopbot-live-header strong {
  display: block;
  color: #0f172a;
}

.shopbot-live-header span {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.85rem;
}

.shopbot-live-close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  cursor: pointer;
}

.shopbot-live-messages {
  display: grid;
  gap: 0.42rem;
  max-height: 430px;
  padding: 0.72rem;
  overflow-y: auto;
  background: #f8fafc;
  font-size: 0.88rem;
}

.shopbot-live-message {
  display: grid;
  gap: 0.45rem;
}

.shopbot-live-message-user {
  justify-items: end;
}

.shopbot-live-message-assistant {
  justify-items: start;
}

.shopbot-live-bubble {
  max-width: 100%;
  padding: 0.58rem 0.72rem;
  border-radius: 12px;
  line-height: 1.42;
  background: #ffffff;
  border: 1px solid #dbe3ec;
  color: #0f172a;
}

.shopbot-live-message-user .shopbot-live-bubble {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.shopbot-live-message-user .shopbot-live-bubble a {
  color: #bfdbfe;
}

.shopbot-live-bubble-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.shopbot-live-typing-copy {
  color: #475569;
}

.shopbot-live-typing-dots {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
}

.shopbot-live-typing-dots span {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #94a3b8;
  animation: shopbot-live-typing 1s infinite ease-in-out;
}

.shopbot-live-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.shopbot-live-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.shopbot-live-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.72rem 0;
  background: #ffffff;
}

.shopbot-live-suggestion {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  padding: 0.38rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.shopbot-live-composer {
  display: grid;
  gap: 0.45rem;
  padding: 0.72rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.shopbot-live-composer textarea {
  min-height: 56px;
  font-size: 0.88rem;
  padding: 0.65rem 0.72rem;
}

.shopbot-live-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.shopbot-live-status {
  color: #64748b;
  font-size: 0.8rem;
}

.shopbot-live-status[data-tone="info"] {
  color: #2563eb;
}

.shopbot-live-status[data-tone="error"] {
  color: #dc2626;
}

.shopbot-live-actions .primary-button {
  min-height: 2rem;
  padding: 0.42rem 0.72rem;
  border-radius: 12px;
  font-size: 0.86rem;
}

@keyframes shopbot-live-typing {
  0%,
  80%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@media (max-width: 760px) {
  .shopbot-admin-shell {
    padding: 1rem;
  }

  .shopbot-form-grid,
  .shopbot-history-stack {
    grid-template-columns: 1fr;
  }

  .shopbot-live-widget {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .shopbot-live-panel {
    width: 100%;
  }

  .shopbot-live-launcher {
    justify-self: end;
  }
}
