@font-face {
  font-family: "Support Manrope";
  src: url("./support-manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

html[data-support-open] #app { visibility: hidden; }
.sup-root, .sup-root * { box-sizing: border-box; }
.sup-root {
  --sup-bg: #121019;
  --sup-glass: #1b1825ed;
  --sup-surface: #211c2d;
  --sup-field: #181520;
  --sup-border: #332d42;
  --sup-text: #f3effa;
  --sup-muted: #aca5ba;
  --sup-accent: #c0a9f8;
  --sup-accent-ink: #24173f;
  --sup-accent-wash: #2d2241;
  --sup-danger: #f3a3b7;
  --sup-ok: #91d9ba;
  --sup-wait: #e6bd86;
  --sup-chat-own: #32274a;
  --sup-shade: #08060c9c;
  --sup-shadow: 0 16px 40px #09061140;
  --sup-gutter: clamp(16px, 4.7vw, 26px);
  --sup-radius: 16px;
  --sup-ease: 180ms cubic-bezier(.2,.75,.3,1);
  --sup-text-lg: 26px;
  --sup-text-title: 22px;
  --sup-text-card: 17px;
  --sup-text-body: 15px;
  --sup-text-detail: 13px;
  --sup-text-caption: 12px;
  --sup-inset-top: calc(max(env(safe-area-inset-top, 0px), var(--sup-tg-top, 0px)) + var(--sup-content-top, 0px));
  --sup-inset-right: calc(max(env(safe-area-inset-right, 0px), var(--sup-tg-right, 0px)) + var(--sup-content-right, 0px));
  --sup-inset-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--sup-tg-bottom, 0px)) + var(--sup-content-bottom, 0px));
  --sup-inset-left: calc(max(env(safe-area-inset-left, 0px), var(--sup-tg-left, 0px)) + var(--sup-content-left, 0px));
  position: fixed;
  inset: var(--sup-origin, 0px) 0 auto;
  z-index: 50;
  height: var(--sup-height, 100vh);
  height: var(--sup-height, 100dvh);
  padding: var(--sup-inset-top) var(--sup-inset-right) var(--sup-inset-bottom) var(--sup-inset-left);
  display: grid;
  justify-items: center;
  grid-template-rows: minmax(0, 1fr);
  background: var(--sup-bg);
  color: var(--sup-text);
  color-scheme: dark;
  font: 500 var(--sup-text-body)/1.45 "Support Manrope", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.sup-root[data-theme="light"] {
  --sup-bg: #f7f6fb;
  --sup-glass: #fdfcffed;
  --sup-surface: #fff;
  --sup-field: #fff;
  --sup-border: #e3deeb;
  --sup-text: #262034;
  --sup-muted: #675e75;
  --sup-accent: #6842ac;
  --sup-accent-ink: #fff;
  --sup-accent-wash: #efe7fa;
  --sup-danger: #9a314e;
  --sup-ok: #225e48;
  --sup-wait: #805320;
  --sup-chat-own: #eee5fb;
  --sup-shade: #2113315c;
  --sup-shadow: 0 14px 38px #40256612;
  color-scheme: light;
}
.sup-root[data-keyboard] { padding-bottom: 0; }
.sup-root [hidden] { display: none !important; }
.sup-root button, .sup-root input, .sup-root textarea { font: inherit; }
.sup-root button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sup-root button:disabled { cursor: default; opacity: .54; }
.sup-root :focus-visible { outline: 2px solid var(--sup-accent); outline-offset: 3px; }
.sup-root h1, .sup-root h2, .sup-root h3, .sup-root p { margin: 0; overflow-wrap: anywhere; }
.sup-root h1 { font-size: var(--sup-text-title); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.sup-root h2, .sup-root h3 { font-size: var(--sup-text-card); font-weight: 650; letter-spacing: -.02em; }
.sup-root svg { display: inline-block; width: 19px; height: 19px; stroke-width: 1.65; flex: none; }
.sup-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.sup-shell {
  width: min(100%, 720px);
  min-inline-size: 0;
  min-block-size: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--sup-bg);
}
.sup-feedback {
  position: absolute; inset-block-start: calc(var(--sup-inset-top) + 76px);
  inline-size: max-content; max-inline-size: calc(100% - 2 * var(--sup-gutter));
  padding: 8px 12px; border-radius: 12px; border: 1px solid var(--sup-border);
  color: var(--sup-text); background: var(--sup-glass); pointer-events: none;
  box-shadow: var(--sup-shadow); font-size: var(--sup-text-detail);
  animation: sup-rise var(--sup-ease) both;
}
.sup-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  padding: 12px var(--sup-gutter);
  border-bottom: 1px solid var(--sup-border);
  background: var(--sup-glass);
}
[data-screen="home"] .sup-header h1 { font-size: var(--sup-text-lg); font-weight: 700; }
[data-screen="chat"] .sup-header h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 19px; }
.sup-header-copy { min-width: 0; }
.sup-subtitle { margin-top: 3px; color: var(--sup-muted); font-size: var(--sup-text-detail); font-weight: 500; }
.sup-header-glyph, .sup-ticket-icon, .sup-intro-icon, .sup-empty > span {
  display: grid; place-items: center; color: var(--sup-accent); background: var(--sup-accent-wash);
}
.sup-header-glyph { width: 38px; height: 38px; border-radius: 14px; }
.sup-icon-button, .sup-send {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--sup-border); border-radius: 14px; color: var(--sup-text); background: var(--sup-field);
}
.sup-primary, .sup-secondary {
  min-height: 46px; padding: 9px 15px; min-width: 0;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 14px;
  font-weight: 650 !important;
}
.sup-primary, .sup-send { background: var(--sup-accent); color: var(--sup-accent-ink); }
.sup-secondary { background: var(--sup-glass); color: var(--sup-text); border-color: var(--sup-border); }
.sup-root button { transition: opacity var(--sup-ease), background-color var(--sup-ease), transform var(--sup-ease); }
.sup-root button:active:not(:disabled) { transform: scale(.985); opacity: .82; }
.sup-scroll {
  min-inline-size: 0; min-block-size: 0; overflow-y: auto;
  overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--sup-border) transparent;
  padding: 18px var(--sup-gutter) 22px; scroll-padding-block: 12px;
}
.sup-intro {
  display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 10px 12px; align-items: center;
  padding: 15px; border-radius: 21px; border: 1px solid var(--sup-border);
  background: var(--sup-surface); box-shadow: var(--sup-shadow);
}
.sup-intro-icon { border-radius: 14px; width: 44px; height: 44px; }
.sup-intro-icon svg { width: 22px; height: 22px; }
.sup-intro p { margin-top: 3px; color: var(--sup-muted); font-size: var(--sup-text-detail); font-weight: 500; }
.sup-intro .sup-primary { grid-column: 1 / -1; margin-top: 4px; }
.sup-tickets { margin-top: 25px; }
.sup-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sup-section-heading span { color: var(--sup-muted); font-size: var(--sup-text-caption); }
.sup-ticket-list { display: grid; gap: 8px; }
.sup-ticket {
  width: 100%; min-width: 0; min-height: 88px;
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 10px;
  text-align: start; padding: 11px; border: 1px solid var(--sup-border); border-radius: var(--sup-radius);
  background: var(--sup-surface); color: var(--sup-text);
}
.sup-ticket-icon { width: 38px; height: 38px; border-radius: 12px; }
.sup-ticket-body { min-width: 0; display: grid; gap: 2px; }
.sup-ticket-body strong { font-size: 15px; font-weight: 680; overflow-wrap: anywhere; }
.sup-ticket-preview { color: var(--sup-muted); font-size: var(--sup-text-detail); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.sup-ticket-meta { display: grid; justify-items: end; gap: 5px; color: var(--sup-muted); font-size: 11px; white-space: nowrap; }
.sup-ticket-meta svg { width: 15px; height: 15px; }
.sup-unread { display: grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 4px; border-radius: 10px; color: var(--sup-accent-ink); background: var(--sup-accent); font-weight: 700; }
.sup-status { display: inline-flex; align-items: baseline; gap: 6px; color: var(--sup-muted); font-weight: 630; font-size: var(--sup-text-caption); }
.sup-status::before { content: ""; align-self: center; flex: 0 0 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sup-status:is([data-state="open"],[data-state="working"]) { color: var(--sup-accent); }
.sup-status[data-state="answered"] { color: var(--sup-ok); }
.sup-status[data-state="waiting"] { color: var(--sup-wait); }
.sup-tickets [data-sup="more"] { margin-top: 12px; }
.sup-empty { display: grid; justify-items: center; text-align: center; gap: 7px; border: 1px dashed var(--sup-border); border-radius: 19px; padding: 24px 14px; }
.sup-empty p, .sup-list-note { color: var(--sup-muted); font-size: var(--sup-text-detail); }
.sup-empty > span { width: 38px; height: 38px; border-radius: 12px; }
.sup-skeleton { display: grid; gap: 8px; }
.sup-skeleton-line { height: 62px; border: 1px solid var(--sup-border); border-radius: 15px; background: var(--sup-surface); opacity: .72; animation: sup-pulse 1.3s ease-in-out infinite alternate; }
.sup-skeleton-line:nth-child(2) { animation-delay: 150ms; }
.sup-skeleton-line:nth-child(3) { animation-delay: 300ms; }
@keyframes sup-pulse { to { opacity: .43; } }

.sup-form { display: grid; gap: 17px; max-width: 580px; margin-inline: auto; }
.sup-field { min-width: 0; display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
.sup-root input, .sup-root textarea, .sup-picker-trigger {
  display: block; width: 100%; min-width: 0; padding: 10px 12px;
  appearance: none; border: 1px solid var(--sup-border); border-radius: 15px; color: var(--sup-text);
  background: var(--sup-field); font-size: 16px; font-weight: 500; line-height: 1.45;
}
.sup-root input, .sup-picker-trigger { min-height: 51px; }
.sup-root textarea { resize: none; overflow-y: auto; overflow-wrap: anywhere; }
.sup-root :is(input,textarea)::placeholder { color: var(--sup-muted); opacity: 1; }
.sup-root :is(input,textarea):focus { outline-offset: 1px; }
.sup-picker-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; }
.sup-picker-trigger svg { color: var(--sup-muted); }
.sup-form-meta { display: flex; justify-content: end; margin-top: -11px; color: var(--sup-muted); font-size: var(--sup-text-caption); font-variant-numeric: tabular-nums; }
.sup-form-error { color: var(--sup-danger); font-size: var(--sup-text-detail); }

.sup-sheet {
  margin: 0 auto; top: auto; bottom: 0;
  width: min(100%, 520px); max-height: calc(var(--sup-height, 100vh) - 12px);
  padding: 15px var(--sup-gutter) max(14px, var(--sup-inset-bottom));
  border: 1px solid var(--sup-border); border-radius: 24px 24px 0 0;
  background: var(--sup-glass); color: var(--sup-text); box-shadow: var(--sup-shadow);
  animation: sup-rise var(--sup-ease) both;
}
.sup-sheet::backdrop { background: var(--sup-shade); }
.sup-sheet[data-fallback] { position: fixed; z-index: 1; box-shadow: 0 0 0 100vmax var(--sup-shade); overflow-y: auto; }
.sup-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sup-options { display: grid; gap: 5px; }
.sup-option {
  display: grid; gap: 9px; grid-template-columns: 28px minmax(0, 1fr) 23px; align-items: center;
  min-height: 48px; text-align: start; border-radius: 12px; padding: 6px 10px;
  border: 1px solid var(--sup-border); background: var(--sup-field); color: var(--sup-text);
}
.sup-option[aria-pressed="true"] { color: var(--sup-accent); background: var(--sup-accent-wash); }
.sup-option span { display: grid; justify-items: center; color: var(--sup-accent); }
.sup-sheet-text { color: var(--sup-muted); margin-bottom: 12px !important; }
.sup-sheet-actions { display: grid; gap: 8px; }
@keyframes sup-rise { from { opacity: 0; transform: translateY(12px); } }

.sup-chat { padding-top: 10px; padding-bottom: 10px; }
.sup-history { display: block; margin: 0 auto 12px; min-height: 44px; padding: 5px 13px; border: 0; border-radius: 12px; color: var(--sup-accent); background: var(--sup-accent-wash); font-size: 13px; }
.sup-messages { display: grid; gap: 8px; padding-block-end: 4px; }
.sup-date { justify-self: center; padding: 6px 9px; color: var(--sup-muted); font-size: var(--sup-text-caption); }
.sup-unread-divider { position: relative; display: flex; align-items: center; gap: 10px; color: var(--sup-accent); font-size: var(--sup-text-caption); }
.sup-unread-divider::before, .sup-unread-divider::after { content:""; flex: 1; height: 1px; background: var(--sup-border); }
.sup-message {
  max-inline-size: min(89%, 56ch); min-inline-size: 0; padding: 9px 11px 6px;
  border: 1px solid var(--sup-border); border-radius: 16px; background: var(--sup-surface); color: var(--sup-text);
  animation: sup-rise var(--sup-ease) both;
}
.sup-own { justify-self: end; border-end-end-radius: 5px; background: var(--sup-chat-own); }
.sup-team { justify-self: start; border-end-start-radius: 5px; }
.sup-team strong { display: block; color: var(--sup-accent); font-weight: 680; font-size: var(--sup-text-caption); margin-bottom: 4px; }
.sup-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-message time { display: block; text-align: end; color: var(--sup-muted); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.sup-composer-wrap { position: relative; padding: 9px var(--sup-gutter); background: var(--sup-glass); border-top: 1px solid var(--sup-border); }
.sup-composer { min-width: 0; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: end; gap: 8px; }
.sup-composer textarea { min-height: 44px; max-height: 120px; padding-block: 9px; }
.sup-composer .sup-form-error { grid-column: 1 / -1; }
.sup-composer .sup-photo-preview { grid-column: 1 / -1; }
.sup-photo-preview { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sup-photo-preview img { width: 76px; height: 62px; object-fit: cover; border-radius: 12px; }
.sup-chat-photo { display: block; max-width: 100%; max-height: 65vh; margin-block: 4px; object-fit: contain; border-radius: 12px; }
.sup-jump { position: absolute; right: var(--sup-gutter); bottom: calc(100% + 7px); box-shadow: var(--sup-shadow); }
.sup-send { border-radius: 14px; }
.sup-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-inline-start-color: transparent; border-radius: 50%; animation: sup-spin .7s linear infinite; }
@keyframes sup-spin { to { transform: rotate(360deg); } }

@supports (backdrop-filter: blur(8px)) {
  .sup-header, .sup-sheet, .sup-composer-wrap { backdrop-filter: blur(8px); }
}
@media (min-width: 768px) {
  .sup-shell { border-inline: 1px solid var(--sup-border); }
  .sup-header { padding-block: 15px; }
  .sup-intro { grid-template-columns: 44px minmax(0,1fr) auto; }
  .sup-intro .sup-primary { grid-column: auto; margin: 0; }
  .sup-sheet { top: 50%; bottom: auto; translate: 0 -50%; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .sup-root *, .sup-root *::before, .sup-root *::after { animation: none !important; transition: none !important; }
}

/* Keep screen-reader focus on the heading without styling it as an input. */
.sup-root .sup-header h1[tabindex="-1"]:focus { outline: none; }
