.live-support {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.live-support-button {
  width: 54px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  padding: 0;
  color: #050505;
  background: #f6f7f8;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 21px;
  font-weight: 800;
}

.support-action-stack {
  display: grid;
  justify-items: end;
  gap: 10px;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.live-support.is-open .support-action-stack {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.live-support-button i {
  color: #0aa66a;
}

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

.live-chat-panel {
  position: absolute;
  right: 0;
  bottom: 118px;
  width: min(380px, calc(100vw - 28px));
  max-height: calc(100vh - 150px);
  display: none;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f6f7f8;
  background: rgba(12, 13, 15, 0.96);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.55);
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  backdrop-filter: blur(18px);
}

.live-chat-panel.is-open {
  display: block;
}

.live-chat-panel.is-ending .support-form {
  display: none;
}

.live-chat-panel.is-ending .chat-thread {
  max-height: 118px;
}

.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(123, 216, 143, 0.08));
}

.chat-panel-head span {
  display: block;
  color: #7bd88f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-panel-head strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}

.chat-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-head-tool {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.chat-head-tool:hover,
.chat-head-tool:focus {
  border-color: rgba(123, 216, 143, 0.55);
  background: rgba(123, 216, 143, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.chat-thread {
  max-height: 210px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.chat-bubble {
  max-width: 86%;
  justify-self: end;
  padding: 11px 13px;
  border-radius: 8px;
  color: #05110c;
  background: #d9ffe1;
}

.chat-bubble.is-support {
  justify-self: start;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.support-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.support-form label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.support-form textarea {
  min-height: 86px;
}

.chat-attachment-field {
  position: relative;
}

.chat-attachment-field input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chat-attachment-field em {
  width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.055);
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease;
}

.chat-attachment-field:hover em,
.chat-attachment-field:focus-within em {
  border-color: rgba(78, 205, 196, 0.62);
  background: rgba(78, 205, 196, 0.11);
}

.support-form-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.chat-icon-tool {
  width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
  cursor: pointer;
  font-size: 17px;
}

.chat-icon-tool:hover,
.chat-icon-tool:focus {
  border-color: rgba(78, 205, 196, 0.58);
  color: #fff;
  background: rgba(78, 205, 196, 0.13);
  outline: none;
}

.chat-secondary-link {
  justify-self: start;
  border: 0;
  padding: 0;
  color: #8bd7ff;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.chat-secondary-link:hover,
.chat-secondary-link:focus {
  color: #fff;
  outline: none;
}

.chat-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.chat-status {
  min-height: 18px;
  margin: 0;
  color: #7bd88f;
  font-size: 12px;
  font-weight: 800;
}

.chat-file-status {
  min-height: 16px;
  margin: -2px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.chat-close-form {
  display: none;
  padding: 0 14px 14px;
}

.chat-close-form.is-visible {
  display: block;
}

.chat-close-card {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at top left, rgba(31, 122, 255, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chat-close-kicker {
  color: #7bd88f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-close-card strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.chat-close-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  line-height: 1.45;
}

.chat-close-form label {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.chat-close-form textarea {
  min-height: 82px;
}

.chat-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.chat-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chat-rating label {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.chat-rating label::before {
  margin-right: 4px;
  content: "\f005";
  font-family: FontAwesome;
  font-size: 12px;
}

.chat-rating input:checked + label {
  border-color: rgba(78, 205, 196, 0.76);
  color: #fff;
  background: linear-gradient(135deg, #1f7aff, #4ecdc4 54%, #7bd88f);
  transform: translateY(-2px);
}

.chat-transcript-option {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.chat-transcript-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #7bd88f;
}

.chat-close-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.button-ghost {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 999px;
  padding: 0 15px;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.scroll-top {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  position: fixed !important;
  left: 18px !important;
  right: auto !important;
  bottom: 18px !important;
  z-index: 119 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #f6f7f8 !important;
  background: rgba(12, 13, 15, 0.84) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-size: 18px !important;
  text-align: center;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.scroll-top.scroll-top-visible {
  visibility: visible;
  opacity: 1;
}

.scroll-top:hover,
.scroll-top:focus {
  color: #fff !important;
  transform: translateY(-2px);
  outline: none;
}

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

  .live-chat-panel {
    bottom: 124px;
  }

  .support-form-actions {
    grid-template-columns: 1fr auto auto;
  }

  .chat-close-actions {
    grid-template-columns: 1fr;
  }

  .scroll-top {
    left: 14px !important;
    bottom: 12px !important;
  }
}

/* 2026 support widget updates */
.live-support {
  right: 0.5px;
  bottom: 0.5px;
}

.support-action-stack {
  margin: 0 18px 18px 0;
}

.live-support-button {
  color: #fff;
  background: linear-gradient(135deg, #1f7aff, #4ecdc4 54%, #7bd88f);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.live-support-button i {
  color: #fff;
}

.live-support-button:hover,
.live-support-button:focus {
  filter: saturate(1.12);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 22px 66px rgba(78, 205, 196, 0.34);
  outline: none;
}

.live-chat-panel {
  position: fixed;
  right: 0.5px;
  bottom: 0.5px;
  width: min(410px, calc(100vw - 1px));
  max-height: calc(100vh - 1px);
  color: #f9fbff;
  background:
    radial-gradient(circle at top right, rgba(78, 205, 196, 0.14), transparent 32%),
    rgba(9, 11, 14, 0.98);
}

.chat-panel-head {
  background:
    linear-gradient(135deg, rgba(31, 122, 255, 0.24), rgba(78, 205, 196, 0.16)),
    rgba(255, 255, 255, 0.04);
}

.chat-panel-head span,
.support-form label span,
.chat-close-kicker {
  color: #95f3c1;
}

.chat-head-tool.is-muted {
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.04);
}

.chat-bubble {
  color: #05110c;
  background: linear-gradient(135deg, #d9ffe1, #bff3ff);
}

.chat-bubble:not(.is-support) p {
  color: #03140e;
  font-weight: 500;
}

.chat-bubble.is-support {
  color: #f9fbff;
  background: rgba(255, 255, 255, 0.09);
}

.chat-bubble.is-support p {
  color: #f9fbff;
}

.support-form {
  gap: 9px;
}

.support-form input,
.support-form textarea,
.chat-close-form textarea {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.support-form textarea {
  min-height: 78px;
  resize: none;
}

.support-form-actions {
  grid-template-columns: repeat(3, 48px);
  justify-content: end;
}

.chat-send-tool {
  border: 0;
  background: linear-gradient(135deg, #1f7aff, #4ecdc4 54%, #7bd88f);
}

.chat-icon-tool,
.chat-attachment-field em {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.chat-icon-tool:hover,
.chat-icon-tool:focus,
.chat-attachment-field:hover em,
.chat-attachment-field:focus-within em {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(78, 205, 196, 0.18);
}

.chat-icon-tool.is-listening {
  border-color: rgba(78, 205, 196, 0.7);
  color: #fff;
  background: linear-gradient(135deg, #1f7aff, #4ecdc4 54%, #7bd88f);
}

.chat-close-confirm {
  margin: 8px 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 122, 255, 0.16), rgba(78, 205, 196, 0.12), rgba(123, 216, 143, 0.1)),
    rgba(255, 255, 255, 0.055);
}

.chat-close-confirm[hidden] {
  display: none;
}

.chat-close-confirm p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.chat-close-confirm div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-close-confirm .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.chat-transcript-option {
  display: grid;
}

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

  .support-action-stack {
    margin: 0 12px 12px 0;
  }

  .live-chat-panel {
    right: 0.5px;
    bottom: 0.5px;
    width: min(410px, calc(100vw - 1px));
  }
}

/* Floating action sizing polish. */
.live-support-button {
  width: 46px;
  min-height: 46px;
  font-size: 29px;
}

.live-support-button i {
  font-size: 29px;
  line-height: 1;
}

@media (max-width: 640px) {
  .live-support-button {
    width: 44px;
    min-height: 44px;
    font-size: 28px;
  }

  .live-support-button i {
    font-size: 28px;
  }
}

/* Chat composer and close-flow polish. */
.chat-bubble:not(.is-support) small {
  color: rgba(5, 17, 12, 0.66);
  font-weight: 800;
}

.chat-receipt {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  color: rgba(5, 17, 12, 0.62);
  font-family: FontAwesome;
  font-size: 11px;
  letter-spacing: -4px;
  vertical-align: middle;
}

.chat-receipt::before {
  content: "\f00c";
}

.chat-receipt.is-delivered::after,
.chat-receipt.is-read::after {
  content: "\f00c";
  margin-left: 2px;
}

.chat-receipt.is-read {
  color: #168dff;
}

.chat-contact-fields {
  display: grid;
  gap: 9px;
}

.live-support.has-contact .chat-contact-fields {
  display: none;
}

.live-support.has-contact .chat-thread {
  max-height: 280px;
}

.chat-message-field {
  display: grid;
  gap: 6px;
}

.chat-message-field > label {
  color: #95f3c1;
  font-size: 12px;
  font-weight: 800;
}

.chat-message-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

.chat-message-box:focus-within {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.chat-message-box textarea {
  width: 100%;
  min-height: 92px;
  border: 0;
  padding: 13px 76px 13px 14px;
  background: transparent;
  resize: none;
  max-width: none;
}

.chat-message-box textarea:focus {
  outline: none;
  max-width: none;
}

.chat-message-box .support-form-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 15%;
  min-width: 58px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(31, 122, 255, 0.12), rgba(78, 205, 196, 0.1)),
    rgba(255, 255, 255, 0.045);
}

.chat-message-box .chat-send-tool {
  grid-column: auto;
}

.chat-message-box .chat-attachment-field {
  grid-column: auto;
}

.chat-message-box .chat-icon-tool {
  width: 34px;
  min-height: 34px;
  font-size: 14px;
}

.chat-message-box .chat-attachment-field {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.chat-message-box .chat-attachment-field em {
  width: 34px;
  min-height: 34px;
  font-size: 14px;
}

.chat-close-confirm .button-primary {
  color: #06130f;
  background: linear-gradient(135deg, #4ecdc4, #7bd88f);
}

.chat-close-actions {
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.chat-close-actions .button-primary {
  grid-column: 1 / -1;
}

.chat-close-actions .button {
  min-width: 0;
  white-space: normal;
}

.chat-close-direct {
  border-color: rgba(149, 243, 193, 0.24) !important;
  color: #95f3c1 !important;
}

.chat-close-direct:hover,
.chat-close-direct:focus {
  border-color: rgba(149, 243, 193, 0.54) !important;
  background: rgba(149, 243, 193, 0.12) !important;
}

@media (max-width: 420px) {
  .chat-message-box textarea {
    padding-right: 14px;
    padding-bottom: 50px;
  }

  .chat-message-box .support-form-actions {
    right: 10px;
    left: auto;
  }

  .chat-close-actions {
    grid-template-columns: 1fr;
  }

  .chat-close-actions .button-primary {
    grid-column: auto;
  }
}
