:root {
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --a: #2563eb;
  --b: #1d4ed8;
  --panel: linear-gradient(180deg, rgba(12, 18, 31, 0.9), rgba(17, 24, 39, 0.84));
  --panel-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.96);
  --muted: rgba(255, 255, 255, 0.72);
  --shadow: rgba(2, 6, 23, 0.4);
}

html,
body.chat-page {
  height: 100%;
  min-height: 100%;
}

body.chat-page {
  touch-action: auto;
  user-select: text;
  color: var(--text);
  overflow: hidden;
}

body.chat-page,
body.chat-page * {
  -webkit-user-select: text;
  user-select: text;
}

body.chat-page button,
body.chat-page input,
body.chat-page textarea,
body.chat-page a {
  font: inherit;
}

.chat-page-main {
  min-height: 100%;
  height: 100%;
  display: grid;
  place-items: stretch;
  padding: 0;
}

.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;
}

.cf-chat-wrap {
  position: static;
  inset: auto;
  width: 100%;
  min-height: 100%;
  height: 100%;
  z-index: auto;
  font-family: var(--font);
}

.cf-chat-wrap.is-embedded {
  display: block;
}

.cf-chat-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-page .cf-chat-box,
.cf-chat-box {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border) !important;
  border-radius: 30px;
  background: var(--panel) !important;
  box-shadow: 0 28px 72px var(--shadow) !important;
  overflow: hidden;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: opacity .2s ease, transform .2s ease;
  color: var(--text);
}

.cf-chat-box.open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.chat-page .cf-chat-header,
.cf-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px 12px;
  border-bottom: 0;
  background: transparent !important;
}

.cf-chat-kicker {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chat-page .cf-chat-header h3,
.cf-chat-header h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.98) !important;
  font: 800 clamp(2rem, 5vw, 2.8rem)/1.04 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 10px 28px rgba(2, 6, 23, 0.28);
}

.chat-page .cf-chat-sub,
.cf-chat-sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.98rem;
  line-height: 1.5;
}

.chat-page .cf-chat-messages,
.cf-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 18px 18px;
  background: transparent !important;
  scrollbar-width: thin;
}

.cf-chat-msg {
  margin-bottom: 12px;
}

.cf-chat-msg.mine {
  text-align: right;
}

.chat-page .cf-chat-meta,
.cf-chat-meta {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 11px;
}

.chat-page .cf-chat-bubble,
.cf-chat-bubble {
  display: inline-block;
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chat-page .cf-chat-msg.mine .cf-chat-bubble,
.cf-chat-msg.mine .cf-chat-bubble {
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
  border-color: rgba(37, 99, 235, 0.26) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.chat-page .cf-chat-system,
.cf-chat-system {
  margin: 10px auto 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.66) !important;
  font-size: 12px;
}

.chat-page .cf-chat-fallback,
.cf-chat-fallback,
.cf-chat-away {
  margin: 0 18px 14px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chat-page .cf-chat-fallback p,
.cf-chat-fallback p,
.cf-chat-away-text {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 13px;
  line-height: 1.55;
}

.cf-chat-fallback-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cf-chat-fallback-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}

.cf-chat-fallback-actions a.primary,
.cf-chat-away-cta,
#cfChatSend {
  border: 0;
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
}

.cf-chat-fallback-actions a.secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-page .cf-chat-input,
.cf-chat-input {
  display: grid;
  gap: 10px;
  padding: 0 18px 0;
  border-top: 0 !important;
  background: transparent !important;
}

.cf-chat-input.is-disabled {
  opacity: .72;
}

.chat-page #cfChatInput,
#cfChatInput {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text) !important;
  padding: 13px 15px;
  font: 600 14px/1.2 var(--font);
  outline: none;
}

#cfChatInput::placeholder {
  color: rgba(255, 255, 255, 0.54) !important;
}

#cfChatInput:focus {
  border-color: rgba(96, 165, 250, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18) !important;
}

.cf-chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

#cfChatSend {
  border-radius: 16px;
  padding: 0 18px;
  font: 800 14px/1 var(--font);
  cursor: pointer;
  min-width: 88px;
}

#cfChatInput:disabled,
#cfChatSend:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.cf-chat-live-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72) !important;
}

.cf-chat-live-state::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.72) !important;
  box-shadow: 0 0 0 0 rgba(148, 163, 184, .35) !important;
}

.cf-chat-live-state.is-online::before { background: #22c55e !important; box-shadow: 0 0 0 5px rgba(34, 197, 94, .14) !important; }
.cf-chat-live-state.is-connecting::before { background: #f59e0b !important; box-shadow: 0 0 0 5px rgba(245, 158, 11, .14) !important; }
.cf-chat-live-state.is-offline::before { background: #ef4444 !important; box-shadow: 0 0 0 5px rgba(239, 68, 68, .14) !important; }
.cf-chat-live-state.is-paused::before { background: #60a5fa !important; box-shadow: 0 0 0 5px rgba(96, 165, 250, .14) !important; }
.cf-chat-live-state.is-away::before { background: rgba(148, 163, 184, .5) !important; box-shadow: none !important; }

.chat-page .panel-back-actions,
.cf-chat-box .panel-back-actions {
  padding: 12px 18px max(22px, env(safe-area-inset-bottom));
  margin-top: 0;
}

.cf-chat-typing,
.cf-chat-typing-dots,
.cf-chat-typing-dots::after {
  display: none !important;
  animation: none !important;
}

@media (max-width: 700px) {
  .chat-page .cf-chat-box,
  .cf-chat-box {
    border-radius: 0;
    border: 0 !important;
    box-shadow: none !important;
  }

  .chat-page .cf-chat-header,
  .cf-chat-header {
    padding: 18px 18px 10px;
  }

  .chat-page .cf-chat-header h3,
  .cf-chat-header h3 {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
  }

  .chat-page .cf-chat-sub,
  .cf-chat-sub {
    font-size: 0.9rem;
  }

  .chat-page .cf-chat-messages,
  .cf-chat-messages,
  .chat-page .cf-chat-fallback,
  .cf-chat-fallback,
  .cf-chat-away,
  .chat-page .cf-chat-input,
  .cf-chat-input {
    padding-left: 18px;
    padding-right: 18px;
  }

  .chat-page .cf-chat-messages,
  .cf-chat-messages {
    padding-bottom: 12px;
  }

  .chat-page .panel-back-actions,
  .cf-chat-box .panel-back-actions {
    padding: 10px 18px max(26px, env(safe-area-inset-bottom));
  }

  .cf-chat-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #cfChatSend,
  .cf-chat-fallback-actions a,
  .contact-home-button {
    width: 100%;
  }
}
