/* Страница регистрации: шаги, опции формата, карточки игроков */

.register {
  padding-bottom: 40px;
}

.register-head {
  padding: 26px 0 16px;
}

.register-head h1 {
  margin-bottom: 6px;
}

/* ---------- Шаги ---------- */

.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  overflow-x: auto;
}

.steps .step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.steps .step.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #cdd8ff;
}

.steps .step.is-done {
  border-color: rgba(61, 220, 151, 0.35);
  color: #8ff0c4;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 12px;
}

.steps .step.is-current .step-dot {
  background: var(--accent);
  color: #0a0d14;
}

.step-panel > * + * {
  margin-top: 14px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 18px;
  padding-bottom: 8px;
}

.step-actions .btn {
  flex: 1 1 150px;
}

/* ---------- Регламент ---------- */

.regulation-body {
  max-height: 58vh;
  overflow-y: auto;
  padding: 4px 14px 4px 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  font-size: 15px;
}

.regulation-body h1,
.regulation-body h2 {
  font-size: 20px;
  margin-top: 22px;
}

.regulation-body h3 {
  font-size: 17px;
  margin-top: 18px;
}

.regulation-body ul,
.regulation-body ol {
  padding-left: 22px;
  color: var(--text);
}

.regulation-body li {
  margin-bottom: 6px;
}

.regulation-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0;
}

/* Горизонтальная прокрутка таблиц на узких экранах (обёртка добавляется в скрипте) */
.regulation-body .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.regulation-body th,
.regulation-body td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.regulation-body thead th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.regulation-body tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.regulation-body code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
}

.regulation-body pre {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0c111b;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.regulation-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.regulation-body blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: var(--muted);
}

.regulation-body a {
  word-break: break-word;
}

/* Кнопка скачивания регламента в PDF (между текстом регламента и чекбоксом) */
.regulation-download {
  border-color: rgba(108, 140, 255, 0.4);
  background: var(--accent-soft);
  color: #cdd8ff;
}

.regulation-download:hover {
  border-color: var(--accent);
  background: rgba(108, 140, 255, 0.22);
  text-decoration: none;
}

/* ---------- Опции формата ---------- */

.option-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.option-card:hover {
  border-color: var(--border-strong);
}

.option-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.option-emoji {
  font-size: 24px;
}

.option-title {
  font-size: 17px;
  font-weight: 700;
}

.option-text {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Карточка игрока ---------- */

.player-card {
  margin-top: 14px;
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.player-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.player-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
}

.game-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 12px;
  margin-top: 10px;
}

.player-subtitle {
  margin: 16px 0 0;
}

.game-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 10px;
}

.segmented {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.segmented button {
  flex: 1 1 120px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.segmented button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #cdd8ff;
}

.contact-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.contact-row input {
  flex: 1 1 auto;
}

.roles-block {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-toggle {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.role-toggle.is-active {
  border-color: var(--accent-2);
  background: rgba(34, 211, 167, 0.14);
  color: #96f0d6;
}

.check-ok {
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}

.mlbb-row {
  display: grid;
  gap: 10px;
}

/* ---------- Итог ---------- */

.chat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-who {
  font-weight: 700;
}

.chat-links {
  display: grid;
  gap: 10px;
}

.chat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-link .chat-title {
  font-weight: 600;
}

.chat-link .chat-note {
  color: var(--dim);
  font-size: 12.5px;
}

.chat-link.is-pending {
  border-style: dashed;
  background: transparent;
  opacity: 0.85;
}

.chat-link:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  background: #202b40;
}

.next-list {
  padding-left: 20px;
  margin: 6px 0 0;
}

.success-line {
  color: var(--text);
  font-size: 17px;
}

.next-list li {
  margin-bottom: 6px;
}

@media (min-width: 720px) {
  .register {
    padding-bottom: 64px;
  }

  .register-head {
    padding: 40px 0 22px;
  }

  .mlbb-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-card {
    padding: 20px;
  }
}
