/* SpacePayment support widget — muted emerald HUD (match landing) */

.ps-sc-root {
  --ps-sc-ink: #dceee4;
  --ps-sc-muted: #8fb89e;
  --ps-sc-faint: #5f8a72;
  --ps-sc-bg: #020805;
  --ps-sc-panel: rgba(4, 16, 10, 0.88);
  --ps-sc-panel-2: rgba(6, 20, 12, 0.94);
  --ps-sc-line: rgba(59, 184, 122, 0.16);
  --ps-sc-line-strong: rgba(59, 184, 122, 0.34);
  --ps-sc-accent: #3bb87a;
  --ps-sc-accent-2: #2a9a62;
  --ps-sc-accent-hi: #7ec9a4;
  --ps-sc-accent-soft: rgba(59, 184, 122, 0.16);
  --ps-sc-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(59, 184, 122, 0.12);
  --ps-sc-font: "Manrope", system-ui, sans-serif;
  --ps-sc-font-mark: "Orbitron", system-ui, sans-serif;
  --ps-sc-danger: #ff7a7a;
  --ps-sc-clip-panel: polygon(
    0 10px,
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%
  );
  --ps-sc-clip-chip: polygon(
    0 8px,
    8px 0,
    100% 0,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    0 100%
  );
  --ps-sc-clip-btn: polygon(
    0 6px,
    6px 0,
    100% 0,
    100% calc(100% - 6px),
    calc(100% - 6px) 100%,
    0 100%
  );
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: var(--ps-sc-font);
  color: var(--ps-sc-ink);
  color-scheme: dark;
}

.ps-sc-root * {
  box-sizing: border-box;
}

.ps-sc-launcher {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(59, 184, 122, 0.45);
  border-radius: 0;
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(95, 191, 144, 0.18), transparent 42%),
    linear-gradient(165deg, #0a1c12 0%, #041008 100%);
  box-shadow:
    var(--ps-sc-shadow),
    inset 0 0 0 1px rgba(126, 201, 164, 0.12),
    0 0 18px rgba(59, 184, 122, 0.18);
  clip-path: var(--ps-sc-clip-chip);
  display: grid;
  place-items: center;
  color: var(--ps-sc-accent-hi);
  position: relative;
}

.ps-sc-launcher::before,
.ps-sc-launcher::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--ps-sc-accent);
  border-style: solid;
  pointer-events: none;
  opacity: 0.85;
}

.ps-sc-launcher::before {
  top: 5px;
  left: 5px;
  border-width: 1.5px 0 0 1.5px;
}

.ps-sc-launcher::after {
  right: 5px;
  bottom: 5px;
  border-width: 0 1.5px 1.5px 0;
}

.ps-sc-launcher img,
.ps-sc-launcher svg {
  width: 28px;
  height: 28px;
  display: block;
  position: relative;
  z-index: 1;
}

.ps-sc-launcher:hover {
  border-color: rgba(126, 201, 164, 0.65);
  color: #e8f7ef;
  box-shadow:
    var(--ps-sc-shadow),
    inset 0 0 0 1px rgba(126, 201, 164, 0.2),
    0 0 22px rgba(59, 184, 122, 0.28);
}

.ps-sc-panel {
  width: min(360px, calc(100vw - 28px));
  display: none;
  flex-direction: column;
  margin-bottom: 12px;
}

.ps-sc-root.is-open .ps-sc-panel {
  display: flex;
}

.ps-sc-root.is-open .ps-sc-launcher {
  display: none;
}

.ps-sc-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ps-sc-avatar {
  width: 44px;
  height: 44px;
  margin-top: 8px;
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(95, 191, 144, 0.22), transparent 50%),
    linear-gradient(165deg, #0d2216, #041008);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 184, 122, 0.28);
  border: 1px solid rgba(59, 184, 122, 0.42);
  clip-path: var(--ps-sc-clip-chip);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.ps-sc-avatar img {
  width: 28px;
  height: 28px;
}

.ps-sc-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-sc-bubble {
  background:
    radial-gradient(ellipse 90% 55% at 12% 0%, rgba(59, 184, 122, 0.12), transparent 55%),
    linear-gradient(165deg, var(--ps-sc-panel-2) 0%, var(--ps-sc-panel) 55%, rgba(2, 8, 5, 0.96) 100%);
  border: 1px solid var(--ps-sc-line-strong);
  border-radius: 0;
  clip-path: var(--ps-sc-clip-panel);
  box-shadow: var(--ps-sc-shadow);
  padding: 12px 12px 14px;
  position: relative;
  min-width: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ps-sc-bubble::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ps-sc-accent-hi), var(--ps-sc-accent), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.ps-sc-bubble::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(59, 184, 122, 0.12);
  clip-path: polygon(
    0 6px,
    6px 0,
    100% 0,
    100% calc(100% - 6px),
    calc(100% - 6px) 100%,
    0 100%
  );
  pointer-events: none;
  opacity: 0.7;
}

.ps-sc-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ps-sc-faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  clip-path: var(--ps-sc-clip-btn);
}

.ps-sc-close:hover {
  color: var(--ps-sc-accent-hi);
  border-color: rgba(59, 184, 122, 0.35);
  background: var(--ps-sc-accent-soft);
}

.ps-sc-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ps-sc-font-mark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-sc-ink);
  margin: 0 26px 8px 0;
  position: relative;
  z-index: 1;
}

.ps-sc-dot {
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--ps-sc-accent);
  box-shadow: 0 0 0 3px var(--ps-sc-accent-soft), 0 0 10px rgba(59, 184, 122, 0.45);
}

.ps-sc-thread-shell {
  position: relative;
  max-height: 280px;
  z-index: 1;
}

.ps-sc-thread {
  max-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ps-sc-thread::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

.ps-sc-scroll-rail {
  position: absolute;
  top: 2px;
  right: 1px;
  bottom: 2px;
  width: 3px;
  border-radius: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  background: rgba(4, 17, 10, 0.55);
}

.ps-sc-thread-shell.has-scroll .ps-sc-scroll-rail {
  opacity: 1;
  pointer-events: auto;
}

.ps-sc-scroll-thumb {
  width: 100%;
  min-height: 28px;
  border-radius: 0;
  background: rgba(59, 184, 122, 0.42);
  box-shadow: inset 0 0 0 1px rgba(126, 201, 164, 0.2);
  border: 0;
  cursor: grab;
  transform: translateY(0);
  will-change: transform;
}

.ps-sc-scroll-thumb:hover {
  background: rgba(126, 201, 164, 0.55);
}

.ps-sc-scroll-thumb:active {
  cursor: grabbing;
  background: rgba(126, 201, 164, 0.68);
}

.ps-sc-date {
  align-self: center;
  font-size: 11px;
  color: var(--ps-sc-faint);
  margin: 2px 0 4px;
  letter-spacing: 0.04em;
}

.ps-sc-msg {
  max-width: 100%;
  width: fit-content;
  padding: 8px 11px;
  border-radius: 0;
  clip-path: var(--ps-sc-clip-btn);
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.ps-sc-msg.is-system,
.ps-sc-msg.is-staff {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--ps-sc-line);
  color: var(--ps-sc-ink);
  max-width: 100%;
}

.ps-sc-msg.is-staff {
  border-color: rgba(59, 184, 122, 0.32);
  background: rgba(59, 184, 122, 0.1);
}

.ps-sc-msg.is-visitor {
  align-self: flex-end;
  background: rgba(59, 184, 122, 0.16);
  border: 1px solid rgba(59, 184, 122, 0.42);
  color: var(--ps-sc-ink);
  max-width: 100%;
}

.ps-sc-msg a.ps-sc-file {
  color: var(--ps-sc-accent-hi);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ps-sc-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.ps-sc-choice {
  border: 1px solid var(--ps-sc-line-strong);
  background: rgba(2, 8, 5, 0.55);
  border-radius: 0;
  clip-path: var(--ps-sc-clip-btn);
  padding: 7px 12px;
  font: inherit;
  font-family: var(--ps-sc-font-mark);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ps-sc-ink);
}

.ps-sc-choice:hover {
  border-color: rgba(126, 201, 164, 0.55);
  background: var(--ps-sc-accent-soft);
  color: #e8f7ef;
}

.ps-sc-closed-note {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--ps-sc-muted);
  width: 100%;
  position: relative;
  z-index: 1;
}

.ps-sc-wrap {
  position: relative;
  width: 100%;
}

.ps-sc-composer {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  background:
    linear-gradient(165deg, var(--ps-sc-panel-2) 0%, var(--ps-sc-panel) 100%);
  border-radius: 0;
  clip-path: var(--ps-sc-clip-panel);
  box-shadow: var(--ps-sc-shadow);
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--ps-sc-line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ps-sc-composer input[type="text"] {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  min-width: 0;
  color: var(--ps-sc-ink);
}

.ps-sc-composer input::placeholder {
  color: var(--ps-sc-faint);
}

.ps-sc-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 0;
  clip-path: var(--ps-sc-clip-btn);
  background: transparent;
  color: var(--ps-sc-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.ps-sc-icon-btn:hover {
  color: var(--ps-sc-accent-hi);
  background: var(--ps-sc-accent-soft);
  border-color: rgba(59, 184, 122, 0.3);
}

.ps-sc-icon-btn svg {
  width: 18px;
  height: 18px;
}

.ps-sc-send {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(126, 201, 164, 0.35);
  border-radius: 0;
  clip-path: var(--ps-sc-clip-chip);
  cursor: pointer;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #041008;
  background: linear-gradient(135deg, #5fbf90 0%, #3bb87a 45%, #2a9a62 100%);
  box-shadow: 0 0 14px rgba(59, 184, 122, 0.28);
}

.ps-sc-send:hover {
  filter: brightness(1.06);
  box-shadow: 0 0 18px rgba(59, 184, 122, 0.36);
}

.ps-sc-send:active {
  transform: scale(0.96);
}

.ps-sc-send svg {
  width: 17px;
  height: 17px;
  margin-left: 1px;
}

.ps-sc-error {
  font-size: 12px;
  color: var(--ps-sc-danger);
  padding: 0 6px;
}

.ps-sc-emoji-pop {
  position: absolute;
  right: 52px;
  bottom: 52px;
  background: var(--ps-sc-panel-2);
  border: 1px solid var(--ps-sc-line-strong);
  border-radius: 0;
  clip-path: var(--ps-sc-clip-panel);
  box-shadow: var(--ps-sc-shadow);
  padding: 8px;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  z-index: 2;
}

.ps-sc-emoji-pop.is-open {
  display: grid;
}

.ps-sc-emoji-pop button {
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  border-radius: 0;
  clip-path: var(--ps-sc-clip-btn);
  padding: 4px;
}

.ps-sc-emoji-pop button:hover {
  background: var(--ps-sc-accent-soft);
}

@media (max-width: 480px) {
  .ps-sc-root {
    right: 12px;
    bottom: 12px;
  }
  .ps-sc-thread {
    max-height: 42vh;
  }
}
