.assistant-launcher {
  position: fixed;
  z-index: 9000;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: #1f6feb;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(15, 42, 80, 0.22);
  cursor: pointer;
}

.assistant-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  padding: 0;
  border: 1px solid #cbd8e8;
  border-radius: 22px;
  background: #f8fbff;
  color: #111827;
  box-shadow: 0 24px 80px rgba(5, 16, 32, 0.3);
}

.assistant-dialog::backdrop {
  background: rgba(3, 10, 20, 0.68);
}

.assistant-shell {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.assistant-header h2,
.assistant-eyebrow,
.assistant-privacy,
.assistant-message p {
  margin: 0;
}

.assistant-eyebrow {
  color: #1f6feb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assistant-close {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid #cbd8e8;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.assistant-messages {
  display: grid;
  gap: 12px;
  max-height: 290px;
  overflow-y: auto;
  padding: 4px;
}

.assistant-message {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.55;
}

.assistant-message-system {
  justify-self: start;
  background: #e9f2ff;
  color: #10223b;
}

.assistant-message-visitor {
  justify-self: end;
  background: #1f6feb;
  color: #ffffff;
}

.assistant-answer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.assistant-answer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #145bbf;
  font-weight: 800;
  text-decoration: none;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-suggestion {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid #b9cce3;
  border-radius: 999px;
  background: #ffffff;
  color: #18304f;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.assistant-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}

.assistant-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.assistant-input-row input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #aebfd4;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.assistant-input-row button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #1f6feb;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.assistant-privacy {
  color: #5c6f87;
  font-size: 12px;
  line-height: 1.5;
}

html.theme-dark .assistant-dialog {
  border-color: #2b415a;
  background: #0f2031;
  color: #f3f7fb;
}

html.theme-dark .assistant-close,
html.theme-dark .assistant-suggestion,
html.theme-dark .assistant-input-row input {
  border-color: #3b526b;
  background: #162b40;
  color: #f3f7fb;
}

html.theme-dark .assistant-message-system {
  background: #18344f;
  color: #f3f7fb;
}

html.theme-dark .assistant-answer-links a {
  background: #edf5ff;
  color: #104f9e;
}

html.theme-dark .assistant-privacy {
  color: #a9bad0;
}

@media (max-width: 720px) {
  .assistant-launcher {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .assistant-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .assistant-shell {
    padding: 16px;
  }
}
