/*
 * JELIĆ AI, the shopping assistant (inc/assistant.php, assets/js/assistant.js).
 * Computers: a "Pitajte JELIĆ AI" button in the header, a blue launcher bottom right with a
 * one-time tip, and a floating panel that leaves the page usable.
 * Phones: the larger middle button of the bottom bar opens the panel over the whole screen.
 * The character is a chat bubble with an antenna carrying the logo fan; while it thinks the fan
 * breathes in place and the antenna light pulses. The fan never spins and never gets a face.
 */

/* ---------- The character ---------- */
/* The logo fan is the body, two big eyes peek over its top point. The fan never turns and never
   gets a face (it could read as a swastika): only the pupils move and the eyes blink. */
.sj-ai-face {
  --sj-ai-pupil: #0b2233;
  display: block;
  flex: none;
  overflow: visible;
  color: var(--sj-blue);
}
.sj-ai-face__fan {
  overflow: visible;
}
/* The eyes sit on the top of the fan like on a head (11. 11. 2026.): the rim takes the body colour
   on light ground and the ground colour on dark ground, so a white eye never melts into a white body. */
.sj-ai-face__white {
  fill: var(--sj-white);
  stroke: var(--sj-ai-rim, currentColor);
  stroke-width: 4.5;
}
.sj-ai-face__shine {
  fill: var(--sj-white);
}
.sj-ai-face__pupils {
  fill: var(--sj-ai-pupil);
}
.sj-ai-face__eyes {
  transform-box: fill-box;
  transform-origin: center;
}
.is-thinking .sj-ai-face__pupils {
  animation: sj-ai-look 1.4s ease-in-out infinite;
}
@keyframes sj-ai-look {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-4px, -2px);
  }
  50% {
    transform: translate(3px, -3px);
  }
  75% {
    transform: translate(4px, 1px);
  }
}
@keyframes sj-ai-blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

/* ---------- Header button (computers) ---------- */
.site-action.site-action--ai {
  border: 0;
  background: var(--sj-white);
  color: var(--sj-blue);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.site-action--ai .sj-ai-face {
  width: 1.75rem;
  height: 1.75rem;
}
.site-action--ai strong {
  font: 700 1.0625rem / 1 var(--sj-font-head);
  letter-spacing: 0.02em;
}
.site-action.site-action--ai:hover {
  background: var(--sj-blue-tint);
  color: var(--sj-blue-strong);
}
.site-action--ai:focus-visible {
  outline: 2px solid var(--sj-white);
  outline-offset: 2px;
}

/* ---------- Launcher (computers) ---------- */
.sj-ai-launch {
  position: fixed;
  z-index: 65;
  right: var(--sj-s5);
  bottom: var(--sj-s5);
  display: flex;
  align-items: center;
  gap: var(--sj-s3);
  min-height: 4rem;
  padding: var(--sj-s2) var(--sj-s5) var(--sj-s2) var(--sj-s3);
  border: 0;
  border-radius: var(--sj-radius);
  background: var(--sj-blue);
  color: var(--sj-white);
  box-shadow: 0 10px 28px -10px var(--sj-shade);
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--sj-fast) ease,
    bottom var(--sj-base) var(--sj-ease-out);
}
.sj-ai-launch .sj-ai-face {
  --sj-ai-pupil: var(--sj-blue-deep);
  --sj-ai-rim: var(--sj-blue-deep);
  width: 3rem;
  height: 3rem;
  color: var(--sj-white);
}
.sj-ai-launch .sj-ai-face__eyes,
.sj-ai__hero .sj-ai-face__eyes {
  animation: sj-ai-blink 6s ease-in-out 2s infinite;
}
.sj-ai-launch__text {
  display: grid;
  line-height: 1.2;
}
.sj-ai-launch__text strong {
  font: 700 1.375rem / 1.05 var(--sj-font-head);
  letter-spacing: 0.02em;
}
.sj-ai-launch__text span {
  font-size: var(--sj-text-xs);
  color: var(--sj-blue-tint);
}
.sj-ai-launch__text em {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.sj-ai-launch:hover {
  background: var(--sj-blue-strong);
}
.sj-ai-launch:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}
.sj-ai-launch:active {
  transform: translateY(1px);
}

/* One tip per visit, above the launcher; closes for the rest of the visit. */
.sj-ai-tip {
  position: fixed;
  z-index: 65;
  right: var(--sj-s5);
  bottom: calc(var(--sj-s5) + 4.75rem);
  display: flex;
  align-items: flex-start;
  gap: var(--sj-s2);
  width: 19rem;
  padding: var(--sj-s3) var(--sj-s2) var(--sj-s3) var(--sj-s4);
  border: 1px solid var(--sj-line);
  border-top: 4px solid var(--sj-blue);
  background: var(--sj-white);
  box-shadow: 0 10px 28px -10px var(--sj-shade);
  font-size: var(--sj-text-sm);
  animation: sj-ai-in 320ms var(--sj-ease-out);
}
.sj-ai-tip[hidden] {
  display: none;
}
.sj-ai-tip p {
  margin: 0;
}
.sj-ai-tip strong {
  display: block;
  color: var(--sj-blue);
}
.sj-ai-tip__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: none;
  color: var(--sj-text-2);
  cursor: pointer;
}
.sj-ai-tip__close .sj-icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* The catalogue's order bar owns the bottom edge while it is shown. */
body.sj-has-orderbar .sj-ai-launch {
  bottom: 6rem;
}
body.sj-has-orderbar .sj-ai-tip {
  display: none;
}
html.sj-ai-open .sj-ai-launch,
html.sj-ai-open .sj-ai-tip {
  display: none;
}
/* The add-to-cart note appears beside the open panel, not under it. */
@media (min-width: 48rem) {
  html.sj-ai-open .sj-toast {
    right: calc(31rem + 2 * var(--sj-s5));
  }
}

/* ---------- Bottom bar button (phones): larger than the others, lifted above the bar ---------- */
.sj-tabbar .sj-tabbar__ai {
  color: var(--sj-white);
  font-weight: 700;
}
.sj-tabbar .sj-tabbar__ai .sj-ai-face {
  --sj-ai-pupil: var(--sj-blue-deep);
  --sj-ai-rim: var(--sj-blue-deep);
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.25rem;
  padding: 0.3125rem;
  border-radius: 50%;
  background: var(--sj-blue-deep);
  color: var(--sj-white);
}

/* ---------- Panel ---------- */
.sj-ai:not([open]) {
  display: none;
}
.sj-ai[open] {
  position: fixed;
  z-index: 80;
  inset: auto var(--sj-s5) var(--sj-s5) auto;
  display: flex;
  flex-direction: column;
  width: 31rem;
  height: min(52rem, calc(100dvh - var(--sj-header-h) - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--sj-line);
  border-radius: var(--sj-radius);
  background: var(--sj-white);
  color: var(--sj-text);
  box-shadow:
    0 2px 6px rgb(0 40 70 / 0.08),
    0 28px 64px -24px var(--sj-shade);
  overflow: hidden;
  animation: sj-ai-in 240ms var(--sj-ease-out);
}
@keyframes sj-ai-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.sj-ai::backdrop {
  background: rgb(0 40 70 / 0.45);
}

.sj-ai__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sj-s3);
  flex: none;
  padding: var(--sj-s4) var(--sj-s2) var(--sj-s3) var(--sj-s4);
  background: var(--sj-blue-deep);
  color: var(--sj-white);
  overflow: hidden;
}
.sj-ai__head > :not(.sj-fanmark) {
  position: relative;
  z-index: 1;
}
.sj-fanmark--ai {
  top: -3.5rem;
  right: 3rem;
  width: 11rem;
  height: 11rem;
  opacity: 0.07;
}
.sj-ai__avatar {
  --sj-ai-pupil: var(--sj-blue-deep);
  --sj-ai-rim: var(--sj-blue-deep);
  width: 2.75rem;
  height: 2.75rem;
  color: var(--sj-white);
}
.sj-ai__live {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.375rem;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgb(74 222 128 / 0.2);
  vertical-align: 0.0625rem;
}
.sj-ai__title {
  flex: 1;
  min-width: 0;
}
.sj-ai__title h2 {
  margin: 0;
  font: 700 1.375rem / 1.05 var(--sj-font-head);
  letter-spacing: 0.02em;
}
.sj-ai__title p {
  margin: 0;
  font-size: var(--sj-text-xs);
  color: var(--sj-blue-deep-text);
}
.sj-ai__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sj-s1);
  min-width: var(--sj-tap);
  height: var(--sj-tap);
  padding: 0 var(--sj-s2);
  border: 0;
  border-radius: var(--sj-radius);
  background: none;
  color: var(--sj-blue-deep-text);
  font: 600 var(--sj-text-xs) var(--sj-font);
  cursor: pointer;
  transition:
    background-color var(--sj-fast) ease,
    color var(--sj-fast) ease;
}
.sj-ai__tool[hidden] {
  display: none;
}
.sj-ai__tool .sj-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.sj-ai__tool:hover {
  background: var(--sj-blue-strong);
  color: var(--sj-white);
}
.sj-ai__tool:focus-visible {
  outline: 2px solid var(--sj-white);
  outline-offset: -4px;
}

/* ---------- Conversation ---------- */
.sj-ai__log {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sj-s5) var(--sj-s4);
  scrollbar-width: thin;
  scrollbar-color: var(--sj-line-strong) transparent;
}
.sj-ai__log > * + * {
  margin-top: var(--sj-s4);
}
.sj-ai__hero {
  width: 4.5rem;
  height: 4.5rem;
  margin: var(--sj-s2) 0 var(--sj-s3);
}
.sj-ai__hello {
  margin: 0;
  max-width: 60ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sj-text-2);
}
.sj-ai__hello strong {
  display: block;
  margin-bottom: var(--sj-s1);
  font: 700 var(--sj-text-xl) / 1.1 var(--sj-font-head);
  color: var(--sj-text);
}
.sj-ai__try {
  margin: var(--sj-s4) 0 var(--sj-s2);
  font: 700 var(--sj-text-xs) / 1.3 var(--sj-font-head);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sj-text-2);
}
.sj-ai__starters {
  display: grid;
  gap: var(--sj-s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.sj-ai__starters button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sj-s3);
  width: 100%;
  min-height: 3rem;
  padding: var(--sj-s2) var(--sj-s3) var(--sj-s2) var(--sj-s4);
  border: 1px solid var(--sj-line);
  border-radius: var(--sj-radius);
  background: var(--sj-white);
  color: var(--sj-blue);
  font: 600 var(--sj-text-sm) / 1.35 var(--sj-font);
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--sj-fast) ease,
    border-color var(--sj-fast) ease;
}
.sj-ai__starters .sj-icon {
  flex: none;
  width: 1rem;
  height: 1rem;
  transition: transform var(--sj-base) var(--sj-ease-out);
}
.sj-ai__starters button:hover {
  border-color: var(--sj-blue);
  background: var(--sj-blue-tint);
}
.sj-ai__starters button:hover .sj-icon {
  transform: translateX(3px);
}
.sj-ai__starters button:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}

/* The customer's question: right, on light blue. */
.sj-ai__me {
  margin-left: auto;
  width: fit-content;
  max-width: 85%;
  padding: 0.625rem var(--sj-s3);
  border-radius: var(--sj-radius);
  background: var(--sj-blue);
  color: var(--sj-white);
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The assistant's answer: the small character, then text and cards. */
.sj-ai__bot {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--sj-s3);
  align-items: start;
}
.sj-ai__mini {
  width: 2rem;
  height: 2rem;
}
.is-new {
  animation: sj-ai-msg 280ms var(--sj-ease-out);
}
@keyframes sj-ai-msg {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.sj-ai__body {
  min-width: 0;
}
.sj-ai__text {
  padding-top: 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.sj-ai__text p,
.sj-ai__text ul,
.sj-ai__text ol {
  margin: 0;
}
.sj-ai__text > * + * {
  margin-top: var(--sj-s2);
}
.sj-ai__text ul,
.sj-ai__text ol {
  padding-left: 1.25rem;
}
.sj-ai__text li + li {
  margin-top: var(--sj-s1);
}
.sj-ai__status {
  display: flex;
  align-items: center;
  min-height: 1.75rem;
}
.sj-ai__dots {
  display: inline-flex;
  gap: 0.3125rem;
}
.sj-ai__dots i {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--sj-blue);
  opacity: 0.35;
  animation: sj-ai-dot 1.1s ease-in-out infinite;
}
.sj-ai__dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.sj-ai__dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes sj-ai-dot {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* Next questions under the latest answer: quiet rectangular buttons, one tap away. */
.sj-ai__next {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sj-s2);
  margin-top: var(--sj-s3);
}
.sj-ai__next button {
  min-height: 2.25rem;
  padding: 0.375rem var(--sj-s3);
  border: 1px solid var(--sj-line);
  border-radius: var(--sj-radius);
  background: var(--sj-white);
  color: var(--sj-blue);
  font: 600 var(--sj-text-xs) / 1.3 var(--sj-font);
  cursor: pointer;
  transition:
    background-color var(--sj-fast) ease,
    border-color var(--sj-fast) ease;
}
.sj-ai__next button:hover {
  border-color: var(--sj-blue);
  background: var(--sj-blue-tint);
}
.sj-ai__next button:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}
.sj-ai__error {
  display: flex;
  gap: var(--sj-s2);
  color: var(--sj-error);
  font-size: var(--sj-text-sm);
  font-weight: 600;
}
.sj-ai__error .sj-icon {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
}

/* ---------- Product rows ---------- */
.sj-ai__products {
  margin: var(--sj-s3) 0 0;
  padding: 0;
  list-style: none;
  border: var(--sj-rule);
  border-radius: var(--sj-radius);
}
.sj-ai__product {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: var(--sj-s1) var(--sj-s3);
  padding: var(--sj-s3);
}
.sj-ai__product + .sj-ai__product {
  border-top: var(--sj-rule);
}
.sj-ai__pic {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: var(--sj-rule);
  background: var(--sj-white);
  color: var(--sj-text-3);
}
.sj-ai__pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sj-ai__pic .sj-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.sj-ai__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--sj-text-sm);
  font-weight: 600;
  line-height: 1.35;
  color: var(--sj-text);
  text-decoration: none;
}
.sj-ai__name:hover {
  color: var(--sj-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sj-ai__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sj-s1) var(--sj-s3);
  font-size: var(--sj-text-xs);
  color: var(--sj-text-2);
  font-variant-numeric: tabular-nums;
}
.sj-ai__meta b {
  font-weight: 600;
  color: var(--sj-text);
}
.sj-ai__price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--sj-text);
  white-space: nowrap;
}
.sj-ai__buy {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sj-s2);
  margin-top: var(--sj-s1);
}

/* Ask about this product. */
.sj-ai__more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sj-blue);
  font: 600 var(--sj-text-xs) var(--sj-font);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.sj-ai__more .sj-icon {
  width: 1rem;
  height: 1rem;
}
.sj-ai__more:hover {
  color: var(--sj-blue-strong);
}
.sj-ai__more:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}
.is-busy .sj-ai__more {
  cursor: progress;
}

/* Price above availability. */
.sj-ai__pricebox {
  display: grid;
  gap: 0.125rem;
}

/* Availability: a word with an icon (DESIGN.md, Dostupnost). */
.sj-ai__avail {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--sj-s1);
  font-size: var(--sj-text-xs);
  font-weight: 600;
}
.sj-ai__avail .sj-icon {
  width: 1rem;
  height: 1rem;
}
.sj-ai__avail.is-ok {
  color: var(--sj-ok);
}
.sj-ai__avail.is-limited {
  color: var(--sj-accent-text);
}
.sj-ai__avail.is-out {
  color: var(--sj-error);
}

/* Small secondary add button on a product row. */
.sj-ai__add {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sj-s1);
  min-height: 2.25rem;
  padding: 0 var(--sj-s3);
  border: 2px solid var(--sj-blue);
  border-radius: var(--sj-radius);
  background: var(--sj-white);
  color: var(--sj-blue);
  font: 600 var(--sj-text-sm) var(--sj-font);
  cursor: pointer;
  transition:
    background-color var(--sj-fast) ease,
    color var(--sj-fast) ease;
}
.sj-ai__add .sj-icon {
  width: 1.125rem;
  height: 1.125rem;
}
.sj-ai__add:hover {
  background: var(--sj-blue-tint);
  color: var(--sj-blue-strong);
}
.sj-ai__add:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}
.sj-ai__add[aria-busy="true"] {
  cursor: progress;
  opacity: 0.6;
}
.sj-ai__add.is-done {
  border-color: transparent;
  background: none;
  color: var(--sj-ok);
  cursor: default;
}

/* ---------- Proposed cart ---------- */
.sj-ai__cart {
  margin-top: var(--sj-s3);
  border: 1px solid var(--sj-line-strong);
  /* Square corners (no radius): the 4 px blue line runs straight across, as on the product picture frame. */
  border-top: 4px solid var(--sj-blue);
}
.sj-ai__cart h3 {
  margin: 0;
  padding: var(--sj-s3) var(--sj-s3) var(--sj-s2);
  font: 700 var(--sj-text-xs) / 1.3 var(--sj-font-head);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sj-text-2);
}
.sj-ai__cart ul {
  margin: 0;
  padding: 0 var(--sj-s3);
  list-style: none;
}
.sj-ai__cart li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sj-s2);
  align-items: baseline;
  padding: var(--sj-s2) 0;
  border-top: var(--sj-rule);
  font-size: var(--sj-text-sm);
  font-variant-numeric: tabular-nums;
}
.sj-ai__cart li > b {
  font-weight: 700;
  color: var(--sj-blue);
}
.sj-ai__cart li span {
  overflow-wrap: anywhere;
}
.sj-ai__cart li small {
  display: block;
  font-size: var(--sj-text-xs);
  color: var(--sj-text-3);
}
.sj-ai__cart li em {
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.sj-ai__cartfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sj-s2) var(--sj-s3);
  padding: var(--sj-s3);
  border-top: 1px solid var(--sj-line-strong);
  background: var(--sj-panel);
}
.sj-ai__total {
  font-size: var(--sj-text-sm);
  color: var(--sj-text-2);
  font-variant-numeric: tabular-nums;
}
.sj-ai__total strong {
  display: block;
  font-size: var(--sj-text-lg);
  color: var(--sj-text);
}
.sj-ai__cartfoot .sj-btn {
  flex: 1 1 auto;
  justify-content: center;
}
.sj-ai__done {
  display: flex;
  align-items: center;
  gap: var(--sj-s2);
  font-size: var(--sj-text-sm);
  font-weight: 600;
  color: var(--sj-ok);
}
.sj-ai__done a {
  margin-left: auto;
  color: var(--sj-blue);
}
.sj-ai__done .sj-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* ---------- Composer ---------- */
.sj-ai__composer {
  flex: none;
  padding: var(--sj-s3) var(--sj-s3) var(--sj-s2);
  border-top: var(--sj-rule);
  background: var(--sj-white);
}
/* One field: the text and the send button sit inside the same frame. */
.sj-ai__field {
  display: flex;
  align-items: flex-end;
  gap: var(--sj-s2);
  padding: 0.25rem;
  border: 1px solid var(--sj-line-strong);
  border-radius: var(--sj-radius);
  background: var(--sj-white);
  transition:
    border-color var(--sj-fast) ease,
    box-shadow var(--sj-fast) ease;
}
.sj-ai__field:focus-within {
  border-color: var(--sj-blue);
  box-shadow: 0 0 0 3px var(--sj-blue-tint);
}
.sj-ai__input {
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  max-height: 8.5rem;
  padding: 0.5rem var(--sj-s2);
  border: 0;
  background: none;
  color: var(--sj-text);
  font: 400 var(--sj-text-md) / 1.45 var(--sj-font);
  resize: none;
  caret-color: var(--sj-blue);
}
.sj-ai__input::placeholder {
  color: var(--sj-text-3);
}
.sj-ai__input:focus {
  outline: none;
}
.sj-ai__send {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: var(--sj-radius);
  background: var(--sj-blue);
  color: var(--sj-white);
  cursor: pointer;
  transition: background-color var(--sj-fast) ease;
}
.sj-ai__send .sj-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.sj-ai__send:hover {
  background: var(--sj-blue-strong);
}
.sj-ai__send:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}
.sj-ai__send:disabled {
  background: var(--sj-panel);
  color: var(--sj-text-3);
  cursor: not-allowed;
}
.sj-ai__fine {
  flex: none;
  margin: 0;
  padding: 0 var(--sj-s3) var(--sj-s3);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--sj-text-3);
}

/* ---------- Unavailable: search and contact instead ---------- */
.sj-ai__off {
  flex: none;
  display: grid;
  gap: var(--sj-s3);
  padding: var(--sj-s4);
  border-top: var(--sj-rule);
}
.sj-ai__off[hidden] {
  display: none;
}
.sj-ai__off p {
  margin: 0;
}
.sj-ai.is-off .sj-ai__composer,
.sj-ai.is-off .sj-ai__fine {
  display: none;
}
.sj-ai__search {
  display: flex;
  gap: var(--sj-s2);
}
.sj-ai__search .sj-input {
  flex: 1;
  min-width: 0;
}
.sj-ai__ways {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--sj-rule);
}
.sj-ai__ways a {
  display: flex;
  align-items: center;
  gap: var(--sj-s3);
  min-height: 3rem;
  border-bottom: var(--sj-rule);
  font-weight: 600;
  text-decoration: none;
}

.sj-ai ::selection {
  background: var(--sj-blue-tint);
  color: var(--sj-text);
}

/* ---------- Phones: the bottom bar opens it over the whole screen ---------- */
@media (max-width: 47.99rem) {
  .sj-ai-launch {
    display: none;
  }
  .sj-ai[open] {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .sj-ai__head {
    padding-top: calc(var(--sj-s3) + env(safe-area-inset-top));
  }
  .sj-ai__tool span {
    display: none;
  }
  .sj-ai__fine {
    padding-bottom: calc(var(--sj-s3) + env(safe-area-inset-bottom));
  }
  .site-action--ai,
  .sj-ai-tip {
    display: none;
  }
}

/* ---------- Its own places on the page (inc/assistant.php) ---------- */
/* Home: what it does on the left, a field and example questions on the right. The 4 px blue top
   line is the assistant's frame, as on its cart proposal. */
.sj-askai {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  margin-top: var(--sj-s6);
  border: var(--sj-rule);
  border-top: 4px solid var(--sj-blue);
  /* Square where the blue line runs, so the line does not bend into the corners. */
  border-radius: 0 0 var(--sj-radius) var(--sj-radius);
}
.sj-askai__about {
  display: grid;
  align-content: center;
  gap: var(--sj-s4);
  padding: var(--sj-s6);
}
.sj-askai__head {
  display: flex;
  align-items: center;
  gap: var(--sj-s4);
}
.sj-askai__face {
  width: 5rem;
  height: 5rem;
}
.sj-askai__face .sj-ai-face__eyes {
  animation: sj-ai-blink 6s ease-in-out 3s infinite;
}
.sj-askai__lead {
  max-width: 52ch;
  font-size: 1.0625rem;
  color: var(--sj-text-2);
}
.sj-askai__can {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sj-s3) var(--sj-s5);
  margin: 0;
  padding: var(--sj-s4) 0 0;
  border-top: var(--sj-rule);
  list-style: none;
  font-weight: 600;
  font-size: var(--sj-text-sm);
  line-height: 1.35;
}
.sj-askai__can li {
  display: flex;
  align-items: center;
  gap: var(--sj-s3);
}
.sj-askai__can .sj-icon {
  flex: none;
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
  border-radius: var(--sj-radius);
  background: var(--sj-blue-tint);
  color: var(--sj-blue);
}
.sj-askai__try {
  display: grid;
  align-content: start;
  padding: var(--sj-s6);
  border-left: var(--sj-rule);
  background: var(--sj-panel);
}
.sj-askai__label {
  display: block;
  margin-bottom: var(--sj-s2);
  font: 700 var(--sj-text-xs) / 1.3 var(--sj-font-head);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sj-text-2);
}
.sj-askai__form .sj-ai__field {
  align-items: center;
}
.sj-askai__form .sj-ai__input {
  min-height: var(--sj-tap);
}
.sj-askai__send {
  flex: none;
}
.sj-askai__send .sj-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.sj-askai .sj-ai__try {
  margin-top: var(--sj-s5);
}
.sj-askai__fine {
  margin-top: var(--sj-s4);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--sj-text-3);
}
@media (max-width: 63.99rem) {
  .sj-askai {
    grid-template-columns: minmax(0, 1fr);
  }
  .sj-askai__try {
    border-left: 0;
    border-top: var(--sj-rule);
  }
}
@media (max-width: 47.99rem) {
  .sj-askai__about,
  .sj-askai__try {
    padding: var(--sj-s5) var(--sj-s4);
  }
  .sj-askai__face {
    width: 3.5rem;
    height: 3.5rem;
  }
  .sj-askai__can {
    grid-template-columns: minmax(0, 1fr);
  }
  /* The verb stays; the arrow alone would not say what the button does. */
  .sj-askai__send {
    padding-inline: var(--sj-s4);
  }
  .sj-askai__send .sj-icon {
    display: none;
  }
}

/* Catalogue: one quiet line above the table, computers only. */
.sj-aistrip {
  display: flex;
  align-items: center;
  gap: var(--sj-s3);
  margin-bottom: var(--sj-s3);
  padding: var(--sj-s2) var(--sj-s2) var(--sj-s2) var(--sj-s3);
  border: var(--sj-rule);
  border-radius: var(--sj-radius);
  background: var(--sj-blue-tint);
}
.sj-aistrip__face {
  width: 2.25rem;
  height: 2.25rem;
}
.sj-aistrip p {
  flex: 1;
  min-width: 0;
  font-size: var(--sj-text-sm);
  color: var(--sj-text-2);
}
.sj-aistrip strong {
  font: 700 1rem / 1 var(--sj-font-head);
  letter-spacing: 0.02em;
  color: var(--sj-blue);
}
.sj-aistrip__go {
  min-height: 2.5rem;
  padding-inline: var(--sj-s4);
  font-size: var(--sj-text-sm);
}
.sj-aistrip__go .sj-icon {
  width: 1rem;
  height: 1rem;
}
@media (max-width: 47.99rem) {
  .sj-aistrip {
    display: none;
  }
}

/* Product page: a full-width row in the buy box, below the main button. */
.sj-aiask {
  display: flex;
  align-items: center;
  gap: var(--sj-s3);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--sj-s2) var(--sj-s3);
  border: 1px solid var(--sj-line);
  border-radius: var(--sj-radius);
  background: var(--sj-blue-tint);
  color: var(--sj-blue);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--sj-fast) ease,
    border-color var(--sj-fast) ease;
}
.sj-aiask__face {
  width: 2.5rem;
  height: 2.5rem;
}
.sj-aiask__text {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 0.125rem;
  line-height: 1.3;
}
.sj-aiask__text strong {
  font-size: var(--sj-text-md);
  font-weight: 600;
}
.sj-aiask__text span {
  font-size: var(--sj-text-xs);
  color: var(--sj-text-2);
}
.sj-aiask > .sj-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--sj-base) var(--sj-ease-out);
}
.sj-aiask:hover {
  border-color: var(--sj-blue);
}
.sj-aiask:hover > .sj-icon {
  transform: translateX(3px);
}
.sj-aistrip__go:focus-visible,
.sj-aiask:focus-visible,
.sj-askai__send:focus-visible {
  outline: none;
  box-shadow: var(--sj-focus);
}

@media (prefers-reduced-motion: reduce) {
  .sj-ai[open],
  .sj-ai-tip,
  .sj-ai-launch .sj-ai-face__eyes,
  .sj-ai__hero .sj-ai-face__eyes,
  .sj-askai__face .sj-ai-face__eyes,
  .is-thinking .sj-ai-face__pupils,
  .sj-ai__dots i,
  .is-new {
    animation: none;
  }
}

/* Links to the shop's own pages in an answer (B2B portal, orders, registration). */
.sj-ai__link {
  color: var(--sj-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.sj-ai__link:hover {
  color: var(--sj-blue-deep);
}
