.an-support {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  font-family: Inter, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.an-support * {
  box-sizing: border-box;
}

.an-support-button {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: #0d9488;
  color: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.24);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.an-support-panel {
  width: min(378px, calc(100vw - 28px));
  max-height: min(690px, calc(100dvh - 36px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #eef1f5;
  color: #07091a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.an-support.is-open .an-support-panel {
  display: flex;
}

.an-support.is-open .an-support-button {
  display: none;
}

.an-support-hero {
  position: relative;
  min-height: 108px;
  padding: 12px 16px 16px;
  flex: 0 0 auto;
  color: #ffffff;
  background: #090b1e;
}

.an-support-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
}

.an-support-greeting p,
.an-support-greeting h2 {
  margin: 0;
}

.an-support-greeting p {
  max-width: calc(100% - 54px);
  color: #f8fafc;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

.an-support-greeting h2 {
  max-width: calc(100% - 22px);
  margin-top: 6px;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.an-support-body {
  padding: 12px 12px 16px;
  flex: 1 1 auto;
  overflow-y: auto;
  background: #eef1f5;
}

.an-support.is-chatting .an-support-body {
  padding: 0;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.an-support.is-chatting .an-support-menu,
.an-support.is-chatting .an-support-send-card,
.an-support.is-chatting .an-support-help {
  display: none;
}

.an-support-menu,
.an-support-send-card,
.an-support-help {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.an-support-menu {
  overflow: hidden;
}

.an-support-menu-row {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  color: #07091a;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 850;
  text-align: left;
  letter-spacing: 0;
}

.an-support-menu-row:last-child {
  border-bottom: 0;
}

.an-support-menu-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.an-support-menu-row strong,
.an-support-menu-row em {
  width: 33px;
  height: 33px;
  border-radius: 999px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.an-support-menu-row strong {
  background: #2f7de1;
}

.an-support-menu-row em {
  background: #22283a;
}

.an-support-send-card {
  min-height: 58px;
  margin-top: 12px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #07091a;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 850;
  text-align: left;
}

.an-support-send-card svg,
.an-support-faq svg {
  flex: 0 0 auto;
  color: #283142;
}

.an-support-help {
  margin-top: 13px;
  padding: 12px 14px;
}

.an-support-search {
  min-height: 50px;
  margin-bottom: 12px;
  border-radius: 13px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #eef1f5;
  color: #253044;
}

.an-support-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #07091a;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.an-support-search input::placeholder {
  color: #66738e;
  opacity: 1;
}

.an-support-search svg {
  flex: 0 0 auto;
  color: #253044;
}

.an-support-faqs {
  display: grid;
}

.an-support-faq {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  color: #07091a;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  letter-spacing: 0;
}

.an-support-faq:last-child {
  border-bottom: 0;
}

.an-support-faq span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.an-support-faq[hidden] {
  display: none;
}

.an-support-empty {
  margin: 10px 0 2px;
  color: #64748b;
  font-size: 13px;
}

.an-support-answer {
  margin-top: 12px;
  border-left: 4px solid #0d9488;
  border-radius: 13px;
  padding: 12px;
  background: #f8fafc;
  color: #07091a;
}

.an-support-answer[hidden] {
  display: none;
}

.an-support-answer h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 850;
}

.an-support-answer p {
  margin: 7px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.an-support-answer-action {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #0d9488;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.an-support-chat {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.an-support-chat[hidden] {
  display: none;
}

.an-support-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background:
    radial-gradient(
      circle at top left,
      rgba(13, 148, 136, 0.11),
      transparent 34%
    ),
    #f8fafc;
}

.an-support-chat-row {
  display: flex;
}

.an-support-chat-row.user {
  justify-content: flex-end;
}

.an-support-chat-bubble {
  max-width: 88%;
  border-radius: 18px;
  padding: 10px 12px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #dbeafe;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.an-support-chat-row.assistant .an-support-chat-bubble {
  border-bottom-left-radius: 6px;
}

.an-support-chat-row.user .an-support-chat-bubble {
  border: 0;
  border-bottom-right-radius: 6px;
  background: #0f766e;
  color: #ffffff;
}

.an-support-chat-bubble a {
  color: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.an-support-chat-status {
  min-height: 0;
  margin: 0;
  padding: 0 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.an-support-chat-status:not(:empty) {
  padding-top: 6px;
  padding-bottom: 4px;
}

.an-support-chat-status.is-error {
  color: #b91c1c;
}

.an-support-composer {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.an-support-composer textarea {
  min-width: 0;
  min-height: 44px;
  max-height: 118px;
  flex: 1 1 auto;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 11px 14px;
  resize: none;
  outline: 0;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  overflow-y: auto;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.an-support-composer textarea::placeholder {
  color: #94a3b8;
}

.an-support-composer textarea:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.an-support-chat-send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}

.an-support-chat-send:disabled {
  background: #cbd5e1;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
}

.an-support-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) {
  .an-support-button:hover,
  .an-support-menu-row:hover,
  .an-support-send-card:hover,
  .an-support-faq:hover,
  .an-support-answer-action:hover,
  .an-support-close:hover,
  .an-support-chat-send:hover {
    filter: brightness(0.98);
  }
}

@media (max-width: 640px) {
  .an-support {
    right: 12px;
    bottom: 12px;
  }

  .an-support-button {
    width: 54px;
    height: 54px;
  }

  .an-support-panel {
    width: min(360px, calc(100vw - 24px));
    max-height: min(620px, calc(100dvh - 24px));
    border-radius: 18px;
  }

  .an-support-body {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .an-support-panel {
    width: calc(100vw - 18px);
    max-height: min(600px, calc(100dvh - 18px));
  }

  .an-support-greeting p {
    font-size: 19px;
  }

  .an-support-greeting h2 {
    font-size: 23px;
  }

  .an-support-menu-row,
  .an-support-send-card {
    font-size: 16px;
  }

  .an-support-faq {
    font-size: 14px;
  }
}
