/*! iStage · AI asistent (chat) · v1.0.0 – okno chatu vpravo dole (Záhlaví). Bez skriptu chat.js se nic nezobrazí. */
.igc {
  --igc-font: 'HP Poppins', 'Poppins', 'Nunito Sans', Arial, sans-serif;
  --igc-text: 'Nunito Sans', Arial, sans-serif;
  --igc-ink: #0b0d10; --igc-2: #55595f; --igc-3: #666b73; --igc-line: #e2e2df; --igc-line-2: #cdcdc9;
  --igc-soft: #f4f4f2; --igc-soft-2: #fafaf8; --igc-acc-t: #d4121a;
  --igc-blue: #0076e1; --igc-blue-d: #105eab; --igc-ok: #15803d; --igc-focus: #0063c7;
  --igc-z: 2147482000;                             /* pod vrstvami košíku, menu a Oblíbených (2147483647) */
  font-family: var(--igc-text); color: var(--igc-ink); -webkit-font-smoothing: antialiased;
}
.igc, .igc *, .igc *::before, .igc *::after { box-sizing: border-box; }
.igc button, .igc select, .igc textarea { font: inherit; color: inherit; margin: 0; letter-spacing: normal; text-transform: none; }
.igc button { border: 0; background: none; cursor: pointer; box-shadow: none; line-height: 1.2; }
.igc a { color: inherit; }
.igc svg { display: block; flex: none; }
.igc :focus-visible { outline: 2px solid var(--igc-focus); outline-offset: 2px; }
.igc .igc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- tlačítko „Poradím vám“ ---------- */
.igc .igc-fab {
  position: fixed; right: 20px; bottom: calc(20px + var(--igc-lift, 0px)); z-index: var(--igc-z);
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 6px; border-radius: 28px;
  background: var(--igc-ink); color: #fff; font: 600 15px/1 var(--igc-font);
  box-shadow: 0 14px 32px -12px rgba(11, 13, 16, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .18s ease, box-shadow .18s ease, bottom .2s ease;
}
.igc .igc-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(11, 13, 16, .6); }
.igc .igc-fab-ava { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.igc .igc-fab-ava svg { width: 34px; height: 28px; }
.igc.is-open .igc-fab, .igc.is-wait .igc-fab { display: none; }

/* ---------- okno ---------- */
.igc .igc-panel {
  position: fixed; right: 20px; bottom: calc(20px + var(--igc-lift, 0px)); z-index: var(--igc-z);
  display: flex; flex-direction: column; width: 400px; height: min(680px, calc(100vh - 40px - var(--igc-lift, 0px)));
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px -24px rgba(11, 13, 16, .5), 0 0 0 1px rgba(11, 13, 16, .07);
  opacity: 0; transform: translateY(12px) scale(.985); transform-origin: 100% 100%;
  transition: opacity .16s ease, transform .2s ease;
}
.igc .igc-panel[hidden] { display: none !important; }
.igc .igc-panel.is-in { opacity: 1; transform: none; }

.igc .igc-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--igc-line); background: #fff; }
.igc .igc-ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--igc-ink); flex: none; }
.igc .igc-ava svg { width: 30px; height: 25px; }
.igc .igc-ht { flex: 1; min-width: 0; }
.igc .igc-h { margin: 0; padding: 0; font: 600 16px/1.25 var(--igc-font); color: var(--igc-ink); display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: normal; }
.igc .igc-ai { font: 700 10.5px/1 var(--igc-font); letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; background: #fff0f0; color: var(--igc-acc-t); }
.igc .igc-sub { margin: 2px 0 0; padding: 0; font-size: 12.5px; line-height: 1.3; color: var(--igc-3); }
.igc .igc-ib { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; color: var(--igc-2); flex: none; }
.igc .igc-ib:hover { background: var(--igc-soft); color: var(--igc-ink); }
.igc .igc-ib svg { width: 19px; height: 19px; }

/* ---------- zprávy ---------- */
.igc .igc-log {
  position: relative;                              /* offsetTop zpráv počítaný od začátku výpisu (posun za odpovědí) */
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 14px 18px; background: var(--igc-soft-2);
}
.igc .igc-m { max-width: 100%; font-size: 15px; line-height: 1.5; }
.igc .igc-u {
  align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 6px 18px;
  background: var(--igc-ink); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere;
}
.igc .igc-a { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.igc .igc-t {
  max-width: 92%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: #fff; color: var(--igc-ink);
  box-shadow: 0 0 0 1px var(--igc-line); overflow-wrap: anywhere;
}
.igc .igc-t p { margin: 0 0 8px; padding: 0; font-size: 15px; line-height: 1.5; color: inherit; }
.igc .igc-t p:last-child { margin-bottom: 0; }
.igc .igc-t ul { margin: 2px 0 8px; padding: 0 0 0 20px; list-style: disc; }
.igc .igc-t ul:last-child { margin-bottom: 0; }
.igc .igc-t li { margin: 2px 0; padding: 0; font-size: 15px; line-height: 1.45; list-style: disc; }
.igc .igc-t a { color: var(--igc-focus); text-decoration: underline; text-underline-offset: 2px; }
.igc .igc-t b { font-weight: 700; }
.igc .igc-err { box-shadow: 0 0 0 1px #f3c7c7; background: #fff8f8; }
.igc .igc-retry { margin-top: 8px; padding: 7px 12px; border-radius: 10px; background: var(--igc-ink); color: #fff; font: 600 13.5px/1.2 var(--igc-font); }

.igc .igc-chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.igc .igc-chip {
  padding: 8px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--igc-line-2) inset;
  font: 600 13.5px/1.25 var(--igc-font); color: var(--igc-ink); text-align: left;
}
.igc .igc-chip:hover { box-shadow: 0 0 0 1px var(--igc-ink) inset; }
.igc .igc-chip--p { background: var(--igc-ink); color: #fff; box-shadow: none; }
.igc .igc-chip--p:hover { box-shadow: none; background: #23272e; }

.igc .igc-st { display: flex; align-items: center; gap: 4px; margin: 0; padding: 4px 2px; font-size: 13px; line-height: 1.3; color: var(--igc-3); }
.igc .igc-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--igc-line-2); animation: igc-dot 1s infinite ease-in-out; }
.igc .igc-st i:nth-child(2) { animation-delay: .15s; }
.igc .igc-st i:nth-child(3) { animation-delay: .3s; }
.igc .igc-st span { margin-left: 6px; }
@keyframes igc-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- karta produktu ---------- */
.igc .igc-card {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; width: 100%; padding: 10px;
  background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--igc-line);
}
.igc .igc-c-img { display: block; width: 72px; height: 72px; border-radius: 12px; background: #f2f2f2; overflow: hidden; }
.igc .igc-c-img img { width: 72px; height: 72px; max-width: none; object-fit: contain; mix-blend-mode: darken; display: block; }
.igc .igc-c-b { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.igc .igc-c-n {
  font: 600 14px/1.3 var(--igc-font); color: var(--igc-ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.igc .igc-c-n:hover { text-decoration: underline; }
.igc .igc-c-m { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.igc .igc-c-p { font: 700 16px/1.2 var(--igc-font); color: var(--igc-ink); }
.igc .igc-c-m s { font-size: 13px; color: var(--igc-3); }
.igc .igc-c-f { font: 700 12px/1 var(--igc-font); color: var(--igc-acc-t); }
.igc .igc-c-a { font-size: 12.5px; line-height: 1.3; color: var(--igc-3); }
.igc .igc-c-a.is-ok { color: var(--igc-ok); font-weight: 600; }
.igc .igc-c-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.igc .igc-c-v {
  flex: 1 1 100%; width: 100%; max-width: 100%; display: block; height: 34px; padding: 0 8px; border-radius: 10px;
  border: 1px solid var(--igc-line-2); background: #fff; font-size: 13px;
}
.igc .igc-c-buy, .igc .igc-c-det, .igc .igc-c-go {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px;
  font: 600 13.5px/1 var(--igc-font); text-decoration: none; white-space: nowrap;
}
.igc .igc-c-buy { background: var(--igc-blue); color: #fff; }
.igc .igc-c-buy:hover { background: var(--igc-blue-d); }
.igc .igc-c-buy svg { width: 16px; height: 16px; }
.igc .igc-c-buy.is-busy { opacity: .6; cursor: progress; }
.igc .igc-c-buy.is-done { background: var(--igc-ok); }
.igc .igc-c-det, .igc .igc-c-go { box-shadow: 0 0 0 1px var(--igc-line-2) inset; color: var(--igc-ink); background: #fff; }
.igc .igc-c-det:hover, .igc .igc-c-go:hover { box-shadow: 0 0 0 1px var(--igc-ink) inset; }
.igc .igc-c-msg { margin: 0; padding: 0; font-size: 12.5px; line-height: 1.3; color: var(--igc-acc-t); }
.igc .igc-c-msg:empty { display: none; }

/* ---------- kontakt na kolegy ---------- */
.igc .igc-kont { width: 100%; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--igc-line); display: flex; flex-direction: column; gap: 6px; }
.igc .igc-k-h { margin: 0 0 2px; padding: 0; font: 600 13.5px/1.3 var(--igc-font); color: var(--igc-ink); }
.igc .igc-k-b { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--igc-soft); color: var(--igc-ink); text-decoration: none; }
.igc .igc-k-b:hover { background: #ececea; }
.igc .igc-k-b svg { width: 20px; height: 20px; color: var(--igc-2); }
.igc .igc-k-b span { display: flex; flex-direction: column; min-width: 0; }
.igc .igc-k-b b { font: 600 14px/1.3 var(--igc-font); overflow-wrap: anywhere; }
.igc .igc-k-b small { font-size: 12.5px; line-height: 1.3; color: var(--igc-3); }

.igc .igc-fb { display: flex; align-items: center; gap: 2px; font-size: 12.5px; line-height: 1.3; color: var(--igc-3); }
.igc .igc-fb span { margin-right: 4px; }
.igc .igc-fb .igc-ib { width: 30px; height: 30px; }
.igc .igc-fb .igc-ib svg { width: 16px; height: 16px; }

/* ---------- psaní ---------- */
.igc .igc-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 10px 12px 8px; border-top: 1px solid var(--igc-line); background: #fff; }
.igc .igc-ta {
  flex: 1; min-width: 0; width: auto; height: 44px; min-height: 44px; max-height: 120px; margin: 0; padding: 11px 14px; resize: none; overflow-y: auto;
  border: 1px solid var(--igc-line-2); border-radius: 14px; background: #fff; font-size: 15px; line-height: 1.4; color: var(--igc-ink);
  box-shadow: none; outline: 0;
}
.igc .igc-ta:focus { border-color: var(--igc-focus); box-shadow: 0 0 0 3px rgba(0, 99, 199, .15); }
.igc .igc-ta::placeholder { color: #8a8f96; }
.igc .igc-send { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--igc-ink); color: #fff; flex: none; }
.igc .igc-send:disabled { opacity: .35; cursor: default; }
.igc .igc-send svg { width: 20px; height: 20px; }
.igc .igc-fine { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11.5px; line-height: 1.35; color: var(--igc-3); }
.igc .igc-fine a { color: var(--igc-3); text-decoration: underline; }

/* ---------- mobil: okno přes celou obrazovku ---------- */
@media (max-width: 767px) {
  .igc .igc-fab { right: 14px; bottom: calc(14px + var(--igc-lift, 0px)); width: 56px; padding: 0; justify-content: center; }
  .igc .igc-fab-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .igc .igc-fab-ava { width: 48px; height: 48px; background: transparent; }
  .igc .igc-fab-ava svg { width: 38px; height: 31px; }
}
@media (max-width: 600px) {
  html.igc-lock, html.igc-lock body { overflow: hidden !important; }
  .igc .igc-panel {
    top: var(--igc-vt, 0px); right: 0; bottom: auto; left: 0; width: 100%; height: var(--igc-vh, 100vh); height: var(--igc-vh, 100dvh);
    border-radius: 0; transform: translateY(16px);
  }
  .igc .igc-head { padding-top: max(10px, env(safe-area-inset-top)); }
  .igc .igc-ta { font-size: 16px; }                 /* iOS nezvětšuje stránku při psaní */
  .igc .igc-fine { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .igc .igc-t { max-width: 96%; }
}
@media (prefers-reduced-motion: reduce) {
  .igc .igc-fab, .igc .igc-panel { transition: none; }
  .igc .igc-st i { animation: none; opacity: .7; }
}
@media print { .igc { display: none !important; } }
