/* /chat/: the Wireface Chat page. On top of site.css, which has the buttons, cards, grids, boxes, paths, code blocks
   and FAQ this page shares with the others. */

/* --- hero: the copy, then the widget on a website, big --- */
.chat-hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.chat-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .35;
  mask-image: radial-gradient(ellipse 75% 55% at 60% 20%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 60% 20%, #000 15%, transparent 75%);
}
.chat-hero .wrap { position: relative; }
.chat-hero-copy { max-width: 940px; }
.chat-hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); max-width: none; }
.chat-hero .lede { max-width: 60ch; }
.chat-hero .fine { max-width: 66ch; }
.chat-hero .fine a, .chat-demo a, .feat p a, .chat-install a, .path .fine a { color: #c7d2fe; }
.chat-shot, .shots figure { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); }
.chat-shot { margin-top: 48px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .08), 0 50px 120px -50px rgba(34, 211, 238, .45), 0 40px 80px -40px rgba(0, 0, 0, .9); }
.chat-shot img, .shots img { display: block; width: 100%; height: auto; }
.chat-shot figcaption, .shots figcaption { padding: 12px 16px; color: var(--dim); font-size: 0.86rem;
  border-top: 1px solid var(--line); background: var(--night-2); }

/* --- the live demo: pick a layout, things to ask --- */
.chat-demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.layouts { display: grid; gap: 10px; margin-top: 1.8rem; }
.layout { display: grid; gap: 2px; text-align: left; padding: 14px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(13, 22, 48, .6); color: var(--text); font: inherit;
  transition: border-color .2s, background .2s; }
.layout b { font: 600 1rem var(--display); }
.layout span { color: var(--muted); font-size: 0.9rem; }
.layout:hover { border-color: rgba(34, 211, 238, .5); }
.layout[aria-pressed="true"] { border-color: rgba(34, 211, 238, .7);
  background: linear-gradient(180deg, rgba(34, 211, 238, .1), rgba(13, 22, 48, .7)); }
.chat-demo .box h3 { margin-bottom: 1rem; }

/* --- screenshots: layouts in a row (the phone narrower), the admin in a 2 x 2 grid --- */
.shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .42fr); gap: 16px; margin-top: 2.4rem;
  align-items: start; }
.shots.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* --- the snippet beside its words --- */
.chat-install { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.chat-install .code pre, .path .code pre { font-size: 0.86rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* --- hosted or self-hosted --- */
.chat-steps { margin: 0 0 0 1.2em; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 0.97rem; }
.chat-steps b { color: var(--text); font-weight: 600; }
.path .code { margin: 1rem 0 0.4rem; }
.path .btn { margin-top: 1.2rem; align-self: start; }

/* the bot's show_section tool: the section it scrolled to glows for a moment */
.flash { animation: chat-flash 1.8s ease-out; }
@keyframes chat-flash {
  0% { box-shadow: inset 0 0 0 2px rgba(34, 211, 238, .9), inset 0 0 80px rgba(34, 211, 238, .18); }
  100% { box-shadow: inset 0 0 0 2px rgba(34, 211, 238, 0), inset 0 0 80px rgba(34, 211, 238, 0); }
}
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

@media (max-width: 980px) {
  .chat-demo, .chat-install { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .shots { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .shots .phone { grid-column: 1 / -1; max-width: 300px; }
}
@media (max-width: 820px) {
  .chat-hero { padding: 32px 0 56px; }
  .chat-shot { margin-top: 32px; }
}
@media (max-width: 560px) {
  .shots, .shots.wide { grid-template-columns: minmax(0, 1fr); }
  .chat-shot figcaption, .shots figcaption { font-size: 0.82rem; }
}
