.support-chat {
  --sc-accent: #f37249;
  --sc-ink: #1c1917;
  --sc-muted: #57534e;
  --sc-line: #e7dcd4;
  --sc-soft: #fdf8f5;
  --sc-own: #fff0e8;
  color: var(--sc-ink);
  font: 400 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}
.support-chat *, .support-chat *::before, .support-chat *::after { box-sizing: border-box; }
.support-chat [hidden] { display: none !important; }
.support-chat .sc-sr-only, .support-chat .sc-feedback.is-success, .support-chat .is-continued .sc-message-meta { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.support-chat p, .support-chat h2, .support-chat ul, .support-chat ol { margin: 0; }
.support-chat button { font: inherit; cursor: pointer; min-height: 44px; }
.support-chat button:disabled { cursor: wait; opacity: .6; }
.support-chat button:focus-visible, .support-chat input:focus-visible, .support-chat textarea:focus-visible, .support-chat [tabindex]:focus-visible { outline: 2px solid var(--sc-ink) !important; outline-offset: 2px; }
.support-chat .sc-primary, .support-chat .sc-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: 8px; color: #fff; background: var(--sc-accent); font-size: 16px; font-weight: 700;
}
.support-chat .sc-primary, .support-chat .sc-primary:hover, .support-chat .sc-primary:active { color: #fff !important; background: var(--sc-accent); }
.support-chat .sc-primary:hover { box-shadow: 0 0 0 3px var(--sc-own); }
.support-chat .sc-visitor-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: white; color: var(--sc-ink); font-size: 14px; font-weight: 700; }
.support-chat .sc-secondary { background: white; border-color: #8a7a71; color: var(--sc-ink); font-weight: 600; }
.support-chat .sc-secondary:hover { background: var(--sc-soft); }
.support-chat .sc-text-button { background: transparent; border: 0; color: var(--sc-ink); padding: 8px 12px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.support-chat .sc-hint, .support-chat .sc-availability { font-size: 14px; color: var(--sc-muted); line-height: 1.5; }
.support-chat .sc-eyebrow { font-size: 14px; font-weight: 650; color: var(--sc-muted); margin-bottom: 4px; }
.support-chat .sc-feedback { padding: 0 20px; font-size: 14px; color: #b91c1c; min-height: 0; overflow-wrap: anywhere; }
.support-chat .sc-feedback:not(:empty) { padding-top: 12px; padding-bottom: 16px; }
.support-chat .sc-feedback.is-success { color: #166534; }
.support-chat label { display: block; margin: 12px 0 6px; font-size: 14px; font-weight: 600; color: var(--sc-ink); }
.support-chat input, .support-chat textarea { display: block; width: 100%; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #8a7a71; border-radius: 8px; font: inherit; background: white; color: var(--sc-ink); box-shadow: none; }
.support-chat textarea { resize: vertical; max-height: 180px; }
.support-chat .sc-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.support-chat .sc-notice { padding: 12px 16px; background: var(--sc-soft); border-block: 1px solid var(--sc-line); color: var(--sc-muted); font-size: 14px; }
.support-chat .sc-notice button { margin-top: 12px; }
.support-chat .sc-thread { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.support-chat .sc-log { list-style: none; margin: 0; padding: 20px 16px; flex: 1; min-height: 80px; overflow-y: auto; overscroll-behavior: contain; background: var(--sc-soft); }
.support-chat .sc-message { list-style: none; margin: 0 0 12px; max-width: 86%; width: fit-content; padding: 10px 14px; border: 1px solid var(--sc-line); border-radius: 12px 12px 12px 4px; background: white; }
.support-chat .sc-message.is-own { margin-left: auto; background: var(--sc-own); border-color: transparent; border-radius: 12px 12px 4px 12px; }
.support-chat .sc-message.is-continued { margin-top: -8px; }
.support-chat .sc-message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 4px; color: var(--sc-muted); font-size: 14px; }
.support-chat .sc-message-meta strong { font-size: 14px; font-weight: 600; color: var(--sc-ink); }
.support-chat .sc-message p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--sc-ink); font-size: 16px; line-height: 1.5; }
.support-chat .sc-composer { padding: 16px 16px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--sc-line); flex-shrink: 0; background: white; }
.support-chat .sc-composer textarea { min-height: 52px; max-height: 160px; resize: none; border-radius: 8px; }
.support-chat .sc-composer label { margin-top: 0; }
.support-chat .sc-composer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.support-chat [data-counter] { margin-right: auto; font-variant-numeric: tabular-nums; }
.support-chat .sc-composer-footer .sc-hint { max-width: 60%; }
.support-chat .sc-launcher { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 900; display: flex; gap: 10px; align-items: center; padding: 12px 20px; color: #fff !important; background: var(--sc-accent); border: 0; border-radius: 28px; font-weight: 700; box-shadow: 0 6px 24px rgb(28 25 23 / 12%); }
.support-chat .sc-panel { position: fixed; inset: auto 20px 20px auto; margin: 0; padding: 0; width: min(400px, calc(100vw - 40px)); max-width: none; max-height: min(720px, calc(100dvh - 40px)); border: 1px solid var(--sc-line); border-radius: 12px; background: white; color: var(--sc-ink); box-shadow: 0 18px 40px rgb(28 25 23 / 16%); overflow: hidden; }
.support-chat .sc-panel[open] { display: flex; flex-direction: column; }
.support-chat .sc-panel::backdrop { background: rgb(28 25 23 / 24%); }
.support-chat .sc-header { display: flex; flex-shrink: 0; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--sc-line); background: white; }
.support-chat .sc-header h2 { font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: normal; margin-bottom: 4px; }
.support-chat .sc-availability::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #8a7a71; }
.support-chat .sc-availability.is-online::before { background: var(--sc-muted); }
.support-chat .sc-icon-button { min-width: 44px; width: 44px; padding: 0; background: white; color: var(--sc-ink); border: 1px solid #8a7a71; border-radius: 8px; font-size: 26px; line-height: 1; }
.support-chat .sc-start { padding: 16px 20px 20px; overflow-y: auto; }
.support-chat .sc-intro { font-size: 14px; color: var(--sc-muted); }
.support-chat .sc-start .sc-hint { margin: 12px 0 16px; }
.support-chat .sc-start .sc-primary { width: 100%; }
.support-chat .sc-panel.has-thread { height: min(680px, calc(100dvh - 40px)); }
.support-chat-staff { width: min(1200px, 100%); margin: 16px auto 32px; }
.support-chat .sc-staff-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.support-chat .sc-staff-title { font-size: 22px; line-height: 1.4; font-weight: 650; }
.support-chat .sc-staff-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.support-chat .sc-availability-switch { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 0; border: 0; border-radius: 8px; color: var(--sc-ink); background: transparent; font-size: 14px; text-align: left; }
.support-chat .sc-switch-track { position: relative; display: inline-block; flex: 0 0 40px; width: 40px; height: 24px; border-radius: 12px; background: #e7e5e4; border: 1px solid #8a7a71; }
.support-chat .sc-switch-track::after { content: ''; position: absolute; left: 1px; top: 1px; width: 20px; height: 20px; border: 1px solid #8a7a71; border-radius: 50%; background: white; }
.support-chat .sc-availability-switch[aria-checked="true"] .sc-switch-track { background: var(--sc-accent); border-color: var(--sc-accent); }
.support-chat .sc-availability-switch[aria-checked="true"] .sc-switch-track::after { transform: translateX(16px); border-color: white; }
.support-chat .sc-workspace { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); height: min(760px, 78dvh); min-height: 480px; border: 1px solid var(--sc-line); border-radius: 12px; overflow: hidden; background: white; }
.support-chat .sc-sidebar { min-width: 0; overflow-y: auto; border-right: 1px solid var(--sc-line); }
.support-chat .sc-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-bottom: 1px solid var(--sc-line); }
.support-chat .sc-filters button { padding: 8px 12px; border: 1px solid var(--sc-line); border-radius: 8px; color: var(--sc-muted); background: white; font-size: 14px; }
.support-chat .sc-filters button[aria-pressed="true"] { color: var(--sc-ink); background: var(--sc-own); border-color: var(--sc-line); font-weight: 650; }
.support-chat .sc-list-state { padding: 16px; }
.support-chat .sc-inbox-list { padding: 0; list-style: none; }
.support-chat .sc-inbox-list li { margin: 0; list-style: none; }
.support-chat .sc-inbox-list button { width: 100%; min-width: 0; padding: 16px; border: 0; border-bottom: 1px solid var(--sc-line); border-left: 3px solid transparent; background: white; text-align: left; color: var(--sc-ink); }
.support-chat .sc-inbox-list button:hover, .support-chat .sc-inbox-list button[aria-current="true"] { background: var(--sc-soft); border-left-color: var(--sc-accent); }
.support-chat .sc-inbox-list strong, .support-chat .sc-inbox-list small { display: block; overflow-wrap: anywhere; }
.support-chat .sc-row-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.support-chat .sc-row-line strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-chat .sc-row-line time { flex: 0 0 auto; color: var(--sc-muted); font-size: 14px; white-space: nowrap; }
.support-chat .sc-inbox-list small { color: var(--sc-muted); font-size: 14px; }
.support-chat .sc-inbox-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-chat .sc-attention { display: inline-block; margin-top: 8px; padding: 2px 8px; border: 1px solid var(--sc-line); border-radius: 12px; background: white; color: var(--sc-muted); font-size: 14px; font-weight: 600; }
.support-chat .sc-row-pending .sc-attention { background: var(--sc-own); color: var(--sc-ink); }
.support-chat .sc-staff-detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.support-chat .sc-empty { margin: auto; max-width: 400px; padding: 24px; color: var(--sc-muted); text-align: center; }
.support-chat .sc-thread-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--sc-line); }
.support-chat .sc-identity { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.support-chat .sc-identity h2 { font-size: 18px; line-height: 1.4; font-weight: 650; letter-spacing: normal; }
.support-chat .sc-identity p { font-size: 14px; }
.support-chat .sc-identity .sc-identity-chip { display: inline-block; margin-top: 6px; padding: 2px 8px; border: 1px solid var(--sc-line); border-radius: 12px; background: var(--sc-soft); }
.support-chat .sc-mobile-back { display: none; }
.support-chat.sc-alerts { position: relative; flex: 0 0 auto; }
.support-chat.sc-alerts--floating { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 900; }
.support-chat .sc-alert-settings { position: relative; }
.support-chat .sc-alert-settings > summary { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid #8a7a71; border-radius: 8px; background: white; color: var(--sc-ink); list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; }
.support-chat .sc-alert-settings > summary::-webkit-details-marker { display: none; }
.support-chat .sc-alert-settings > summary:focus-visible { outline: 3px solid var(--sc-ink); outline-offset: 3px; }
.support-chat .sc-pending-badge { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 0 6px; border-radius: 12px; background: var(--sc-accent); color: #fff; font-size: 14px; font-weight: 700; }
.support-chat .sc-alert-menu { position: absolute; z-index: 950; right: 0; top: calc(100% + 8px); width: min(320px, calc(100vw - 32px)); padding: 20px; background: white; border: 1px solid var(--sc-line); border-radius: 12px; box-shadow: 0 18px 40px rgb(28 25 23 / 12%); }
.support-chat.sc-alerts--floating .sc-alert-menu { top: auto; bottom: calc(100% + 8px); }
.support-chat .sc-alert-title { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
.support-chat .sc-alert-menu [data-notify-toggle] { margin: 16px 0 8px; width: 100%; }
.support-chat .sc-sound-option { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 8px 0; font-size: 14px; cursor: pointer; }
.support-chat .sc-sound-option input { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--sc-accent); }
.support-chat .sc-alert-inbox-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; color: var(--sc-ink); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 639px) {
  .support-chat .sc-panel { inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px; width: auto; max-height: calc(100dvh - 24px); }
  .support-chat .sc-panel.has-thread { height: calc(100dvh - 24px); }
  .support-chat .sc-header { padding: 16px; }
  .support-chat .sc-start { padding: 16px; }
  .support-chat .sc-launcher { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); padding: 12px 16px; }
  .support-chat .sc-staff-toolbar { align-items: flex-start; flex-direction: column; }
  .support-chat .sc-workspace { display: flex; flex-direction: column; height: calc(100dvh - 160px); min-height: 480px; }
  .support-chat .sc-sidebar { flex: 1; border-right: 0; }
  .support-chat .sc-staff-detail { display: none; flex: 1; }
  .support-chat.has-selection .sc-sidebar { display: none; }
  .support-chat.has-selection .sc-staff-detail { display: flex; }
  .support-chat .sc-mobile-back { display: block; flex-basis: 100%; text-align: left; }
  .support-chat .sc-thread-header, .support-chat .sc-log, .support-chat .sc-composer { padding: 12px; }
  .support-chat .sc-message { max-width: 90%; }
  .support-chat .sc-staff-controls { width: 100%; gap: 8px; }
  .support-chat .sc-alert-menu { position: fixed; top: 140px; left: 16px; right: 16px; width: auto; max-height: calc(100dvh - 160px); overflow-y: auto; }
  .support-chat.sc-alerts--floating { right: 16px; }
  .support-chat.sc-alerts--floating .sc-alert-menu { top: auto; bottom: 76px; }
  .support-chat .sc-composer-footer .sc-hint { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .support-chat * { scroll-behavior: auto !important; } }
