/* Akademia Chat F3, reuses site tokens from styles.css */

.chat-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fbfaf8;
}

.chat-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.chat-topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.chat-topbar .brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
}

.chat-top-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--muted);
}

.chat-top-links a:hover {
  color: var(--text);
}

.chat-shell {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 20px 16px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.chat-hero {
  padding: 8px 2px 4px;
}

.chat-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.2;
}

.chat-hero p {
  margin: 0;
  color: var(--muted);
  max-width: none;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 12px;
  min-height: 280px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}

.chat-msg--user {
  align-items: flex-end;
}

.chat-msg--assistant {
  align-items: flex-start;
}

.chat-bubble {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: min(640px, 100%);
  line-height: 1.5;
}

.chat-msg--user .chat-bubble {
  background: var(--accent-soft);
  border-color: #ffd5c8;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
}

.chat-chip:hover {
  border-color: #ffb79f;
  background: var(--accent-soft);
}

.chat-cards {
  display: grid;
  gap: 10px;
  width: 100%;
}

.chat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.chat-card.is-primary {
  border-color: #ffb79f;
  box-shadow: 0 12px 30px rgba(255, 75, 34, 0.08);
}

.chat-card__meta {
  margin-bottom: 6px;
}

.chat-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 8px;
}

.chat-card__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.chat-card__desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: none;
}

.chat-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-card__copy-status {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--green);
}

.chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.chat-btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chat-btn--ghost:hover {
  background: var(--soft);
}

.chat-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-deepen {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.chat-mail {
  width: 100%;
  background: #fff;
  border: 1px dashed #ffb79f;
  border-radius: 14px;
  padding: 14px;
}

.chat-mail__title {
  margin: 0 0 10px;
  font-weight: 700;
}

.chat-mail__form {
  display: grid;
  gap: 10px;
}

.chat-mail__form input[type="email"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.chat-mail__consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
}

.chat-mail__note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.chat-promo {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.chat-promo__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.chat-promo__cta {
  font-weight: 700;
  color: var(--accent);
}

.chat-fallback a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.chat-composer {
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(251, 250, 248, 0), #fbfaf8 28%);
}

.chat-composer form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.chat-composer textarea {
  flex: 1;
  border: 0;
  resize: none;
  min-height: 48px;
  max-height: 140px;
  padding: 10px;
  background: transparent;
  outline: none;
  line-height: 1.4;
}

.chat-status {
  margin: 6px 2px 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .chat-topbar {
    padding: 12px 14px;
  }

  .chat-shell {
    padding: 14px 12px 20px;
  }

  .chat-card__actions {
    flex-direction: column;
  }

  .chat-btn {
    width: 100%;
  }
}
