/* Scoped widget styles; existing page and inquiry styles remain untouched. */
.eifel-ai-chat {
  --eifel-ai-bottom: 20px;
  --eifel-ai-keyboard: 0px;
  --eifel-ai-viewport-height: 100vh;
  --eifel-ai-launcher-height: 68px;
  --eifel-ai-navy: #062b4e;
  --eifel-ai-blue: #075a9c;
  position: fixed;
  z-index: 95;
  right: 20px;
  bottom: max(var(--eifel-ai-bottom), calc(var(--eifel-ai-keyboard) + 12px));
  color: #10273b;
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}
.eifel-ai-chat *, .eifel-ai-chat *::before, .eifel-ai-chat *::after { box-sizing: border-box; }
.eifel-ai-chat [hidden] { display: none !important; }
.eifel-ai-chat button, .eifel-ai-chat textarea { font: inherit; }
.eifel-ai-chat button { cursor: pointer; }
.eifel-ai-chat button:focus-visible, .eifel-ai-chat a:focus-visible, .eifel-ai-chat textarea:focus-visible { outline: 3px solid #e79b42; outline-offset: 3px; }
.eifel-ai-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 192px;
  height: var(--eifel-ai-launcher-height);
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid rgba(143,211,244,.55);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #104c73 0%, #083351 48%, #062641 100%);
  box-shadow: 0 12px 30px rgba(4,34,58,.23), 0 3px 9px rgba(4,34,58,.12), inset 0 1px 0 rgba(255,255,255,.1);
  font-weight: 700;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.eifel-ai-launcher::before { content: ""; position: absolute; top: -1px; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, transparent, #a5e2fc, transparent); }
.eifel-ai-launcher:hover:not(:disabled) { transform: translateY(-2px); border-color: #9bdcf8; box-shadow: 0 15px 34px rgba(4,34,58,.28), 0 3px 9px rgba(4,34,58,.12), inset 0 1px 0 rgba(255,255,255,.12); }
.eifel-ai-launcher-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(145,214,246,.26); border-radius: 11px; color: #c6edff; background: linear-gradient(145deg, rgba(118,201,242,.17), rgba(60,138,188,.06)); line-height: 1; }
.eifel-ai-launcher-icon svg { display: block; width: 25px; height: 25px; }
.eifel-ai-launcher-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.eifel-ai-launcher-title { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.eifel-ai-launcher-title strong { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; }
.eifel-ai-launcher-badge { display: inline-flex; align-items: center; padding: 2px 4px; border: 1px solid rgba(162,219,246,.34); border-radius: 4px; color: #d1ecfa; background: rgba(108,188,228,.12); font-size: 8px; font-weight: 500; line-height: 1.1; }
.eifel-ai-launcher-subtitle { color: #c0d8e7; font-size: 10px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.eifel-ai-launcher:disabled { cursor: wait; }
.eifel-ai-panel {
  position: absolute;
  right: 0;
  bottom: calc(var(--eifel-ai-launcher-height) + 12px);
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: calc(var(--eifel-ai-viewport-width, 100vw) - 28px);
  height: 520px;
  max-height: calc(var(--eifel-ai-viewport-height) - var(--eifel-ai-bottom) - var(--eifel-ai-launcher-height) - 30px);
  border: 1px solid #d9e4ec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 65px rgba(6,43,78,.23);
}
.eifel-ai-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 16px 15px; color: #fff; background: var(--eifel-ai-navy); }
.eifel-ai-eyebrow { color: #a0cee9; font-size: 9px; letter-spacing: 1.5px; font-weight: 700; }
.eifel-ai-head h2 { margin: 3px 0 2px; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.4; }
.eifel-ai-head p { margin: 0; color: #c9dce9; font-size: 11px; }
.eifel-ai-close { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; color: #fff; background: rgba(255,255,255,.06); font-size: 25px !important; line-height: 1; }
.eifel-ai-close:hover { background: rgba(255,255,255,.16); }
.eifel-ai-log { flex: 1 1 auto; min-height: 60px; padding: 16px 14px; overflow-y: auto; overscroll-behavior: contain; background: #f3f7fa; scrollbar-width: thin; }
.eifel-ai-message { max-width: 91%; margin: 0 0 14px; text-align: left; }
.eifel-ai-speaker { display: block; margin: 0 3px 4px; color: #64798b; font-size: 10px; }
.eifel-ai-message p { margin: 0; padding: 10px 12px; border: 1px solid #d9e4ec; border-radius: 0 9px 9px; color: #17354d; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.eifel-ai-mine { margin-left: auto; }
.eifel-ai-mine .eifel-ai-speaker { text-align: right; }
.eifel-ai-mine p { border-color: var(--eifel-ai-blue); border-radius: 9px 0 9px 9px; color: #fff; background: var(--eifel-ai-blue); }
.eifel-ai-message p.eifel-ai-error { border-color: #e8c9a2; color: #77501f; background: #fffaf0; }
.eifel-ai-direct { display: flex; flex: 0 0 auto; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid #dce6ed; background: #f7fafc; }
.eifel-ai-direct a { color: #075a9c; font-size: 11px; font-weight: 700; text-decoration: none; }
.eifel-ai-direct a:hover { text-decoration: underline; }
.eifel-ai-form { flex: 0 0 auto; margin: 0; padding: 12px; background: #fff; }
.eifel-ai-input { display: block; width: 100%; min-height: 58px; max-height: 120px; margin: 0; padding: 9px 10px; border: 1px solid #ccdce7; border-radius: 6px; color: #10273b; background: #fff; font-size: 14px !important; line-height: 1.5; resize: vertical; }
.eifel-ai-input::placeholder { color: #7a8e9d; }
.eifel-ai-input[readonly] { color: #64798b; background: #f5f8fa; }
.eifel-ai-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.eifel-ai-help { flex: 1; color: #7a8c99; font-size: 9px; }
.eifel-ai-count { color: #7a8c99; font-size: 9px; white-space: nowrap; }
.eifel-ai-count.eifel-ai-over-limit { color: #b24b26; font-weight: 700; }
.eifel-ai-send { min-width: 60px; min-height: 34px; padding: 5px 12px; border: 0; border-radius: 5px; color: #fff; background: var(--eifel-ai-blue); font-weight: 700; }
.eifel-ai-send:disabled { opacity: .55; cursor: wait; }
.eifel-ai-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 780px) {
  .eifel-ai-chat { --eifel-ai-launcher-height: 56px; right: 14px; }
  .eifel-ai-launcher { width: 156px; gap: 7px; padding: 0 9px; border-radius: 12px; }
  .eifel-ai-launcher-icon { flex-basis: 30px; width: 30px; height: 32px; border-radius: 9px; }
  .eifel-ai-launcher-icon svg { width: 22px; height: 22px; }
  .eifel-ai-launcher-copy { gap: 5px; }
  .eifel-ai-launcher-title { gap: 3px; }
  .eifel-ai-launcher-title strong { font-size: 13px; }
  .eifel-ai-launcher-badge { padding: 2px 3px; font-size: 7px; }
  .eifel-ai-launcher-subtitle { font-size: 9px; }
  .eifel-ai-input { font-size: 16px !important; }
}
.eifel-ai-chat.eifel-ai-compact.eifel-ai-open { bottom: calc(var(--eifel-ai-keyboard) + 12px); }
.eifel-ai-compact .eifel-ai-panel { bottom: 0; height: calc(var(--eifel-ai-viewport-height) - 24px); max-height: calc(var(--eifel-ai-viewport-height) - 24px); }
.eifel-ai-compact.eifel-ai-open .eifel-ai-launcher { visibility: hidden; }
.eifel-ai-compact .eifel-ai-head { padding: 10px 12px; }
.eifel-ai-compact .eifel-ai-eyebrow, .eifel-ai-compact .eifel-ai-head p { display: none; }
.eifel-ai-compact .eifel-ai-form { padding: 8px; }
.eifel-ai-compact .eifel-ai-log { min-height: 32px; padding-block: 10px; }
.eifel-ai-tiny .eifel-ai-panel { overflow-y: auto; }
.eifel-ai-tiny .eifel-ai-log { flex-shrink: 0; max-height: 100px; }
@media (prefers-reduced-motion: reduce) {
  .eifel-ai-chat * { scroll-behavior: auto; transition: none; }
  .eifel-ai-launcher:hover:not(:disabled) { transform: none; }
}
