/* ============================================================
   NOX — chat widget styles
   ----------------------------------------------------------------
   Floating button bottom-right + slide-up panel.
   Brand-matched typography (Bebas Neue / Barlow Condensed),
   theme-aware (vanilla / brown), mobile takes over full-width.

   Revamped to carry the Services page's dimensional language:
   layered depth, slot-style suggestion rows with a sliding arrow,
   grain texture, focus glow, and a staggered open choreography —
   so the widget reads as part of the same world, not a bolt-on.

   Motion baseline: cubic-bezier(0.32, 0.72, 0, 1) ~620ms (longer
   for panel slide), shorter for button hover states.
   ============================================================ */

.nox-chat {
  --nox-orange: #E8540A;
  --nox-orange-hi: #FF6A1F;
  --nox-orange-lo: #D14908;
  --nox-orange-text: #B83F00; /* AA-safe orange on cream */
  --nox-cream: #F2EDE8;
  --nox-ink: #151515;
  --nox-panel-w: 384px;
  --nox-panel-h: 580px;
  --nox-radius: 18px;
  --nox-ease: cubic-bezier(0.32, 0.72, 0, 1);

  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

/* ---- Toggle button (bottom-right) ---- */
.nox-chat__toggle {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  /* dimensional fill: top-lit orange sphere */
  background:
    radial-gradient(circle at 50% 30%,
      var(--nox-orange-hi) 0%,
      var(--nox-orange) 58%,
      var(--nox-orange-lo) 100%);
  color: var(--nox-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* inset highlight + grounded glow + 1px definition ring */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32) inset,
    0 -2px 4px rgba(0, 0, 0, 0.22) inset,
    0 12px 30px -6px rgba(232, 84, 10, 0.46),
    0 3px 8px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.45s var(--nox-ease),
    box-shadow 0.45s var(--nox-ease);
  outline: none;
}

.nox-chat__toggle:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 4px rgba(0, 0, 0, 0.22) inset,
    0 20px 44px -8px rgba(232, 84, 10, 0.6),
    0 4px 10px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.nox-chat__toggle:focus-visible {
  outline: 2px solid var(--nox-orange);
  outline-offset: 4px;
}

.nox-chat__toggle:active {
  transform: translateY(-1px) scale(0.97);
}

.nox-chat__toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  /* a hair of lift so the face sits "on" the sphere */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
  transition: transform 0.45s var(--nox-ease);
}

/* Robot face — subtle blink every ~6s so Nox feels alive */
.nox-face-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: noxBlink 6.4s infinite;
}

@keyframes noxBlink {
  0%, 93%, 97%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .nox-face-eye { animation: none; }
}

.nox-chat__toggle-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #34D17F 0%, #1AB967 70%);
  border: 2px solid var(--nox-orange);
  box-shadow: 0 0 0 0 rgba(26, 185, 103, 0.5);
  animation: noxPulse 2.8s var(--nox-ease) infinite;
}

@keyframes noxPulse {
  0%   { box-shadow: 0 0 0 0 rgba(26, 185, 103, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(26, 185, 103, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 185, 103, 0); }
}

/* Toggle morphs / icon spins when panel is open */
.nox-chat[data-state="open"] .nox-chat__toggle {
  transform: rotate(90deg);
}
.nox-chat[data-state="open"] .nox-chat__toggle-icon {
  transform: rotate(-90deg); /* keep the face upright while shell rotates */
}

/* ---- Panel ---- */
.nox-chat__panel {
  position: absolute;
  bottom: calc(100% + 16px);
  right: 0;
  width: var(--nox-panel-w);
  max-width: calc(100vw - 32px);
  height: var(--nox-panel-h);
  max-height: calc(100vh - 100px);
  /* layered cream surface — top-lit, settles darker toward the input */
  background:
    linear-gradient(180deg,
      #F8F4EF 0%,
      var(--nox-cream) 38%,
      #EEE7DF 100%);
  border-radius: var(--nox-radius);
  /* deep floating shadow + faint orange ground glow + hairline ring */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 28px 70px -18px rgba(20, 12, 6, 0.34),
    0 8px 22px -10px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(20, 12, 6, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  pointer-events: none;
  transition:
    opacity   0.42s var(--nox-ease),
    transform 0.52s var(--nox-ease);
}

/* grain texture over the cream body — fixed pseudo, never repaints
   on inner scroll (the scroller is .nox-chat__messages, not this) */
.nox-chat__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* keep all real content above the grain layer */
.nox-chat__header,
.nox-chat__messages,
.nox-chat__form,
.nox-chat__footer {
  position: relative;
  z-index: 1;
}

.nox-chat[data-state="open"] .nox-chat__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ---- Header ---- */
.nox-chat__header {
  flex-shrink: 0;
  padding: 15px 16px;
  /* dimensional ink bar with a top sheen */
  background:
    linear-gradient(180deg, #1E1E1E 0%, var(--nox-ink) 100%);
  color: var(--nox-cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(232, 84, 10, 0.55);
  border-bottom: 1px solid rgba(232, 84, 10, 0.22);
}

.nox-chat__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nox-chat__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  /* slot-card mini: top-lit orange tile with edge definition */
  background:
    radial-gradient(circle at 50% 25%,
      var(--nox-orange-hi) 0%,
      var(--nox-orange) 70%,
      var(--nox-orange-lo) 100%);
  color: var(--nox-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 -1px 2px rgba(0, 0, 0, 0.2) inset,
    0 6px 14px -6px rgba(232, 84, 10, 0.55);
  transition: transform 0.5s var(--nox-ease);
}

/* the mark gives a small life cue when you mouse the header */
.nox-chat__header:hover .nox-chat__mark {
  transform: rotate(-6deg) scale(1.05);
}

.nox-chat__brand-text {
  min-width: 0;
}

.nox-chat__name {
  font-family: 'Bebas Neue', 'Arial Black', Impact, sans-serif;
  font-size: 19px;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--nox-cream);
}

.nox-chat__role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 237, 232, 0.6);
  margin-top: 3px;
}

.nox-chat__close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(242, 237, 232, 0.08);
  color: var(--nox-cream);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.25s var(--nox-ease),
    transform 0.25s var(--nox-ease);
  flex-shrink: 0;
}

.nox-chat__close:hover {
  background: rgba(242, 237, 232, 0.18);
  transform: rotate(90deg);
}

.nox-chat__close:focus-visible {
  outline: 2px solid var(--nox-orange);
  outline-offset: 2px;
}

/* ---- Messages list ---- */
.nox-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.nox-chat__messages::-webkit-scrollbar { width: 6px; }
.nox-chat__messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

.nox-chat__msg {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 14px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
}

.nox-chat__msg p {
  margin: 0 0 6px 0;
}

.nox-chat__msg p:last-child { margin-bottom: 0; }

.nox-chat__msg ul {
  margin: 6px 0;
  padding-left: 18px;
}

.nox-chat__msg li { margin-bottom: 3px; }

.nox-chat__msg strong { font-weight: 700; }

.nox-chat__msg em { font-style: italic; }

.nox-chat__msg code {
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.nox-chat__msg a {
  color: var(--nox-orange-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.nox-chat__msg a:hover { color: var(--nox-orange); }

.nox-chat__msg--user {
  align-self: flex-end;
  /* dimensional ink bubble with top sheen */
  background: linear-gradient(180deg, #232323 0%, var(--nox-ink) 100%);
  color: var(--nox-cream);
  border-bottom-right-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 8px 18px -12px rgba(0, 0, 0, 0.6);
}

.nox-chat__msg--user a { color: #FFB07A; }

.nox-chat__msg--assistant {
  align-self: flex-start;
  /* lifted paper card */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.78) 100%);
  color: var(--nox-ink);
  border: 1px solid rgba(20, 12, 6, 0.06);
  border-bottom-left-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 22px -16px rgba(20, 12, 6, 0.5);
}

/* ---- Suggestion chips (empty state) — slot-style rows ---- */
.nox-chat__suggestions {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 8px;
}

.nox-chat__chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  padding: 11px 14px 11px 36px;
  border: 1px solid rgba(232, 84, 10, 0.26);
  /* dimensional cream tile */
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 242, 235, 0.62) 100%);
  color: var(--nox-ink);
  border-radius: 12px;
  cursor: pointer;
  line-height: 1.32;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 8px 18px -12px rgba(20, 12, 6, 0.4);
  transition:
    border-color 0.32s var(--nox-ease),
    background   0.32s var(--nox-ease),
    box-shadow   0.32s var(--nox-ease),
    transform    0.2s  var(--nox-ease);
}

/* leading arrow that slides on hover (matches the site's text-arrow links) */
.nox-chat__chip::before {
  content: "\2192";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nox-orange-text);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.32s var(--nox-ease), color 0.32s var(--nox-ease);
}

/* cursor spotlight wash */
.nox-chat__chip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%),
    rgba(232, 84, 10, 0.14), transparent 60%);
  transition: opacity 0.32s var(--nox-ease);
}

.nox-chat__chip:hover {
  border-color: var(--nox-orange);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 240, 232, 0.72) 100%);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 14px 26px -14px rgba(232, 84, 10, 0.4);
}

.nox-chat__chip:hover::before {
  transform: translateY(-50%) translateX(3px);
  color: var(--nox-orange);
}

.nox-chat__chip:hover::after { opacity: 1; }

.nox-chat__chip:active {
  transform: translateY(0) scale(0.99);
}

.nox-chat__chip:focus-visible {
  outline: 2px solid var(--nox-orange);
  outline-offset: 2px;
}

/* ---- Open choreography: welcome + chips rise in sequence ---- */
@media (prefers-reduced-motion: no-preference) {
  .nox-chat[data-state="open"] .nox-chat__msg--assistant[data-welcome="true"] {
    animation: noxRise 0.5s var(--nox-ease) both;
  }
  .nox-chat[data-state="open"] .nox-chat__chip {
    animation: noxRise 0.5s var(--nox-ease) both;
  }
  .nox-chat[data-state="open"] .nox-chat__chip:nth-child(1) { animation-delay: 0.08s; }
  .nox-chat[data-state="open"] .nox-chat__chip:nth-child(2) { animation-delay: 0.15s; }
  .nox-chat[data-state="open"] .nox-chat__chip:nth-child(3) { animation-delay: 0.22s; }
  .nox-chat[data-state="open"] .nox-chat__chip:nth-child(4) { animation-delay: 0.29s; }
}

@keyframes noxRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

:root.dark .nox-chat__chip {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(232, 84, 10, 0.32);
  color: var(--nox-cream);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 10px 22px -14px rgba(0, 0, 0, 0.7);
}

:root.dark .nox-chat__chip::before { color: var(--nox-orange-hi); }

:root.dark .nox-chat__chip:hover {
  border-color: var(--nox-orange);
  background: linear-gradient(165deg, rgba(232, 84, 10, 0.16) 0%, rgba(232, 84, 10, 0.04) 100%);
}

/* Typing dots */
.nox-chat__msg--thinking {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nox-chat__dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.nox-chat__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nox-orange);
  opacity: 0.4;
  animation: noxDot 1.1s var(--nox-ease) infinite;
}

.nox-chat__dots span:nth-child(2) { animation-delay: 0.15s; }
.nox-chat__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes noxDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-3px); }
}

.nox-chat__thinking-text {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(21, 21, 21, 0.6);
}

/* ---- Input area ---- */
.nox-chat__form {
  flex-shrink: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.015) 0%, rgba(0, 0, 0, 0.04) 100%);
  border-top: 1px solid rgba(20, 12, 6, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.nox-chat__input {
  flex: 1;
  resize: none;
  border: 1px solid rgba(20, 12, 6, 0.12);
  background: #FBF8F4;
  color: var(--nox-ink);
  border-radius: 11px;
  padding: 11px 12px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  max-height: 120px;
  outline: none;
  box-shadow: 0 1px 2px rgba(20, 12, 6, 0.05) inset;
  transition:
    border-color 0.28s var(--nox-ease),
    box-shadow   0.28s var(--nox-ease);
}

.nox-chat__input:focus {
  border-color: var(--nox-orange);
  box-shadow:
    0 1px 2px rgba(20, 12, 6, 0.05) inset,
    0 0 0 3px rgba(232, 84, 10, 0.13);
}

.nox-chat__input::placeholder {
  color: rgba(21, 21, 21, 0.4);
}

.nox-chat__input:disabled {
  opacity: 0.6;
  cursor: wait;
}

.nox-chat__send {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 11px;
  /* dimensional orange button */
  background:
    radial-gradient(circle at 50% 25%,
      var(--nox-orange-hi) 0%,
      var(--nox-orange) 70%,
      var(--nox-orange-lo) 100%);
  color: var(--nox-cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 -1px 2px rgba(0, 0, 0, 0.2) inset,
    0 8px 18px -8px rgba(232, 84, 10, 0.55);
  transition:
    box-shadow 0.25s var(--nox-ease),
    transform  0.2s  var(--nox-ease);
}

.nox-chat__send:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -1px 2px rgba(0, 0, 0, 0.2) inset,
    0 14px 28px -8px rgba(232, 84, 10, 0.72);
}

.nox-chat__send:active { transform: translateY(0) scale(0.96); }

.nox-chat__send:focus-visible {
  outline: 2px solid var(--nox-orange);
  outline-offset: 2px;
}

.nox-chat__send:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

/* ---- Footer ---- */
.nox-chat__footer {
  flex-shrink: 0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  border-top: 1px solid rgba(20, 12, 6, 0.06);
}

.nox-chat__clear {
  border: none;
  background: none;
  color: rgba(21, 21, 21, 0.45);
  font: inherit;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s var(--nox-ease), background 0.2s var(--nox-ease);
}

.nox-chat__clear:hover {
  color: var(--nox-orange);
  background: rgba(232, 84, 10, 0.06);
}

.nox-chat__clear:focus-visible {
  outline: 2px solid var(--nox-orange);
  outline-offset: 2px;
}

/* ============================================================
   BROWN MODE (dark theme on noxusstudios.com)
   The site uses `:root.dark` for brown mode.
   ============================================================ */
:root.dark .nox-chat {
  --nox-cream: #E8DCCB;
  --nox-ink: #14100B;
}

:root.dark .nox-chat__panel {
  background:
    linear-gradient(180deg, #221913 0%, #1A130C 45%, #130D07 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 28px 70px -18px rgba(0, 0, 0, 0.62),
    0 8px 22px -10px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

:root.dark .nox-chat__panel::before {
  mix-blend-mode: screen;
  opacity: 0.045;
}

:root.dark .nox-chat__header {
  background: linear-gradient(180deg, #15100A 0%, #0E0A06 100%);
  border-bottom-color: rgba(232, 84, 10, 0.28);
}

:root.dark .nox-chat__close {
  background: rgba(232, 220, 203, 0.08);
}

:root.dark .nox-chat__close:hover {
  background: rgba(232, 220, 203, 0.18);
}

:root.dark .nox-chat__msg--user {
  background: linear-gradient(180deg, var(--nox-orange-hi) 0%, var(--nox-orange) 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 8px 18px -12px rgba(232, 84, 10, 0.7);
}

:root.dark .nox-chat__msg--user a {
  color: #FFE5D5;
}

:root.dark .nox-chat__msg--assistant {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: var(--nox-cream);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 10px 22px -16px rgba(0, 0, 0, 0.8);
}

:root.dark .nox-chat__msg code {
  background: rgba(255, 255, 255, 0.08);
}

:root.dark .nox-chat__msg a { color: #FFB07A; }
:root.dark .nox-chat__msg a:hover { color: #FFC9A0; }

:root.dark .nox-chat__thinking-text {
  color: rgba(232, 220, 203, 0.55);
}

:root.dark .nox-chat__form {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(0, 0, 0, 0.18) 100%);
  border-top-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

:root.dark .nox-chat__input {
  background: #14100B;
  color: var(--nox-cream);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) inset;
}

:root.dark .nox-chat__input:focus {
  border-color: var(--nox-orange);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3) inset,
    0 0 0 3px rgba(232, 84, 10, 0.16);
}

:root.dark .nox-chat__input::placeholder {
  color: rgba(232, 220, 203, 0.35);
}

:root.dark .nox-chat__thinking-text { color: rgba(232, 220, 203, 0.55); }

:root.dark .nox-chat__footer {
  background: transparent;
  color: rgba(232, 220, 203, 0.4);
  border-top-color: rgba(255, 255, 255, 0.05);
}

:root.dark .nox-chat__clear {
  color: rgba(232, 220, 203, 0.4);
}

:root.dark .nox-chat__clear:hover {
  background: rgba(232, 84, 10, 0.12);
}

/* ============================================================
   MOBILE — takes over most of the screen
   ============================================================ */
@media (max-width: 600px) {
  .nox-chat {
    bottom: 16px;
    right: 16px;
  }

  .nox-chat__panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    right: 0;
    bottom: calc(100% + 12px);
  }

  .nox-chat__toggle {
    width: 54px;
    height: 54px;
  }

  /* Mobile touch targets — global rule: 44px minimum.
     Account for border-box rounding by going 1px above the threshold. */
  .nox-chat__close {
    width: 46px;
    height: 46px;
  }
  .nox-chat__send {
    width: 46px;
    height: 46px;
  }
  .nox-chat__clear {
    min-height: 46px;
    padding: 13px 14px;
  }
  .nox-chat__chip {
    min-height: 46px;
    padding: 14px 14px 14px 38px;
    line-height: 1.3;
  }
  .nox-chat__input {
    min-height: 46px;
    padding: 12px 14px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .nox-chat__toggle,
  .nox-chat__toggle-icon,
  .nox-chat__panel,
  .nox-chat__send,
  .nox-chat__close,
  .nox-chat__mark,
  .nox-chat__chip,
  .nox-chat__chip::before,
  .nox-chat__clear {
    transition: none !important;
    animation: none !important;
  }
  .nox-chat__toggle-dot {
    animation: none !important;
  }
  .nox-chat__dots span {
    animation: none !important;
  }
  .nox-chat[data-state="open"] .nox-chat__msg--assistant[data-welcome="true"],
  .nox-chat[data-state="open"] .nox-chat__chip {
    animation: none !important;
  }
}
