/* Lightning Records AI — isolated, additive styles. No existing selectors are changed. */
.lr-ai {
  --lr-bg: #101114;
  --lr-panel: #15171b;
  --lr-layer: #1e2025;
  --lr-outline: rgba(255,255,255,.13);
  --lr-muted: #a2a5af;
  --lr-text: #f5f5f6;
  --lr-silver: #e8ebee;
  position: fixed;
  z-index: 9990;
  inset: auto 0 0 auto;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--lr-text);
  font-size: 14px;
  line-height: 1.5;
}
.lr-ai *, .lr-ai *::before, .lr-ai *::after { box-sizing: border-box; }
.lr-ai button, .lr-ai textarea { font: inherit; }
.lr-ai button { cursor: pointer; }
.lr-ai button:focus-visible, .lr-ai textarea:focus-visible { outline: 2px solid #edf0f5; outline-offset: 3px; }
.lr-ai__launcher {
  position: fixed;
  bottom: 35px;
  right: clamp(15px, 3vw, 42px);
  border: 1px solid rgba(255,255,255,.34);
  padding: 8px 16px 8px 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #141414;
  background: linear-gradient(125deg, #fff 0%, #d9dce0 42%, #fafafa 75%, #a5a9b0 100%);
  border-radius: 999px;
  box-shadow: 0 11px 42px rgba(0,0,0,.55), inset 0 1px 1px rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: transform .18s ease, box-shadow .18s ease;
}
.lr-ai__launcher:hover { transform: translateY(-3px); box-shadow: 0 15px 48px rgba(0,0,0,.65); }
.lr-ai__launcher-bolt {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #151619;
  color: #f5f7f9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.lr-ai__launcher-bolt svg { display: block; width: 17px; height: 23px; fill: currentColor; }
.lr-ai__launcher-arrow { font-size: 18px; font-weight: 400; margin-left: 2px; }
.lr-ai.is-open .lr-ai__launcher { display: none; }
.lr-ai__panel {
  position: fixed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  right: clamp(14px, 3vw, 42px);
  bottom: 30px;
  width: min(420px, calc(100vw - 28px));
  height: min(660px, calc(100dvh - 54px));
  max-height: calc(100vh - 54px);
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 22px;
  background: var(--lr-bg);
  color: var(--lr-text);
  box-shadow: 0 32px 90px rgba(0,0,0,.78), inset 0 1px 0 rgba(255,255,255,.07);
  animation: lrAiAppear .24s cubic-bezier(.2,.8,.2,1) both;
}
.lr-ai__panel[hidden] { display: none !important; }
.lr-ai__topline { height: 3px; background: linear-gradient(90deg, #383a40, #fff, #92949a, #2a2b31); flex: none; }
.lr-ai__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 19px 16px;
  border-bottom: 1px solid var(--lr-outline);
  background: linear-gradient(170deg, #212329, #121316);
  flex: none;
}
.lr-ai__brandmark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(140deg, #393b42, #101114);
  border: 1px solid rgba(255,255,255,.19);
  display: grid;
  place-items: center;
  flex: none;
}
.lr-ai__brandmark svg { width: 17px; height: 25px; fill: #eceff2; }
.lr-ai__brandname { flex: 1; min-width: 0; }
.lr-ai__brandname strong {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -.015em;
}
.lr-ai__brandname span { display: flex; align-items: center; gap: 7px; color: #c9cbd2; font-size: 11px; line-height: 1.45; font-weight: 400; letter-spacing: 0; }
.lr-ai__status-dot { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #bbd7c0; box-shadow: 0 0 11px rgba(185,218,190,.32); }
.lr-ai__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.13);
  color: #d3d5d9;
  background: rgba(255,255,255,.04);
  font-size: 20px;
  line-height: 1;
}
.lr-ai__close:hover { background: rgba(255,255,255,.13); }
.lr-ai__messages {
  flex: 1;
  min-height: 0;
  padding: 21px 17px 18px;
  overflow-y: auto;
  scrollbar-color: #46484d transparent;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.lr-ai__welcome { margin-bottom: 19px; }
.lr-ai__eyebrow {
  margin: 0 0 8px;
  color: #b7bac4;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.lr-ai__welcome h3 {
  color: #f5f6f7;
  font-size: 26px;
  text-transform: none;
  letter-spacing: -.035em;
  line-height: 1.19;
  font-weight: 500;
  margin: 0 0 10px;
}
.lr-ai__welcome p { color: #c9cbd2; font-size: 13px; line-height: 1.6; font-weight: 400; margin: 0; }
.lr-ai__message {
  display: flex;
  flex-direction: column;
  margin: 13px 0;
  gap: 5px;
  max-width: 93%;
}
.lr-ai__message--user { margin-left: auto; align-items: flex-end; max-width: 87%; }
.lr-ai__message--assistant { align-items: flex-start; }
.lr-ai__who { color: #858996; font-size: 10px; letter-spacing: .02em; }
.lr-ai__bubble {
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px 15px 15px 5px;
  color: #e8e9ed;
  background: #22242a;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.62;
}
.lr-ai__bubble strong { color: #fff; font-weight: 600; }
.lr-ai__message--user .lr-ai__bubble {
  border-radius: 15px 15px 5px 15px;
  background: #ebecef;
  color: #16171b;
  border-color: #ebecef;
}
.lr-ai__order {
  width: min(100%, 320px);
  margin-top: 9px;
  padding: 15px;
  border-radius: 15px;
  background: linear-gradient(145deg, #2a2c32, #1a1c20);
  border: 1px solid rgba(255,255,255,.16);
}
.lr-ai__order-label { font-size: 10px; color: #aeb0b8; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.lr-ai__order-name { margin: 5px 0 1px; font-weight: 700; font-size: 13px; color: #fff; }
.lr-ai__order-price { color: #fff; font-weight: 900; font-size: 25px; letter-spacing: -.05em; line-height: 1.25; }
.lr-ai__order-sub { color: #aeb0b8; font-size: 10px; margin-top: 6px; }
.lr-ai__order-warning { margin-top: 7px; font-size: 11px; color: #ffd3a4; }
.lr-ai__loading { display: inline-flex; gap: 4px; align-items: center; padding: 12px 15px; }
.lr-ai__loading i { width: 6px; height: 6px; background: #e5e6e8; border-radius: 50%; animation: lrAiDot 1.05s infinite; }
.lr-ai__loading i:nth-child(2) { animation-delay: .12s; }
.lr-ai__loading i:nth-child(3) { animation-delay: .24s; }
.lr-ai__footer { flex: none; padding: 12px 14px 11px; background: #14161a; border-top: 1px solid var(--lr-outline); }
.lr-ai__suggestions { display: flex; flex-wrap: nowrap; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 1px 1px 10px; }
.lr-ai__suggestions::-webkit-scrollbar { display: none; }
.lr-ai__suggestion {
  flex: none;
  background: rgba(255,255,255,.05);
  color: #cfd0d5;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
}
.lr-ai__suggestion:hover:not(:disabled) { background: rgba(255,255,255,.13); color: #fff; }
.lr-ai__suggestion:disabled { opacity: .45; cursor: default; }
.lr-ai__error { padding: 9px 11px; margin: 0 0 9px; border: 1px solid rgba(255,181,147,.35); border-radius: 11px; color: #ffd7c6; font-size: 11px; background: rgba(94,48,33,.18); }
.lr-ai__error[hidden] { display: none !important; }
.lr-ai__retry { display: inline-block; margin-top: 5px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 5px 12px; color: #fff; background: transparent; font-size: 10px; font-weight: 700; }
.lr-ai__form { display: flex; align-items: flex-end; gap: 7px; padding: 6px; border-radius: 14px; border: 1px solid rgba(255,255,255,.2); background: #212329; }
.lr-ai__textarea {
  display: block;
  width: 100%;
  max-height: 116px;
  resize: none;
  overflow-y: auto;
  padding: 9px 8px 7px;
  color: #fff;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 12px;
  line-height: 1.55;
}
.lr-ai__textarea::placeholder { color: #9698a0; }
.lr-ai__textarea:focus-visible { outline: none; }
.lr-ai__send {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  background: #e8eaed;
  color: #141619;
  border: none;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.lr-ai__send:hover:not(:disabled) { background: #fff; }
.lr-ai__send:disabled { cursor: not-allowed; opacity: .35; }
.lr-ai__footnote { padding: 11px 6px 2px; color: #c1c4cc; font-size: 11px; font-weight: 400; line-height: 1.55; text-align: center; letter-spacing: 0; }
.lr-ai__sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@keyframes lrAiAppear { from { opacity:0; transform:translateY(12px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes lrAiDot { 0%, 60%, 100% { transform:translateY(0); opacity:.5; } 30% { transform:translateY(-4px); opacity:1; } }
@media (max-width: 600px) {
  .lr-ai__launcher { right: 12px; bottom: 55px; padding-right: 13px; font-size: 11px; }
  .lr-ai__launcher-bolt { width: 37px; height: 37px; }
  .lr-ai__panel { left: 8px; right: 8px; bottom: 78px; width: auto; height: min(645px, calc(100dvh - 92px)); max-height: calc(100vh - 92px); border-radius: 19px; }
  .lr-ai__messages { padding: 16px 14px; }
  .lr-ai__welcome h3 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .lr-ai__launcher, .lr-ai__panel, .lr-ai__loading i { animation: none; transition: none; }
}
.lr-ai__suggestions[hidden] { display: none !important; }


/* v2: Respect cookie consent banner. The site's .cookie-banner
   uses display:flex, which otherwise overrides the HTML hidden attribute. */
#cookie-banner[hidden] {
  display: none !important;
}

/* The chat launcher/panel never obscures cookie consent controls.
   They become available again as soon as the banner is dismissed. */
#cookie-banner:not([hidden]) ~ #lightning-ai {
  visibility: hidden;
  pointer-events: none;
}

/* v2: Opera/Chromium can draw native scroll arrow controls on a
   one-row textarea. Keep the composer clean and the input flexible. */
#lightning-ai .lr-ai__textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  overflow-y: hidden;
  resize: none;
  scrollbar-width: none;
  appearance: none;
  -webkit-appearance: none;
}
#lightning-ai .lr-ai__textarea::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
