/* Zuto Support launcher and panel. Same chrome on every vertical and viewport;
   phones get a bottom sheet, wider screens a floating card. */

.zsup {
  --zsup-bg: #0a1024;
  --zsup-surface: #10182d;
  --zsup-raised: #16203a;
  --zsup-line: rgba(148, 163, 184, 0.18);
  --zsup-text: #e2e8f0;
  --zsup-strong: #f8fafc;
  --zsup-muted: #94a3b8;
  --zsup-primary: #22d3ee;
  --zsup-primary-strong: #06b6d4;
  --zsup-secondary: #d946ef;
  --zsup-focus: #67e8f9;
  --zsup-ok: #34d399;
  --zsup-warn: #fbbf24;
  --zsup-error: #fca5a5;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: var(--zsup-text);
}

.zsup *,
.zsup *::before,
.zsup *::after {
  box-sizing: border-box;
}

/* Above sticky vertical headers (100050) and the ecosystem More menu, below
   cart drawers and modals (100080+). */
.zsup .zsup-launcher,
.zsup .zsup-panel {
  position: fixed;
  z-index: 100070;
}

.zsup--above-footer .zsup-launcher {
  /* Stay in the footer’s reserved bottom pad instead of rising into legal links. */
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  right: max(16px, env(safe-area-inset-right, 0px));
}

@media (min-width: 1024px) {
  .zsup--above-footer .zsup-launcher {
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

.zsup .zsup-launcher {
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(103, 232, 249, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--zsup-primary-strong), var(--zsup-secondary));
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(6, 10, 24, 0.45);
  cursor: pointer;
}

/* Sit above the shared live-chat orb on Classifieds. */
html body[data-zuto-vertical="classified"] .zsup .zsup-launcher {
  bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 72px);
}

.zsup .zsup-launcher:hover {
  filter: brightness(1.06);
}

.zsup .zsup-launcher:focus-visible,
.zsup .zsup-panel button:focus-visible,
.zsup .zsup-panel a:focus-visible,
.zsup .zsup-panel input:focus-visible,
.zsup .zsup-panel textarea:focus-visible {
  outline: 3px solid var(--zsup-focus);
  outline-offset: 2px;
}

.zsup .zsup-launcher .fa-solid {
  font-size: 18px;
}

.zsup.zsup--open .zsup-launcher {
  visibility: hidden;
}

.zsup .zsup-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fb923c;
  color: #0a1024;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.zsup .zsup-badge[hidden] {
  display: none;
}

.zsup .zsup-panel {
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 96px));
  overflow: hidden;
  border: 1px solid var(--zsup-line);
  border-radius: 18px;
  background: var(--zsup-bg);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

.zsup .zsup-panel[hidden] {
  display: none;
}

.zsup .zsup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(217, 70, 239, 0.12));
  border-bottom: 1px solid var(--zsup-line);
}

.zsup .zsup-kicker {
  margin: 0 0 2px;
  color: var(--zsup-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zsup .zsup-title {
  margin: 0;
  color: var(--zsup-strong);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.zsup .zsup-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--zsup-line);
  border-radius: 10px;
  background: transparent;
  color: var(--zsup-text);
  cursor: pointer;
}

.zsup .zsup-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--zsup-line);
  background: var(--zsup-surface);
}

.zsup .zsup-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--zsup-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.zsup .zsup-tab[aria-selected="true"] {
  background: var(--zsup-raised);
  color: var(--zsup-strong);
  box-shadow: inset 0 -2px 0 var(--zsup-primary);
}

.zsup .zsup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.zsup .zsup-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  padding: 14px 16px 16px;
}

.zsup .zsup-pane[hidden] {
  display: none;
}

.zsup .zsup-status,
.zsup .zsup-notice,
.zsup .zsup-lead,
.zsup .zsup-hours,
.zsup .zsup-privacy {
  margin: 0;
}

.zsup .zsup-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--zsup-surface);
}

.zsup .zsup-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--zsup-warn);
}

.zsup .zsup-status--live .zsup-dot {
  background: var(--zsup-ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.zsup .zsup-notice {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--zsup-surface);
}

.zsup .zsup-notice--error {
  color: var(--zsup-error);
  border: 1px solid rgba(252, 165, 165, 0.35);
}

.zsup .zsup-notice--success {
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.zsup .zsup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zsup .zsup-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zsup .zsup-field label,
.zsup .zsup-choices legend,
.zsup .zsup-rating legend {
  color: var(--zsup-strong);
  font-size: 13px;
  font-weight: 600;
}

.zsup .zsup-panel input[type="text"],
.zsup .zsup-panel input[type="email"],
.zsup .zsup-panel textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--zsup-line);
  border-radius: 10px;
  background: var(--zsup-surface);
  color: var(--zsup-strong);
  font: inherit;
  font-size: 16px;
}

.zsup .zsup-panel textarea {
  resize: vertical;
}

.zsup .zsup-privacy,
.zsup .zsup-hours {
  color: var(--zsup-muted);
  font-size: 12px;
}

.zsup .zsup-primary,
.zsup .zsup-secondary {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.zsup .zsup-primary {
  border: 0;
  background: linear-gradient(135deg, var(--zsup-primary-strong), var(--zsup-secondary));
  color: #fff;
}

.zsup .zsup-secondary {
  border: 1px solid var(--zsup-line);
  background: transparent;
  color: var(--zsup-strong);
}

.zsup .zsup-primary:disabled,
.zsup .zsup-send:disabled {
  opacity: 0.6;
  cursor: progress;
}

.zsup .zsup-choices,
.zsup .zsup-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.zsup .zsup-choices legend,
.zsup .zsup-rating legend {
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
}

.zsup .zsup-choice {
  position: relative;
  display: inline-flex;
}

.zsup .zsup-choice input,
.zsup .zsup-star input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.zsup .zsup-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--zsup-line);
  border-radius: 999px;
  background: var(--zsup-surface);
  color: var(--zsup-text);
  font-size: 13px;
  cursor: pointer;
}

.zsup .zsup-choice input:checked + span {
  border-color: var(--zsup-primary);
  background: rgba(34, 211, 238, 0.14);
  color: var(--zsup-strong);
}

.zsup .zsup-choice input:focus-visible + span,
.zsup .zsup-star input:focus-visible + span {
  outline: 3px solid var(--zsup-focus);
  outline-offset: 2px;
}

.zsup .zsup-star {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.zsup .zsup-star span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--zsup-surface);
  color: var(--zsup-muted);
  font-size: 20px;
}

.zsup .zsup-rating:has(input:checked) .zsup-star span[aria-hidden="true"] {
  color: var(--zsup-warn);
}

.zsup .zsup-rating .zsup-star:has(input:checked) ~ .zsup-star span[aria-hidden="true"] {
  color: var(--zsup-muted);
}

.zsup .zsup-log {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  max-height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.zsup .zsup-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 86%;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--zsup-surface);
  overflow-wrap: anywhere;
}

.zsup .zsup-msg--customer {
  align-self: flex-end;
  background: rgba(34, 211, 238, 0.18);
  border-bottom-right-radius: 4px;
}

.zsup .zsup-msg--agent {
  align-self: flex-start;
  background: var(--zsup-raised);
  border-bottom-left-radius: 4px;
}

.zsup .zsup-msg--system {
  align-self: center;
  max-width: 100%;
  background: transparent;
  color: var(--zsup-muted);
  font-size: 12px;
  text-align: center;
}

.zsup .zsup-msg__who {
  color: var(--zsup-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.zsup .zsup-msg--system .zsup-msg__who {
  display: none;
}

.zsup .zsup-composer {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.zsup .zsup-composer input {
  flex: 1 1 auto;
}

.zsup .zsup-send {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--zsup-primary-strong);
  color: #0a1024;
  cursor: pointer;
}

.zsup .zsup-help {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zsup .zsup-help__link,
.zsup .zsup-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--zsup-line);
  border-radius: 12px;
  background: var(--zsup-surface);
  color: var(--zsup-strong);
  font-weight: 600;
  text-decoration: none;
}

.zsup .zsup-help__link:hover,
.zsup .zsup-link:hover {
  border-color: var(--zsup-primary);
}

.zsup .zsup-help__link .fa-solid {
  color: var(--zsup-primary);
}

.zsup .zsup-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .zsup .zsup-launcher {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  .zsup .zsup-launcher__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .zsup .zsup-panel {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 88vh;
    height: 88dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .zsup .zsup-panel {
    animation: zsup-rise 160ms ease-out;
  }

  @keyframes zsup-rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
  }
}

@media print {
  .zsup {
    display: none !important;
  }
}
