.hybrid-web-ai-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999999;
  font-family: inherit;
}

.hybrid-web-ai,
.hybrid-web-ai * {
  box-sizing: border-box;
}

.hybrid-web-ai {
  color: #0f172a !important;
}

.hybrid-web-ai__toggle {
  appearance: none;
  border: 0 !important;
  width: auto;
  min-width: 70px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f7fff 0%, #315efb 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 38px rgba(49, 94, 251, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hybrid-web-ai__toggle:hover,
.hybrid-web-ai__toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(49, 94, 251, 0.34);
  outline: none;
}

.hybrid-web-ai__toggle-icon {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hybrid-web-ai__toggle-icon--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.hybrid-web-ai__toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hybrid-web-ai__panel {
  width: min(360px, calc(100vw - 24px));
  height: min(600px, calc(100vh - 84px));
  margin-top: 12px;
  border-radius: 24px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

.hybrid-web-ai.is-open .hybrid-web-ai__panel {
  display: flex;
}

.hybrid-web-ai__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, #0f172a 0%, #172554 100%) !important;
  color: #ffffff !important;
}

.hybrid-web-ai__header-content {
  min-width: 0;
}

.hybrid-web-ai__title {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.hybrid-web-ai__subtitle {
  margin: 4px 0 0 !important;
  color: rgba(255, 255, 255, 0.76) !important;
  font-size: 12px;
  line-height: 1.45;
}

.hybrid-web-ai__close {
  appearance: none;
  border: 0 !important;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
}

.hybrid-web-ai__close:hover,
.hybrid-web-ai__close:focus-visible {
  background: rgba(255, 255, 255, 0.2) !important;
  outline: none;
}

.hybrid-web-ai__messages {
  flex: 1;
  padding: 16px !important;
  overflow-y: auto;
  background: linear-gradient(180deg, #f8faff 0%, #f2f5fd 100%) !important;
}

.hybrid-web-ai__messages::-webkit-scrollbar {
  width: 8px;
}

.hybrid-web-ai__messages::-webkit-scrollbar-thumb {
  background: rgba(49, 94, 251, 0.22);
  border-radius: 999px;
}

.hybrid-web-ai__message {
  max-width: 88%;
  margin-bottom: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  word-break: break-word;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.hybrid-web-ai__message--bot {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-top-left-radius: 8px;
}

.hybrid-web-ai__message--user {
  margin-left: auto;
  background: linear-gradient(135deg, #4f7fff 0%, #315efb 100%) !important;
  color: #ffffff !important;
  border-top-right-radius: 8px;
}

.hybrid-web-ai__sources,
.hybrid-web-ai__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.hybrid-web-ai__source,
.hybrid-web-ai__quick-action {
  appearance: none;
  border: 1px solid rgba(49, 94, 251, 0.16) !important;
  border-radius: 999px;
  background: rgba(79, 127, 255, 0.08) !important;
  color: #2449ce !important;
  text-decoration: none !important;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.hybrid-web-ai__source:hover,
.hybrid-web-ai__source:focus-visible,
.hybrid-web-ai__quick-action:hover,
.hybrid-web-ai__quick-action:focus-visible {
  background: rgba(79, 127, 255, 0.14) !important;
  outline: none;
}

.hybrid-web-ai__composer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff !important;
  padding: 14px !important;
}

.hybrid-web-ai__typing {
  margin-bottom: 8px;
  color: #4f46e5 !important;
  font-size: 12px;
  font-weight: 700;
}

.hybrid-web-ai__form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.hybrid-web-ai__input {
  flex: 1;
  min-height: 44px;
  max-height: 160px;
  resize: vertical;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 16px;
  padding: 11px 13px;
  font: inherit;
  color: #0f172a !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

.hybrid-web-ai__input:focus {
  outline: none;
  border-color: rgba(49, 94, 251, 0.52) !important;
  background: #ffffff !important;
}

.hybrid-web-ai__submit {
  appearance: none;
  border: 0 !important;
  border-radius: 14px;
  min-width: 84px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #4f7fff 0%, #315efb 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(49, 94, 251, 0.2);
}

.hybrid-web-ai__submit:hover,
.hybrid-web-ai__submit:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .hybrid-web-ai-root {
    right: 12px;
    bottom: 12px;
  }

  .hybrid-web-ai__panel {
    width: min(100vw - 16px, 380px);
    height: min(76vh, 600px);
  }
}

/* April 2026 R6 quote-blue accent alignment */
:root {
  --hybrid-help-accent-1: #6670ff;
  --hybrid-help-accent-2: #4e59eb;
  --hybrid-help-accent-3: #4450df;
  --hybrid-help-accent-ring: rgba(102, 112, 255, 0.22);
  --hybrid-help-accent-shadow: rgba(78, 89, 235, 0.28);
}

.hybrid-web-ai__toggle,
.hybrid-web-ai__message--user,
.hybrid-web-ai__submit,
.hybrid-web-ai__header {
  background: linear-gradient(180deg, var(--hybrid-help-accent-1) 0%, var(--hybrid-help-accent-2) 60%, var(--hybrid-help-accent-3) 100%) !important;
}

.hybrid-web-ai__toggle {
  box-shadow: 0 18px 40px var(--hybrid-help-accent-shadow), 0 0 18px var(--hybrid-help-accent-ring) !important;
}

.hybrid-web-ai__toggle:hover,
.hybrid-web-ai__toggle:focus-visible {
  box-shadow: 0 22px 46px rgba(78, 89, 235, 0.34), 0 0 22px rgba(102, 112, 255, 0.24) !important;
}

.hybrid-web-ai__submit {
  box-shadow: 0 16px 30px rgba(78, 89, 235, 0.24), 0 0 16px rgba(102, 112, 255, 0.16) !important;
}

.hybrid-web-ai__typing {
  color: var(--hybrid-help-accent-2) !important;
}

.hybrid-web-ai__source,
.hybrid-web-ai__quick-action {
  border-color: rgba(102, 112, 255, 0.18) !important;
  background: rgba(102, 112, 255, 0.08) !important;
  color: var(--hybrid-help-accent-2) !important;
}

.hybrid-web-ai__source:hover,
.hybrid-web-ai__source:focus-visible,
.hybrid-web-ai__quick-action:hover,
.hybrid-web-ai__quick-action:focus-visible {
  background: rgba(102, 112, 255, 0.14) !important;
}

.hybrid-web-ai__input:focus {
  border-color: rgba(102, 112, 255, 0.52) !important;
}
