/* ask.css — чат-виджет «Спросите про уровнемеры» (Фаза 4 RAG, этап 11).
   Токены — из :root card.css (--yellow, --ink, --paper, --band, --line, --radius, --gray, --head). */

.ask-sec{padding-bottom:64px}

.ask-head{max-width:720px;margin:24px auto 32px;text-align:center}
.ask-head h1{color:var(--head);font-size:32px;margin:0 0 12px}
.ask-sub{color:var(--gray);font-size:16px;line-height:1.5;margin:0}

.ask-box{
  max-width:760px;margin:0 auto;
  border:1px solid var(--line);border-radius:var(--radius);
  background:var(--paper);
  display:flex;flex-direction:column;
  min-height:420px;
  overflow:hidden;
}

.ask-log{
  flex:1;padding:24px;overflow-y:auto;max-height:520px;
  display:flex;flex-direction:column;gap:16px;
}

.ask-msg{display:flex}
.ask-msg-user{justify-content:flex-end}
.ask-msg-bot{justify-content:flex-start}

.ask-bubble{
  max-width:80%;padding:12px 16px;border-radius:var(--radius);
  line-height:1.55;font-size:15px;white-space:pre-wrap;
}
.ask-msg-bot .ask-bubble{background:var(--band);color:var(--ink)}
.ask-msg-user .ask-bubble{background:var(--yellow);color:var(--ink);font-weight:600}

.ask-sources{margin-top:8px;font-size:13px;color:var(--gray);white-space:normal}
.ask-sources b{color:var(--head)}

.ask-loading{color:var(--gray);font-style:italic}

.ask-form{
  display:flex;gap:12px;padding:16px 24px;
  border-top:1px solid var(--line);
}
.ask-input{
  flex:1;padding:12px 16px;
  border:1px solid var(--line);border-radius:var(--radius);
  font-size:15px;font-family:inherit;
}
.ask-input:focus{outline:none;border-color:var(--yellow)}

.ask-send{white-space:nowrap}
.ask-send:disabled{opacity:.5;cursor:not-allowed}

@media (max-width:820px){
  .ask-bubble{max-width:90%}
  .ask-head h1{font-size:26px}
}

@media (max-width:390px){
  .ask-form{flex-direction:column}
  .ask-log{padding:16px}
}
