.fsi-support {
  --support-clearance: 100px;
  --support-viewport-height: 100dvh;
  --support-blue: #175cdb;
  color: #19314b;
  font:
    14px/1.5 Inter,
    Arial,
    sans-serif;
}
.fsi-support [hidden] {
  display: none !important;
}
.fsi-support-launch {
  position: fixed;
  right: 20px;
  bottom: calc(var(--support-clearance) + env(safe-area-inset-bottom));
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 11px 17px;
  border: 1px solid #ffffff80;
  border-radius: 28px;
  background: var(--support-blue);
  color: #fff;
  font:
    600 14px/1.3 Inter,
    Arial,
    sans-serif;
  box-shadow: 0 5px 20px #175cdb40;
  cursor: pointer;
}
.fsi-support-launch:hover {
  background: #1049b4;
}
.fsi-support:has(dialog[open]) .fsi-support-launch,
body:has(dialog[open]:not(.fsi-support-dialog)) .fsi-support-launch {
  visibility: hidden;
}
.fsi-support-dialog {
  position: fixed;
  inset: auto 20px 20px auto;
  margin: 0;
  width: 340px;
  max-width: calc(100% - 24px);
  max-height: min(560px, calc(var(--support-viewport-height) - 24px));
  padding: 0;
  border: 1px solid #d9e2ef;
  border-radius: 18px;
  background: #f6f8fc;
  color: #19314b;
  box-shadow: 0 12px 50px #12305a38;
  overflow: hidden;
}
.fsi-support-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: fsi-support-enter 0.18s ease-out;
}
.fsi-support-dialog::backdrop {
  background: #152b4314;
}
.fsi-support-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 12px 12px 12px 16px;
  background: linear-gradient(115deg, #175cdb, #2875ee);
  color: #fff;
}
.fsi-support-header img {
  border-radius: 50%;
}
.fsi-support-header h2 {
  margin: 0;
  font:
    600 15px/1.3 Inter,
    Arial,
    sans-serif;
  color: inherit;
}
.fsi-support-header p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #e5eeff;
}
.fsi-support-header > button {
  margin-left: auto;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}
.fsi-support-header > button:hover {
  background: #ffffff20;
}
.fsi-support-thread {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 16px 16px 4px;
}
.fsi-support-agent {
  margin: 0 24px 12px 0;
}
.fsi-support-agent > span {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  color: #63758b;
}
.fsi-support-agent p,
.fsi-support-visitor {
  margin: 0;
  padding: 10px 12px;
  border-radius: 3px 13px 13px;
  background: #fff;
  border: 1px solid #e2e8f1;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.fsi-support-visitor {
  margin: 0 0 12px 30px;
  border: 0;
  border-radius: 13px 3px 13px 13px;
  background: var(--support-blue);
  color: #fff;
  max-height: 120px;
  overflow-y: auto;
}
.fsi-support-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-shrink: 0;
  gap: 7px;
  padding: 0 16px 12px;
}
.fsi-support-topics button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #b7cdf3;
  border-radius: 10px;
  background: #fff;
  color: #17499b;
  font:
    500 12px/1.4 Inter,
    Arial,
    sans-serif;
  text-align: left;
  cursor: pointer;
}
.fsi-support-topics button:hover {
  background: #eaf1ff;
  border-color: var(--support-blue);
}
.fsi-support-composer {
  display: grid;
  flex-shrink: 0;
  gap: 8px;
  margin: 0;
  padding: 0 16px 12px;
  max-height: calc(var(--support-viewport-height) - 150px);
  overflow-y: auto;
}
.fsi-support-composer input,
.fsi-support-composer textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  border: 1px solid #bac9df;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #19314b;
  font:
    400 16px/1.5 Inter,
    Arial,
    sans-serif;
}
.fsi-support-composer textarea {
  min-height: 84px;
  max-height: 150px;
  resize: vertical;
}
.fsi-support :focus-visible {
  outline: 3px solid #6ea8ff;
  outline-offset: 2px;
}
.fsi-support-note {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #63758b;
}
.fsi-support-back {
  justify-self: start;
  min-height: 44px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #1751b2;
  font:
    500 12px/1.4 Inter,
    Arial,
    sans-serif;
  cursor: pointer;
}
.fsi-support-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--support-blue);
  color: #fff;
  font:
    600 13px/1.4 Inter,
    Arial,
    sans-serif;
  cursor: pointer;
}
.fsi-support-send:disabled {
  opacity: 0.55;
  cursor: wait;
}
.fsi-support [role="alert"] {
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fff0ed;
  color: #8d3426;
  font-size: 12px;
}
.fsi-support-trap,
.fsi-support-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.fsi-support-trap {
  left: -10000px;
}
.fsi-support-complete {
  flex-shrink: 0;
  padding: 0 16px 12px;
}
.fsi-support-complete p {
  margin: 0 0 12px;
  font-size: 13px;
}
.fsi-support-footer {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid #e2e8f1;
  background: #fff;
  font-size: 10px;
  color: #63758b;
}
.fsi-support-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@keyframes fsi-support-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 600px) {
  .fsi-support-launch {
    right: 12px;
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
  }
  .fsi-support-launch span {
    display: none;
  }
  .fsi-support-dialog {
    inset: auto 12px max(12px, env(safe-area-inset-bottom)) 12px;
    margin-left: auto;
    width: auto;
    max-width: 340px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fsi-support-dialog[open] {
    animation: none;
  }
}
