/* =====================================================================
   ALSflow — stránka AI asistentů

   Navazuje na site-pages.css + flash.css. Odsud jsou jenom součástky,
   které jinde na webu nejsou: interaktivní ukázky, ceníkové karty
   a chat vpravo dole.

   Stará verze téhle stránky měla vlastní designový systém — 55 kB
   stylů v hlavičce, vlastní barvy, vlastní tlačítka, vlastní patičku.
   Vypadala jako web jiné firmy. Tenhle soubor je z ní to, co za
   přenesení stálo, přepsané do tokenů zbytku webu.
   ===================================================================== */

/* =====================================================================
   Ukázky
   ===================================================================== */
.demo-frame {
  overflow: hidden;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 30px 70px rgb(0 0 0 / 50%), inset 0 1px 0 rgb(255 255 255 / 6%);
}

.demo-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.7rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.demo-tabs::-webkit-scrollbar { display: none; }

.demo-tab {
  flex-shrink: 0;
  padding: 0.55rem 1rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--t2);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.demo-tab:hover { color: var(--t1); background: rgb(255 255 255 / 5%); }

.demo-tab.on {
  color: var(--t1);
  background: rgb(91 157 255 / 12%);
  border-color: rgb(91 157 255 / 38%);
}

.demo-pane { display: none; padding: 1.5rem; }
.demo-pane.on { display: block; animation: paneIn 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes paneIn {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------
   Schránka
   -------------------------------------------------------------------- */
.mail-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.mail-row:hover { background: rgb(255 255 255 / 4%); border-color: var(--line); }
.mail-row.on { background: rgb(91 157 255 / 10%); border-color: rgb(91 157 255 / 32%); }

.mail-av {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2f6fdd, #2563eb);
  border-radius: 50%;
}

.mail-txt { flex: 1; min-width: 0; }
.mail-txt b { display: block; font-size: 0.84rem; font-weight: 700; }
.mail-txt span {
  display: block;
  overflow: hidden;
  font-size: 0.79rem;
  color: var(--t2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tlačítko u řádku nesmí uskočit — proto flex-shrink: 0. */
.mail-go {
  flex-shrink: 0;
  padding: 0.42rem 0.8rem;
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--b-400);
  cursor: pointer;
  background: rgb(59 130 246 / 12%);
  border: 1px solid rgb(59 130 246 / 30%);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.mail-go:hover { color: #fff; background: rgb(59 130 246 / 30%); }

.reply-area {
  max-height: 0;
  margin-top: 0.8rem;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s;
}

.reply-area.on { max-height: 420px; opacity: 1; }

.reply-box {
  padding: 1.1rem;
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.reply-box .head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.reply-box .body { font-size: 0.86rem; line-height: 1.7; color: var(--t1); }
.reply-box .foot { display: flex; gap: 0.5rem; margin-top: 1.1rem; }

.mini-btn {
  padding: 0.5rem 0.95rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--t1);
  cursor: pointer;
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  transition: background 0.2s, border-color 0.2s;
}

.mini-btn:hover { background: rgb(255 255 255 / 12%); border-color: rgb(255 255 255 / 28%); }
.mini-btn.primary { color: #05070d; background: var(--grad); border-color: transparent; }

.note-ok {
  margin-top: 0.9rem;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  color: #86efac;                       /* 9,6 : 1 na kartě */
  background: rgb(34 197 94 / 12%);
  border: 1px solid rgb(34 197 94 / 30%);
  border-radius: 10px;
  animation: paneIn 0.35s ease;
}

/* --------------------------------------------------------------------
   Recepce
   -------------------------------------------------------------------- */
.ask-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }

.ask-chip {
  padding: 0.42rem 0.8rem;
  font-family: var(--font);
  font-size: 0.78rem;
  color: var(--t2);
  cursor: pointer;
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.ask-chip:hover {
  color: #cfe1ff;
  background: rgb(59 130 246 / 15%);
  border-color: rgb(59 130 246 / 40%);
}

.ask-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 262px;
  padding: 1rem;
  overflow-y: auto;
  background: rgb(0 0 0 / 30%);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ask-bubble {
  max-width: 82%;
  padding: 0.6rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.6;
  border-radius: 14px;
  animation: paneIn 0.3s ease;
}

.ask-bubble.me {
  align-self: flex-end;
  color: #cfe1ff;
  background: linear-gradient(135deg, rgb(59 130 246 / 24%), rgb(37 99 235 / 16%));
  border: 1px solid rgb(59 130 246 / 32%);
  border-bottom-right-radius: 4px;
}

.ask-bubble.bot {
  align-self: flex-start;
  color: var(--t1);
  background: rgb(255 255 255 / 5%);
  border: 1px solid var(--line-2);
  border-bottom-left-radius: 4px;
}

.ask-bar { display: flex; gap: 0.5rem; margin-top: 0.8rem; }

.ask-bar input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.95rem;
  font-family: var(--font);
  font-size: 0.86rem;
  color: var(--t1);
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ask-bar input::placeholder { color: var(--t3); }
.ask-bar input:focus { border-color: rgb(91 157 255 / 55%); box-shadow: 0 0 0 3px rgb(91 157 255 / 12%); }

.ask-bar button {
  flex-shrink: 0;
  width: 42px;
  font-size: 1rem;
  color: #05070d;
  cursor: pointer;
  background: var(--grad);
  border: 0;
  border-radius: 10px;
}

/* --------------------------------------------------------------------
   Zpětná vazba
   -------------------------------------------------------------------- */
.rate-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.rate-row:last-child { border-bottom: 0; }
.rate-row .stars { flex-shrink: 0; font-size: 0.82rem; letter-spacing: 0.08em; color: var(--amber); }
.rate-row .what { font-size: 0.85rem; line-height: 1.6; color: var(--t2); }
.rate-row .what b { display: block; margin-bottom: 0.2rem; color: var(--t1); }

.rate-reply {
  margin-top: 0.6rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--t2);
  background: rgb(91 157 255 / 8%);
  border-left: 2px solid rgb(91 157 255 / 50%);
  border-radius: 0 8px 8px 0;
}

.rate-reply b { color: var(--b-400); }

/* Čtyři karty vedle sebe. Dům má cards-3; tohle je jediné místo na
   webu, kde jich je do řádku víc. */
.cards-4 { grid-template-columns: repeat(4, 1fr); }

@media (width <= 1180px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (width <= 620px)  { .cards-4 { grid-template-columns: 1fr; } }

/* =====================================================================
   Ceník
   ===================================================================== */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: start; }

@media (width <= 1000px) { .price-grid { grid-template-columns: 1fr; } }

.price-card { position: relative; padding: 1.9rem 1.6rem; }

/* Zvýrazněná karta.

   Nepoužívá .panel-ring z flash.css — ten si kreslí kuželový obrys
   přes ::before a podklad přes ::after, jenže obojí má na .panel už
   obsazené (dosvit za kurzorem a maskovaný barevný obrys). Když se
   třídy složily, ::after zdědil masku a nulové krytí od .panel, přestal
   obrys zakrývat a kužel se rozlil přes text karty.

   Tohle místo toho jen rozsvítí obrys, který .panel::after kreslí sám,
   a nechá jeho barvu téct. Žádná dvě pravidla se tak neperou o stejný
   pseudoprvek. */
.price-card.is-top::after {
  background: var(--grad-live);
  background-size: 260% 100%;
  opacity: 0.9;
  animation: gradFlow 9s linear infinite;
}

.price-card.is-top:hover::after { opacity: 1; }

/* Uvnitř karty, ne přesahující ven: .panel má overflow: hidden, takže
   odznak posazený nad horní hranu se ořízl v půlce. */
.price-card .tag {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.22rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #05070d;
  text-transform: uppercase;
  background: var(--grad);
  border-radius: 100px;
}

.price-card h3 { margin-bottom: 0.35rem; padding-right: 7rem; font-size: 1.15rem; }
.price-card .what { min-height: 2.9rem; margin-bottom: 1.3rem; font-size: 0.87rem; line-height: 1.6; color: var(--t2); }

.price-card .cost {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.price-card .cost b {
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--grad-live);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradFlow 9s linear infinite;
}

.price-card .cost span { font-size: 0.85rem; color: var(--t3); }
.price-card .list { margin: 1.3rem 0 1.6rem; }
.price-card .list li { font-size: 0.87rem; }
.price-card .btn { width: 100%; }

/* =====================================================================
   Chat vpravo dole
   ===================================================================== */
.chat-open {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 950;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  cursor: pointer;
  background: linear-gradient(135deg, #2f6fdd, #2563eb);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 6px 26px rgb(37 99 235 / 50%);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-open:hover { box-shadow: 0 8px 34px rgb(37 99 235 / 68%); transform: scale(1.07); }
.chat-open svg { width: 25px; height: 25px; fill: #fff; pointer-events: none; }

.chat-open .badge {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--g-500);
  border: 2px solid #000;
  border-radius: 50%;
  animation: dotPulse 2.2s ease-in-out infinite;
}

.chat-panel {
  position: fixed;
  right: 1.5rem;
  bottom: 5.5rem;
  z-index: 949;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 3rem));
  height: min(520px, calc(100vh - 9rem));
  overflow: hidden;
  background: linear-gradient(180deg, #121218, var(--card));
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 70%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.28s, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-panel.open { opacity: 1; pointer-events: auto; transform: none; }

.chat-head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.chat-head .av {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2f6fdd, #2563eb);
  border-radius: 50%;
}

.chat-head .who { font-size: 0.86rem; font-weight: 700; }
.chat-head .live { display: flex; gap: 0.35rem; align-items: center; font-size: 0.72rem; color: var(--t3); }
.chat-head .live::before {
  width: 6px;
  height: 6px;
  content: '';
  background: var(--g-500);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--g-500);
}

.chat-count { margin-left: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--t3); }

.chat-x {
  padding: 0.2rem 0.4rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--t3);
  cursor: pointer;
  background: none;
  border: 0;
  transition: color 0.2s;
}

.chat-x:hover { color: var(--t1); }

.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
  overflow-y: auto;
}

.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }

.chat-bubble-msg {
  max-width: 84%;
  padding: 0.62rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.6;
  border-radius: 14px;
  animation: paneIn 0.3s ease;
}

.chat-msg.user .chat-bubble-msg {
  color: #cfe1ff;
  background: linear-gradient(135deg, rgb(59 130 246 / 24%), rgb(37 99 235 / 16%));
  border: 1px solid rgb(59 130 246 / 32%);
  border-bottom-right-radius: 4px;
}

.chat-msg.bot .chat-bubble-msg {
  color: var(--t1);
  background: rgb(255 255 255 / 5%);
  border: 1px solid var(--line-2);
  border-bottom-left-radius: 4px;
}

/* Skript vkládá tři tečky pod vlastním názvem — musí vypadat stejně
   jako .typing ve flash.css. */
.chat-typing-dots { display: inline-flex; gap: 4px; padding: 0.2rem 0; }
.chat-typing-dots span {
  width: 5px;
  height: 5px;
  background: var(--t2);
  border-radius: 50%;
  animation: blink 1.35s ease-in-out infinite;
}
.chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

.chat-bar { display: flex; gap: 0.5rem; padding: 0.8rem; border-top: 1px solid var(--line); }

.chat-bar input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--t1);
  background: rgb(255 255 255 / 5%);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-bar input::placeholder { color: var(--t3); }
.chat-bar input:focus { border-color: rgb(91 157 255 / 55%); }

.chat-bar button {
  flex-shrink: 0;
  width: 40px;
  color: #05070d;
  cursor: pointer;
  background: var(--grad);
  border: 0;
  border-radius: 10px;
}

.chat-bar button[disabled] { cursor: not-allowed; opacity: 0.45; }

@media (width <= 560px) {
  .chat-panel { right: 0.75rem; bottom: 5rem; width: calc(100vw - 1.5rem); }
  .chat-open { right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-pane.on,
  .ask-bubble,
  .chat-bubble-msg,
  .note-ok { animation: none; }
  .chat-open .badge,
  .chat-typing-dots span { animation: none; }
  .price-card .cost b,
  .price-card.is-top::after { animation: none; }
}
