/* Модули дня 2: опросник, чат, сравнение, избранное.
   Цвета/радиусы согласованы с basic.css и лендингом. А2. */

.quiz-box,
.chat-window,
.compare-wrap {
  background: #fff;
  border: 1px solid var(--line, #ececef);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow, 0 12px 32px rgba(40, 24, 12, 0.07));
}

.quiz-box {
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 24px;
}
.quiz-progress {
  color: var(--muted, #6d6d75);
  font-size: 0.85rem;
  margin: 8px 0 4px;
}
.progress-bar {
  height: 6px;
  background: var(--accent-soft, #F0E5FC);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent, #A85CFF);
  border-radius: inherit;
  transition: width 0.2s ease;
}
.quiz-form h2 {
  margin: 10px 0 16px;
  font-size: 1.2rem;
}
.quiz-form input[type=number] {
  padding: 10px 12px;
  border: 1px solid var(--line, #ececef);
  border-radius: 10px;
  font-size: 1rem;
  width: min(220px, 100%);
  font-family: inherit;
}
.unit {
  margin-left: 8px;
  color: var(--muted, #6d6d75);
}
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line, #ececef);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover {
  border-color: var(--accent, #A85CFF);
  background: var(--accent-soft, #F0E5FC);
}
.option:has(input:checked) {
  border-color: var(--accent, #A85CFF);
  background: var(--accent-soft, #F0E5FC);
}
.option input { accent-color: var(--accent, #A85CFF); }
.quiz-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.quiz-actions .spacer { flex: 1; }
.restart-form { margin-top: 14px; }
.link-like {
  background: none;
  border: 0;
  color: var(--muted, #6d6d75);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
  font-family: inherit;
}
.link-like:hover { color: var(--accent-dark, #9343f2); }
.form-error { color: #b42318; font-weight: 500; }
.notice {
  color: var(--muted, #6d6d75);
  font-size: 0.9rem;
  line-height: 1.45;
}
.notice a { color: var(--accent-dark, #9343f2); }
.reason {
  color: var(--yes, #067647);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.chat-window {
  max-width: 760px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 6px;
  margin-bottom: 4px;
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: min(80%, 520px);
}
.msg.user {
  align-self: flex-end;
  align-items: flex-end;
}
.msg .bubble {
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--accent-soft, #F0E5FC);
  line-height: 1.45;
}
.msg.user .bubble {
  background: var(--accent, #A85CFF);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg.assistant .bubble,
.msg .bubble {
  border-bottom-left-radius: 6px;
}
.msg.user .bubble { border-bottom-left-radius: 16px; }
.msg .time {
  font-size: 0.7rem;
  color: var(--faint, #8d8d95);
  margin: 2px 6px;
}
.chat-products {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.product-card.mini {
  padding: 10px 14px;
  min-width: 180px;
}
.product-card.mini h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
}
.chat-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.chat-form input[type=text] {
  flex: 1 1 220px;
  padding: 12px 14px;
  border: 1px solid var(--line, #ececef);
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
}
.chat-form input[type=text]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #A85CFF) 35%, white);
  border-color: var(--accent, #A85CFF);
}
.pdn-warning {
  color: var(--faint, #8d8d95);
  font-size: 0.78rem;
  margin-top: 10px;
}

.compare-wrap {
  overflow-x: auto;
  padding: 8px;
  margin-bottom: 28px;
}
.compare-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
}
.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, #ececef);
  text-align: left;
  font-size: 0.9rem;
  vertical-align: top;
}
.compare-table thead th a {
  color: var(--ink, #161616);
  text-decoration: none;
  font-weight: 700;
}
.compare-table thead th a:hover { color: var(--accent-dark, #9343f2); }
.diff-row td,
.diff-row th {
  background: var(--accent-soft, #F0E5FC);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}
.detail-actions form { display: inline; }

@media (max-width: 800px) {
  .quiz-box,
  .chat-window { padding: 16px; }
  .msg { max-width: 92%; }
}

.auth-links {
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-links a,
.auth-links .link-like {
  color: var(--muted, #6d6d75);
  font-size: 0.9rem;
  text-decoration: none;
  font-family: inherit;
}
.auth-links a:hover,
.auth-links .link-like:hover { color: var(--accent-dark, #9343f2); }
.auth-box {
  max-width: 460px;
  margin: 0 auto 28px;
  background: #fff;
  border: 1px solid var(--line, #ececef);
  border-radius: var(--radius, 14px);
  padding: 24px;
  box-shadow: var(--shadow, 0 12px 32px rgba(40, 24, 12, 0.07));
}
.auth-box input {
  padding: 10px 12px;
  border: 1px solid var(--line, #ececef);
  border-radius: 10px;
  width: 100%;
  max-width: 320px;
  font-family: inherit;
}
.privacy-text {
  max-width: 720px;
  color: var(--ink, #161616);
  line-height: 1.55;
}
.privacy-text h2 { margin-top: 1.4em; }
.privacy-text p { color: var(--muted, #6d6d75); }
.error-page {
  max-width: 520px;
  margin: 48px auto;
  text-align: center;
}
.error-page .code {
  font-size: clamp(3rem, 10vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent, #A85CFF);
  line-height: 1;
  margin: 0 0 8px;
}
.error-page .detail-actions { justify-content: center; margin-top: 20px; }
.site-footer a {
  color: var(--accent-dark, #9343f2);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.login { cursor: pointer; }
