.front-support-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1050;
  font-family: inherit;
}

.front-support-trigger {
  position: relative;
  width: 76px;
  height: 76px;
  padding: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 36, 77, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}

.front-support-trigger:hover,
.front-support-trigger:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(20, 36, 77, .32);
}

.front-support-trigger:focus-visible {
  outline: 3px solid rgba(121, 205, 178, .55);
  outline-offset: 3px;
}

.front-support-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.front-support-notification {
  position: absolute;
  top: -3px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--front-coral);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.front-support-prompt {
  position: absolute;
  right: 88px;
  bottom: 18px;
  width: max-content;
  padding: .58rem .8rem;
  border: 1px solid var(--front-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 36, 77, .14);
  color: var(--front-navy);
  font-size: .9rem;
  font-weight: 800;
  animation: front-support-nudge 2.8s ease-in-out infinite;
}

.front-support-prompt::after {
  position: absolute;
  right: -7px;
  top: 50%;
  width: 13px;
  height: 13px;
  border-top: 1px solid var(--front-border);
  border-right: 1px solid var(--front-border);
  background: #fff;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.front-support-chat.is-open .front-support-prompt,
.front-support-chat.is-open .front-support-notification {
  display: none;
}

.front-support-panel {
  position: absolute;
  right: 0;
  bottom: 92px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 2rem));
  max-height: min(650px, calc(100vh - 8.5rem));
  overflow: hidden;
  border: 1px solid var(--front-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(20, 36, 77, .25);
}

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

.front-support-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 40px;
  gap: .7rem;
  align-items: center;
  padding: .8rem .9rem;
  background: var(--front-navy);
  color: #fff;
}

.front-support-header img {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: #fff;
}

.front-support-header h2 {
  margin: 0 0 .1rem;
  font-size: 1rem;
  font-weight: 800;
}

.front-support-header p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: .78rem;
}

.front-support-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.front-support-close:hover,
.front-support-close:focus-visible {
  background: rgba(255, 255, 255, .14);
}

.front-support-conversation {
  flex: 1 1 auto;
  min-height: 190px;
  overflow-y: auto;
  padding: 1rem;
  background: #f7faff;
}

.front-support-message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: .7rem;
  padding: .68rem .8rem;
  border-radius: 8px;
  line-height: 1.65;
  white-space: pre-line;
}

.front-support-message.is-bot {
  border: 1px solid var(--front-border);
  background: #fff;
  color: var(--front-ink);
}

.front-support-message.is-user {
  margin-left: auto;
  background: var(--front-navy);
  color: #fff;
}

.front-support-message a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .7rem;
  color: #17644e;
  font-weight: 800;
}

.front-support-message p {
  margin: 0 0 .65rem;
}

.front-support-message p:last-child {
  margin-bottom: 0;
}

.front-support-message ul,
.front-support-message ol {
  margin: .45rem 0 .65rem;
  padding-left: 1.35rem;
}

.front-support-message li + li {
  margin-top: .3rem;
}

.front-support-message code {
  color: #b92f27;
  font-size: .85em;
}

.front-support-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  padding: .8rem;
  border-top: 1px solid var(--front-border);
  background: #fff;
}

.front-support-option {
  min-height: 42px;
  padding: .5rem .6rem;
  border: 1px solid var(--front-border);
  border-radius: 8px;
  background: #fff;
  color: var(--front-navy);
  font-size: .88rem;
  font-weight: 700;
  transition: border-color .15s ease, background-color .15s ease;
}

.front-support-option:hover,
.front-support-option:focus-visible {
  border-color: var(--front-mint);
  background: rgba(121, 205, 178, .13);
}

.front-support-option.is-secondary {
  grid-column: 1 / -1;
  color: var(--front-muted);
}

@keyframes front-support-nudge {
  0%, 72%, 100% { transform: translateX(0); }
  80% { transform: translateX(-7px); }
  88% { transform: translateX(0); }
  94% { transform: translateX(-3px); }
}

@media (max-width: 575.98px) {
  .front-support-chat {
    right: .8rem;
    bottom: .8rem;
  }

  .front-support-trigger {
    width: 68px;
    height: 68px;
  }

  .front-support-prompt {
    right: 78px;
    bottom: 14px;
  }

  .front-support-panel {
    position: fixed;
    right: .75rem;
    bottom: 5.5rem;
    left: .75rem;
    width: auto;
    max-height: calc(100dvh - 7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .front-support-prompt {
    animation: none;
  }

  .front-support-trigger {
    transition: none;
  }
}
