.tc-chatbot {
  --tc-chatbot-panel: rgba(10, 14, 20, 0.97);
  --tc-chatbot-panel-soft: rgba(151, 164, 185, 0.08);
  --tc-chatbot-accent: #4e7cff;
  --tc-chatbot-accent-dark: #315fe6;
  --tc-chatbot-accent-soft: #88a8ff;
  --tc-chatbot-border: rgba(142, 163, 196, 0.14);
  --tc-chatbot-text: #edf3ff;
  --tc-chatbot-muted: rgba(237, 243, 255, 0.64);
  --tc-chatbot-shadow: 0 26px 60px rgba(2, 8, 20, 0.42);
  --tc-chatbot-assistant-bg: #ebf2ff;
  --tc-chatbot-assistant-text: #111827;
  --tc-chatbot-input-bg: rgba(123, 145, 178, 0.08);
  --tc-chatbot-quick-bg: rgba(146, 167, 206, 0.08);
  --tc-chatbot-launcher-shadow: 0 16px 34px rgba(37, 79, 197, 0.42);
  --tc-chatbot-panel-radius: 22px;
  --tc-chatbot-launcher-radius: 999px;
  --tc-chatbot-bubble-radius: 16px;
  --tc-chatbot-panel-width: min(340px, calc(100vw - 22px));
  --tc-chatbot-header-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.tc-chatbot,
.tc-chatbot * {
  box-sizing: border-box;
}

.tc-chatbot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.4;
}

.tc-chatbot[data-design="midnight"] {
  --tc-chatbot-panel: rgba(10, 14, 20, 0.97);
  --tc-chatbot-panel-soft: rgba(151, 164, 185, 0.08);
  --tc-chatbot-accent: #4e7cff;
  --tc-chatbot-accent-dark: #315fe6;
  --tc-chatbot-accent-soft: #88a8ff;
  --tc-chatbot-border: rgba(142, 163, 196, 0.14);
  --tc-chatbot-text: #edf3ff;
  --tc-chatbot-muted: rgba(237, 243, 255, 0.64);
  --tc-chatbot-shadow: 0 26px 60px rgba(2, 8, 20, 0.42);
  --tc-chatbot-assistant-bg: #ebf2ff;
  --tc-chatbot-assistant-text: #111827;
  --tc-chatbot-input-bg: rgba(123, 145, 178, 0.08);
  --tc-chatbot-quick-bg: rgba(146, 167, 206, 0.08);
  --tc-chatbot-launcher-shadow: 0 16px 34px rgba(37, 79, 197, 0.42);
  --tc-chatbot-panel-radius: 22px;
  --tc-chatbot-launcher-radius: 999px;
  --tc-chatbot-bubble-radius: 16px;
  --tc-chatbot-panel-width: min(340px, calc(100vw - 22px));
  --tc-chatbot-header-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.tc-chatbot[data-design="graphite"] {
  --tc-chatbot-panel: #111418;
  --tc-chatbot-panel-soft: rgba(158, 170, 180, 0.09);
  --tc-chatbot-accent: #6b7d90;
  --tc-chatbot-accent-dark: #4b5968;
  --tc-chatbot-accent-soft: #a0afbf;
  --tc-chatbot-border: rgba(163, 172, 181, 0.18);
  --tc-chatbot-text: #f4f7fb;
  --tc-chatbot-muted: rgba(244, 247, 251, 0.6);
  --tc-chatbot-shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
  --tc-chatbot-assistant-bg: #eff3f7;
  --tc-chatbot-assistant-text: #171c22;
  --tc-chatbot-input-bg: rgba(133, 146, 158, 0.1);
  --tc-chatbot-quick-bg: rgba(133, 146, 158, 0.12);
  --tc-chatbot-launcher-shadow: 0 14px 30px rgba(49, 58, 68, 0.38);
  --tc-chatbot-panel-radius: 16px;
  --tc-chatbot-launcher-radius: 18px;
  --tc-chatbot-bubble-radius: 13px;
  --tc-chatbot-panel-width: min(332px, calc(100vw - 22px));
  --tc-chatbot-header-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.tc-chatbot[data-design="frost"] {
  --tc-chatbot-panel: rgba(228, 238, 255, 0.92);
  --tc-chatbot-panel-soft: rgba(118, 152, 232, 0.18);
  --tc-chatbot-accent: #2f66ff;
  --tc-chatbot-accent-dark: #1d43ba;
  --tc-chatbot-accent-soft: #86a8ff;
  --tc-chatbot-border: rgba(96, 126, 195, 0.24);
  --tc-chatbot-text: #14233f;
  --tc-chatbot-muted: rgba(20, 35, 63, 0.64);
  --tc-chatbot-shadow: 0 28px 70px rgba(54, 90, 167, 0.22);
  --tc-chatbot-assistant-bg: rgba(255, 255, 255, 0.92);
  --tc-chatbot-assistant-text: #15223c;
  --tc-chatbot-input-bg: rgba(255, 255, 255, 0.7);
  --tc-chatbot-quick-bg: rgba(255, 255, 255, 0.56);
  --tc-chatbot-launcher-shadow: 0 18px 34px rgba(56, 102, 220, 0.24);
  --tc-chatbot-panel-radius: 26px;
  --tc-chatbot-launcher-radius: 999px;
  --tc-chatbot-bubble-radius: 18px;
  --tc-chatbot-panel-width: min(346px, calc(100vw - 22px));
  --tc-chatbot-header-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.16));
}

.tc-chatbot h2,
.tc-chatbot p,
.tc-chatbot button,
.tc-chatbot textarea,
.tc-chatbot label {
  margin: 0;
  font-family: inherit;
}

.tc-chatbot__launcher {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: var(--tc-chatbot-launcher-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, var(--tc-chatbot-accent-soft) 0%, var(--tc-chatbot-accent) 45%, var(--tc-chatbot-accent-dark) 100%);
  box-shadow: var(--tc-chatbot-launcher-shadow);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tc-chatbot__launcher:hover {
  transform: translateY(-2px);
}

.tc-chatbot__launcher-ring {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
}

.tc-chatbot__launcher-icon {
  position: relative;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: opacity 140ms ease, transform 140ms ease;
}

.tc-chatbot__launcher-icon--close {
  position: absolute;
  opacity: 0;
  transform: scale(0.8);
}

.tc-chatbot.is-open .tc-chatbot__launcher-icon--open {
  opacity: 0;
  transform: scale(0.8);
}

.tc-chatbot.is-open .tc-chatbot__launcher-icon--close {
  opacity: 1;
  transform: scale(1);
}

.tc-chatbot__panel {
  position: relative;
  z-index: 2;
  width: min(340px, calc(100vw - 22px));
  width: var(--tc-chatbot-panel-width);
  height: min(520px, calc(100vh - 32px));
  margin-bottom: 70px;
  border: 1px solid var(--tc-chatbot-border);
  border-radius: var(--tc-chatbot-panel-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, var(--tc-chatbot-panel-soft) 0%, transparent 36%),
    radial-gradient(circle at bottom left, var(--tc-chatbot-quick-bg) 0%, transparent 36%),
    var(--tc-chatbot-panel);
  box-shadow: var(--tc-chatbot-shadow);
  backdrop-filter: blur(16px);
}

.tc-chatbot__panel[hidden] {
  display: none !important;
}

.tc-chatbot__header {
  padding: 16px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--tc-chatbot-text);
  background: var(--tc-chatbot-header-overlay);
}

.tc-chatbot .tc-chatbot__header h2 {
  margin: 2px 0 4px;
  font-size: 1.05rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tc-chatbot-text);
}

.tc-chatbot__eyebrow {
  color: var(--tc-chatbot-accent-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.tc-chatbot__subheading {
  color: var(--tc-chatbot-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 26ch;
}

.tc-chatbot__icon-button {
  min-width: 58px;
  height: 32px;
  padding: 0 12px;
  position: relative;
  z-index: 4;
  border: 1px solid var(--tc-chatbot-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tc-chatbot-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
}

.tc-chatbot__messages {
  flex: 1;
  padding: 6px 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tc-chatbot__message {
  display: flex;
}

.tc-chatbot__message--user {
  justify-content: flex-end;
}

.tc-chatbot__message--assistant {
  justify-content: flex-start;
}

.tc-chatbot__bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: var(--tc-chatbot-bubble-radius);
  font-size: 0.83rem;
  line-height: 1.5;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.tc-chatbot__message--assistant .tc-chatbot__bubble {
  background: var(--tc-chatbot-assistant-bg);
  color: var(--tc-chatbot-assistant-text);
  border-top-left-radius: 6px;
}

.tc-chatbot__message--assistant .tc-chatbot__bubble a {
  color: var(--tc-chatbot-accent-dark);
  font-weight: 700;
}

.tc-chatbot__message--user .tc-chatbot__bubble {
  background: linear-gradient(135deg, var(--tc-chatbot-accent-soft) 0%, var(--tc-chatbot-accent) 52%, var(--tc-chatbot-accent-dark) 100%);
  color: #fff;
  border-top-right-radius: 6px;
}

.tc-chatbot__bubble--typing {
  color: var(--tc-chatbot-assistant-text);
  font-style: italic;
}

.tc-chatbot__quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 14px 10px;
}

.tc-chatbot__quick-reply {
  flex: 0 1 auto;
  border: 1px solid var(--tc-chatbot-border);
  background: var(--tc-chatbot-quick-bg);
  color: var(--tc-chatbot-text);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}

.tc-chatbot__quick-reply:hover,
.tc-chatbot__send:hover,
.tc-chatbot__icon-button:hover {
  filter: brightness(1.06);
}

.tc-chatbot__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12));
}

.tc-chatbot__input {
  min-height: 44px;
  max-height: 108px;
  resize: none;
  border: 1px solid var(--tc-chatbot-border);
  background: var(--tc-chatbot-input-bg);
  color: var(--tc-chatbot-text);
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  font-size: 0.82rem;
}

.tc-chatbot__input::placeholder {
  color: rgba(237, 243, 255, 0.4);
}

.tc-chatbot__send {
  align-self: end;
  min-width: 76px;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--tc-chatbot-accent-soft) 0%, var(--tc-chatbot-accent) 52%, var(--tc-chatbot-accent-dark) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

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

@media (max-width: 640px) {
  .tc-chatbot {
    right: 10px;
    bottom: 10px;
  }

  .tc-chatbot__panel {
    width: calc(100vw - 12px);
    height: min(72vh, 500px);
    margin-bottom: 66px;
    border-radius: min(var(--tc-chatbot-panel-radius), 20px);
  }

  .tc-chatbot__form {
    grid-template-columns: 1fr;
  }

  .tc-chatbot__send {
    width: 100%;
  }
}
