.flb-chat {
  --flb-chat-ink: var(--ink, var(--bg-black, #0b1116));
  --flb-chat-navy: var(--navy-2, #152631);
  --flb-chat-gold: var(--brass-light, #d5c29a);
  --flb-chat-gold-dark: var(--brass, #b79a67);
  --flb-chat-cyan: #4fd9e7;
  --flb-chat-paper: var(--paper, #faf9f5);
  --flb-chat-white: var(--white, #fff);
  --flb-chat-muted: #9dafb8;
  --flb-chat-line: rgba(255, 255, 255, .12);
  --flb-chat-font: var(--sans, var(--font-body, 'Segoe UI', Arial, sans-serif));
  position: fixed;
  z-index: 13000;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(394px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--flb-chat-white);
  font-family: var(--flb-chat-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  isolation: isolate;
}

.flb-chat,
.flb-chat *,
.flb-chat *::before,
.flb-chat *::after {
  box-sizing: border-box;
}

.flb-chat [hidden] {
  display: none !important;
}

.flb-chat button,
.flb-chat input,
.flb-chat select,
.flb-chat textarea {
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.flb-chat button,
.flb-chat a,
.flb-chat input,
.flb-chat select,
.flb-chat textarea {
  -webkit-tap-highlight-color: transparent;
}

.flb-chat h2,
.flb-chat p {
  margin: 0;
}

.flb-chat a {
  color: inherit;
  text-decoration: none;
}

.flb-chat__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 13px);
  width: 100%;
  height: min(650px, calc(100dvh - 112px - env(safe-area-inset-bottom)));
  min-height: 410px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(213, 194, 154, .3);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% -8%, rgba(79, 217, 231, .12), transparent 34%),
    linear-gradient(155deg, #132832 0%, #0b151c 48%, #080f14 100%);
  box-shadow: 0 28px 90px rgba(3, 9, 13, .46), 0 5px 22px rgba(3, 9, 13, .3);
  transform-origin: 90% 100%;
  animation: flb-chat-panel-in 190ms cubic-bezier(.2, .8, .2, 1) both;
}

.flb-chat__header {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr 38px;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 13px 14px 13px 17px;
  border-bottom: 1px solid var(--flb-chat-line);
  background: rgba(7, 16, 22, .48);
}

.flb-chat__header::after {
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 1px;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(213, 194, 154, .45), transparent);
}

.flb-chat__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(213, 194, 154, .58);
  border-radius: 50%;
  color: var(--flb-chat-gold);
  background: rgba(213, 194, 154, .07);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.flb-chat__heading {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.flb-chat__eyebrow {
  overflow: hidden;
  color: var(--flb-chat-gold);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .17em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.flb-chat__title {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.flb-chat__minimize {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
}

.flb-chat__minimize span {
  width: 14px;
  height: 1px;
  display: block;
  background: rgba(255, 255, 255, .82);
}

.flb-chat__minimize:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
}

.flb-chat__presence {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #bdc8ce;
  background: rgba(255, 255, 255, .025);
  font-size: 11px;
  line-height: 1.35;
}

.flb-chat__presence-dot,
.flb-chat__launcher-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: #82909a;
  box-shadow: 0 0 0 3px rgba(130, 144, 154, .1);
}

.flb-chat.is-online .flb-chat__presence-dot,
.flb-chat.is-online .flb-chat__launcher-dot {
  border-color: rgba(79, 217, 231, .25);
  background: var(--flb-chat-cyan);
  box-shadow: 0 0 0 3px rgba(79, 217, 231, .12), 0 0 13px rgba(79, 217, 231, .38);
}

.flb-chat.is-checking .flb-chat__launcher-dot {
  animation: flb-chat-pulse 1.4s ease-in-out infinite;
}

.flb-chat__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-color: rgba(213, 194, 154, .38) transparent;
  scrollbar-width: thin;
}

.flb-chat__prechat {
  padding: 20px 20px 18px;
}

.flb-chat__welcome {
  margin-bottom: 18px;
}

.flb-chat__kicker {
  margin-bottom: 7px !important;
  color: var(--flb-chat-gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.flb-chat__welcome h2 {
  color: #fff;
  font-family: var(--display, Georgia, 'Times New Roman', serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.08;
}

.flb-chat__welcome > p:last-child {
  margin-top: 7px;
  color: var(--flb-chat-muted);
  font-size: 12px;
  line-height: 1.5;
}

.flb-chat__form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.flb-chat__field {
  min-width: 0;
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
}

.flb-chat__field--split {
  grid-column: auto;
}

.flb-chat__field label {
  color: #d9e0e4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.flb-chat__optional {
  margin-left: 5px;
  color: #7f939e;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .04em;
}

.flb-chat__field input,
.flb-chat__field select,
.flb-chat__field textarea,
.flb-chat__reply textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px;
  outline: 0;
  color: #f8fafb;
  background: rgba(255, 255, 255, .055);
  box-shadow: none;
  caret-color: var(--flb-chat-cyan);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.flb-chat__field input,
.flb-chat__field select {
  height: 42px;
  padding: 0 11px;
  font-size: 13px;
}

.flb-chat__field select {
  padding-right: 28px;
  color: #f8fafb;
  background-color: #152631;
  color-scheme: dark;
}

.flb-chat__field select option {
  color: #f8fafb;
  background-color: #152631;
}

.flb-chat__field select option:checked {
  color: #081116;
  background-color: #d5c29a;
}

.flb-chat__field textarea {
  min-height: 88px;
  resize: vertical;
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.45;
}

.flb-chat__field input:hover,
.flb-chat__field select:hover,
.flb-chat__field textarea:hover,
.flb-chat__reply textarea:hover {
  border-color: rgba(213, 194, 154, .36);
}

.flb-chat__field input:focus,
.flb-chat__field select:focus,
.flb-chat__field textarea:focus,
.flb-chat__reply textarea:focus {
  border-color: var(--flb-chat-cyan);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 0 0 3px rgba(79, 217, 231, .1);
}

.flb-chat__trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.flb-chat__consent {
  display: grid;
  grid-template-columns: 17px 1fr;
  grid-column: 1 / -1;
  align-items: start;
  gap: 9px;
  color: #96a6ae;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.45;
}

.flb-chat__consent input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--flb-chat-cyan);
}

.flb-chat__consent a,
.flb-chat__fallback a,
.flb-chat__footer a {
  color: var(--flb-chat-gold);
  text-decoration: underline;
  text-decoration-color: rgba(213, 194, 154, .45);
  text-underline-offset: 3px;
}

.flb-chat__submit {
  min-height: 44px;
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 15px;
  border: 1px solid var(--flb-chat-gold);
  border-radius: 9px;
  color: #101a20;
  cursor: pointer;
  background: linear-gradient(135deg, #e3d2ad, var(--flb-chat-gold-dark));
  box-shadow: 0 9px 24px rgba(183, 154, 103, .13);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform 150ms ease, filter 150ms ease;
}

.flb-chat__submit:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.flb-chat__submit-arrow {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.flb-chat button:disabled,
.flb-chat textarea:disabled,
.flb-chat input:disabled,
.flb-chat select:disabled {
  cursor: wait;
  opacity: .58;
}

.flb-chat__fallback {
  margin-top: 14px !important;
  color: #82949e;
  font-size: 10px;
  text-align: center;
}

.flb-chat__error {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border: 1px solid rgba(220, 132, 124, .28);
  border-radius: 8px;
  color: #f1c0bb;
  background: rgba(189, 93, 84, .09);
  font-size: 11px;
  line-height: 1.4;
}

.flb-chat__conversation {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 15px 14px;
}

.flb-chat__conversation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 3px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  color: #81949e;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flb-chat__conversation-meta span:first-child {
  overflow: hidden;
  color: var(--flb-chat-gold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flb-chat__transcript {
  min-height: 170px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  padding: 17px 2px 13px;
  outline: 0;
  scrollbar-color: rgba(213, 194, 154, .35) transparent;
  scrollbar-width: thin;
}

.flb-chat__message {
  max-width: 84%;
  align-self: flex-end;
}

.flb-chat__message--staff {
  align-self: flex-start;
}

.flb-chat__message-author {
  display: block;
  margin: 0 6px 4px;
  color: #81949e;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
}

.flb-chat__message--visitor .flb-chat__message-author {
  text-align: right;
}

.flb-chat__message-body {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(79, 217, 231, .18);
  border-radius: 13px 13px 3px 13px;
  color: #eef7f8;
  background: rgba(41, 122, 135, .22);
  font-size: 13px;
  line-height: 1.46;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.flb-chat__message--staff .flb-chat__message-body {
  border-color: rgba(213, 194, 154, .2);
  border-radius: 13px 13px 13px 3px;
  color: #f1eee8;
  background: rgba(213, 194, 154, .105);
}

.flb-chat__message-time {
  display: block;
  margin: 4px 6px 0;
  color: #657983;
  font-size: 8px;
}

.flb-chat__message--visitor .flb-chat__message-time {
  text-align: right;
}

.flb-chat__empty {
  margin: auto 14px !important;
  padding: 20px 10px;
  color: #879aa4;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.flb-chat__reply {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: end;
  gap: 8px;
  flex: 0 0 auto;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .075);
}

.flb-chat__reply textarea {
  min-height: 43px;
  max-height: 112px;
  resize: vertical;
  padding: 10px 11px;
  font-size: 16px;
  line-height: 1.35;
}

.flb-chat__reply textarea::placeholder {
  color: #778a94;
}

.flb-chat__reply button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(213, 194, 154, .65);
  border-radius: 10px;
  color: #101a20;
  cursor: pointer;
  background: var(--flb-chat-gold);
  font-size: 18px;
}

.flb-chat__error--conversation,
.flb-chat__closed {
  margin-top: 9px !important;
  flex: 0 0 auto;
}

.flb-chat__closed {
  padding: 10px 11px;
  border: 1px solid rgba(213, 194, 154, .2);
  border-radius: 8px;
  color: #b9c3c8;
  background: rgba(213, 194, 154, .07);
  font-size: 11px;
  line-height: 1.45;
}

.flb-chat__new {
  min-height: 38px;
  margin-top: 9px !important;
  padding: 0 13px;
  border: 1px solid rgba(213, 194, 154, .5);
  border-radius: 8px;
  color: var(--flb-chat-gold);
  cursor: pointer;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.flb-chat__footer {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, .065);
  color: #667983;
  background: rgba(5, 11, 15, .38);
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.flb-chat__launcher {
  min-height: 62px;
  max-width: 235px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px 9px 11px;
  border: 1px solid rgba(213, 194, 154, .42);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(145deg, #142a35, #0a141b 72%);
  box-shadow: 0 14px 40px rgba(3, 9, 13, .34), inset 0 1px rgba(255, 255, 255, .055);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.flb-chat__launcher:hover {
  border-color: rgba(213, 194, 154, .75);
  box-shadow: 0 17px 48px rgba(3, 9, 13, .42), inset 0 1px rgba(255, 255, 255, .07);
  transform: translateY(-2px);
}

.flb-chat__launcher-icon {
  position: relative;
  width: 43px;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
  border: 1px solid rgba(79, 217, 231, .28);
  border-radius: 50%;
  background: rgba(79, 217, 231, .08);
}

.flb-chat__launcher-icon::after {
  position: absolute;
  right: 7px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  content: '';
  border-right: 1px solid rgba(79, 217, 231, .55);
  transform: rotate(31deg);
}

.flb-chat__launcher-icon > span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--flb-chat-cyan);
  box-shadow: 0 0 7px rgba(79, 217, 231, .45);
}

.flb-chat__launcher-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.flb-chat__launcher-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8fa2ac;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.flb-chat__launcher-dot {
  width: 6px;
  height: 6px;
  border-width: 1px;
  box-shadow: none;
}

.flb-chat__launcher-label {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flb-chat__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.flb-chat button:focus-visible,
.flb-chat a:focus-visible,
.flb-chat input:focus-visible,
.flb-chat select:focus-visible,
.flb-chat textarea:focus-visible {
  outline: 2px solid var(--flb-chat-cyan);
  outline-offset: 2px;
}

body.checkout-open .flb-chat,
body.menu-open .flb-chat,
body.flb-side-checkout-open .flb-chat,
body.flb-network-menu-open .flb-chat,
.flb-chat.is-obscured-by-site-overlay {
  visibility: hidden;
  pointer-events: none;
}

@keyframes flb-chat-panel-in {
  from { opacity: 0; transform: translateY(8px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flb-chat-pulse {
  0%, 100% { opacity: .48; }
  50% { opacity: 1; }
}

@media (max-width: 520px) {
  .flb-chat {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(100% - 20px, 394px);
  }

  .flb-chat__panel {
    height: min(680px, calc(100dvh - 91px - env(safe-area-inset-bottom)));
    min-height: 0;
    border-radius: 16px;
  }

  .flb-chat__prechat {
    padding: 18px 16px 16px;
  }

  .flb-chat__field--split {
    grid-column: 1 / -1;
  }

  .flb-chat__field input,
  .flb-chat__field select,
  .flb-chat__field textarea {
    font-size: 16px;
  }

  .flb-chat__launcher {
    min-height: 58px;
  }
}

@media (max-height: 590px) and (min-width: 521px) {
  .flb-chat__panel {
    height: calc(100dvh - 96px - env(safe-area-inset-bottom));
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flb-chat__panel,
  .flb-chat__launcher,
  .flb-chat__submit,
  .flb-chat input,
  .flb-chat select,
  .flb-chat textarea {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
