/* Рабочая тетрадь / анкета перед разбором — стили, зависят от переменных css/style.css */

.wb-header {
  border-bottom: 1px solid var(--border);
  background: rgba(246, 247, 251, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.wb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.wb-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 8px;
}

.wb-hero h1 {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}

.wb-hero p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 560px;
  margin: 0;
}

.wb-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* ---------- Видео-инструкция над анкетой ---------- */

.wb-intro {
  margin: 0 0 24px;
}

.wb-intro__note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--blue-light);
  border: 1px solid rgba(46, 91, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
}

.wb-intro__icon {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wb-intro__video {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0d1020;
  box-shadow: var(--shadow);
  line-height: 0;
}

.wb-intro__video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

/* ---------- Progress ---------- */

.wb-progress {
  margin: 8px 0 24px;
}

.wb-progress__label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--gray);
  margin-bottom: 8px;
}

.wb-progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.wb-progress__bar {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.25s ease;
  width: 20%;
}

/* ---------- Form card / steps ---------- */

.wb-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.wb-step {
  display: none;
}

.wb-step.is-active {
  display: block;
  animation: wb-fade-in 0.2s ease;
}

@keyframes wb-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wb-step__title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.wb-field {
  margin-bottom: 20px;
}

.wb-field:last-child {
  margin-bottom: 0;
}

.wb-field label,
.wb-field__legend {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.wb-field .wb-hint {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--gray);
  margin-top: 4px;
}

.wb-input,
.wb-textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wb-input:focus,
.wb-textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--card);
}

.wb-textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}

.wb-input.is-invalid,
.wb-textarea.is-invalid {
  border-color: #b3261e;
  background: #fff6f5;
}

.wb-pills.is-invalid .wb-pill span {
  border-color: #b3261e;
}

.wb-step-error {
  display: none;
  color: #b3261e;
  font-size: 14px;
  font-weight: 600;
  margin-top: 18px;
}

.wb-step-error.is-visible {
  display: block;
}

/* Radio pills */

.wb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Вертикальный список для длинных вариантов ответа */
.wb-pills--stacked {
  flex-direction: column;
  align-items: stretch;
}

.wb-pills--stacked .wb-pill span {
  justify-content: flex-start;
  border-radius: var(--radius-md);
}

.wb-pill {
  position: relative;
}

.wb-pill input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.wb-pill span {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wb-pill input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.wb-pill input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Rating 1-10 */

.wb-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .wb-rating {
    grid-template-columns: repeat(10, 1fr);
  }
}

.wb-rating button {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wb-rating button.is-selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* ---------- Step nav ---------- */

.wb-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.wb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.wb-btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(46, 91, 255, 0.55);
}

.wb-btn--primary:hover {
  background: var(--blue-dark);
}

.wb-btn--ghost {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--border);
}

.wb-btn--ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.wb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.wb-btn--full {
  width: 100%;
}

/* ---------- Error banner ---------- */

.wb-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: #fff3f2;
  border: 1px solid #ffcfc9;
  color: #b3261e;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 18px;
}

.wb-error.is-visible {
  display: flex;
}

/* ---------- Success screen ---------- */

.wb-success {
  display: none;
  text-align: center;
  padding: 20px 8px;
}

.wb-success.is-active {
  display: block;
  animation: wb-fade-in 0.25s ease;
}

.wb-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.wb-success__icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wb-success h2 {
  font-size: 22px;
  margin: 0 0 10px;
}

.wb-success p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto 22px;
}

.wb-form-wrap.is-hidden {
  display: none;
}

.wb-footer-note {
  text-align: center;
  color: var(--gray);
  font-size: 12.5px;
  margin-top: 18px;
}
