/* /support/ — публичный чат поддержки. Использует /lk/styles.css как базу. */

.support-wrap {
  position: relative; z-index: 10;
  min-height: 100vh;
  padding: calc(var(--header-h) + 16px) 12px 24px;
  display: flex; flex-direction: column; align-items: center;
}
#root { width: 100%; max-width: 540px; }
.support-wrap:has(.chat-shell) { padding-bottom: 12px; }

/* ── Renew-subscription banner (→ /pay/) ─────────────────────────────────── */
.renew-banner {
  display: flex; align-items: center; gap: 16px;
  width: 100%; max-width: 540px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: 20px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
  border: 1px solid rgba(91,168,255,0.5);
  box-shadow: 0 10px 40px rgba(59,130,246,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative; overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.renew-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% -20%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}
.renew-banner:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(59,130,246,0.6); }
.renew-banner:active { transform: translateY(0) scale(.995); }
.renew-banner-icon {
  font-size: 40px; line-height: 1; flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}
.renew-banner-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.renew-banner-title {
  font-family: var(--font-display, inherit);
  font-weight: 900; font-size: clamp(22px, 6vw, 30px);
  letter-spacing: 0.02em; line-height: 1.05;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.renew-banner-sub { font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,0.88); }
.renew-banner-arrow { font-size: 30px; font-weight: 700; flex-shrink: 0; opacity: .9; }

/* Прячем плашку в активном чате с оператором — там нужен весь экран */
.support-wrap:has(.chat-shell) .renew-banner { display: none; }

.hero { text-align: center; margin-bottom: 22px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 999px;
  background: rgba(59,130,246,0.08);
  font-size: 12px; letter-spacing: 0.05em;
  color: #9DB7E8;
  margin-bottom: 14px;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #3B82F6; box-shadow: 0 0 8px #3B82F6;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 7vw, 44px);
  letter-spacing: 0.02em; line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #5BA8FF 60%, #1E40AF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(59,130,246,0.35);
  margin-bottom: 6px;
}
.hero h1.hero-sm { font-size: clamp(22px, 5vw, 30px); }
.hero-sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 6px; }

/* ── FAQ-bot ─────────────────────────────────────────────────────────────── */
.bot-stack {
  display: flex; flex-direction: column; gap: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
}
.bot-msg {
  align-self: flex-start;
  background: linear-gradient(180deg, rgba(59,130,246,0.18), rgba(59,130,246,0.08));
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px; line-height: 1.5;
  color: #e7eefb;
  max-width: 95%;
}
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.faq-btn {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f4f6fa;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit; font-size: 14px;
  text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
}
.faq-btn:hover { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.45); }
.faq-btn:active { transform: scale(0.99); }
.faq-arrow { color: #9DB7E8; opacity: .7; font-size: 16px; }

/* ── Answer card ─────────────────────────────────────────────────────────── */
.answer-card {
  font-size: 14px; line-height: 1.55; color: #e7eefb;
  white-space: pre-wrap;
}
.answer-card a { color: #5BA8FF; text-decoration: underline; }
.answer-card b { color: #ffffff; }
.answer-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 12px;
}
.muted-center {
  text-align: center; color: var(--muted); font-size: 13px;
  margin: 12px 0 0;
}
.muted-center a { color: #5BA8FF; }
.btn-anon { width: 100%; margin-top: 8px; opacity: .8; }

/* ── Chat shell ──────────────────────────────────────────────────────────── */
.chat-shell {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  /* Высота = viewport минус шапка сайта + небольшие отступы.
     dvh учитывает динамическую панель браузера на мобильных. */
  height: calc(100dvh - var(--header-h) - 28px);
  max-height: 820px;
}
.chat-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(59,130,246,0.08);
}
.chat-header-title { font-weight: 700; font-size: 15px; color: #f4f6fa; }
.chat-header-sub   { color: var(--muted); font-size: 12px; margin-top: 2px; }
.chat-warn {
  padding: 8px 14px;
  background: rgba(234,179,8,0.1);
  border-bottom: 1px solid rgba(234,179,8,0.3);
  color: #facc15;
  font-size: 12.5px; line-height: 1.4;
  text-align: center;
}
.chat-body {
  flex: 1 1 auto;
  padding: 12px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.bubble {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.b-user {
  align-self: flex-end;
  background: linear-gradient(180deg, #3B82F6, #1E40AF);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(59,130,246,0.25);
}
.b-staff {
  align-self: flex-start;
  background: rgba(255,255,255,0.1);
  color: #f4f6fa;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom-left-radius: 4px;
}
.b-system {
  align-self: center;
  background: rgba(59,130,246,0.08);
  color: #c5d6f5;
  border: 1px dashed rgba(59,130,246,0.3);
  font-size: 12.5px;
  text-align: center;
  max-width: 92%;
  border-radius: 10px;
  padding: 7px 12px;
}
.chat-input-bar {
  display: flex; gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #f4f6fa;
  font: inherit; font-size: 14px;
  padding: 10px 12px;
  resize: none;
  min-height: 42px;
  max-height: 120px;
}
.chat-input:focus { outline: none; border-color: rgba(59,130,246,0.6); }
.btn-send {
  background: linear-gradient(180deg, #3B82F6, #1E40AF);
  color: #fff;
  border: none;
  border-radius: 12px;
  width: 52px;
  cursor: pointer;
  font-size: 20px;
  flex-shrink: 0;
}
.btn-send:disabled { opacity: .5; cursor: default; }
.chat-shell + .muted-center { margin-top: 6px; padding-bottom: 8px; }
