/* ============================================================
   components.css — UI-компоненты
   Кнопки, карточки, чипы, tab bar, аватары, инпуты, badges, скелетоны
   ============================================================ */

/* ─── Кнопки ─── */

/* Базовый стиль кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch-target);
  padding: 0 var(--gap-xl);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: var(--text-md);
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  opacity: 0.75;
  transform: scale(0.97);
}

/* Основная кнопка (акцент) */
.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

/* Вторичная кнопка (серый фон) */
.btn-secondary {
  background: var(--tg-secondary-bg);
  color: var(--tg-text);
}

/* Опасная кнопка (отмена записи) */
.btn-danger {
  background: transparent;
  color: var(--status-danger);
  border: 1.5px solid var(--status-danger);
}

/* Кнопка-ссылка (без фона) */
.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0 var(--gap-sm);
  min-height: var(--touch-target);
}

/* Полная ширина */
.btn-full { width: 100%; }

/* ─── Tab bar — нижняя навигация ─── */
.tab-bar {
  display: flex;
  height: var(--tab-bar-h);
  background: var(--tg-bg);
  border-top: 1px solid rgba(0,0,0,0.08);
  /* Отступ для iOS safe area (чёлка) */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  flex-shrink: 0;
  z-index: 100;
}

[data-theme="dark"] .tab-bar {
  border-top-color: rgba(255,255,255,0.1);
}

/* Скрыть tab bar во время booking flow */
.tab-bar.hidden {
  display: none;
}

/* Кнопка вкладки */
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  color: var(--tg-hint);
  transition: color 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  font-family: var(--font);
}

/* ── Активная вкладка ── */
.tab-item.active {
  color: var(--accent);
}

/* Индикатор активной вкладки — полоска сверху */
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Иконка вкладки */
.tab-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.15s;
}

.tab-item.active .tab-icon {
  transform: scale(1.1);
}

/* Подпись вкладки */
.tab-label {
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
}

/* ─── Карточка услуги ─── */
.service-card {
  background: var(--tg-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.service-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* Картинка/градиент карточки (16:9) */
.service-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}

.service-card-image-inner {
  width: 100%;
  height: 100%;
}

/* Бейдж "Популярное" на картинке */
.service-card-badge {
  position: absolute;
  top: var(--gap-sm);
  left: var(--gap-sm);
  background: var(--accent);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* Тело карточки */
.service-card-body {
  padding: var(--gap-md);
}

.service-card-name {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 4px;
}

.service-card-desc {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  margin-bottom: var(--gap-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-card-price {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--tg-text);
}

.service-card-duration {
  font-size: var(--text-sm);
  color: var(--tg-hint);
}

.service-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--tg-hint);
}

/* Кнопка "Записаться" внутри карточки */
.service-card-cta {
  margin-top: var(--gap-md);
  padding-top: var(--gap-md);
  border-top: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .service-card-cta {
  border-top-color: rgba(255,255,255,0.08);
}

/* ─── Чипы (фильтры категорий) ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 var(--gap-md);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--tg-secondary-bg);
  color: var(--tg-hint);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  user-select: none;
  flex-shrink: 0;
}

.chip:active {
  opacity: 0.75;
}

.chip.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ─── Аватар ─── */
.avatar {
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-letter {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

/* ─── Карточка профиля мастера (на главной) ─── */
.master-header {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-lg);
  background: var(--tg-bg);
}

.master-header-info { flex: 1; }

.master-header-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 2px;
}

.master-header-title {
  font-size: var(--text-sm);
  color: var(--tg-hint);
}

.master-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: var(--text-sm);
}

/* ─── Stories (портфолио плитки на главной) ─── */
.story-item {
  flex-shrink: 0;
  width: 80px;
  cursor: pointer;
}

.story-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 5px;
  transition: transform 0.15s;
}

.story-item:active .story-thumb {
  transform: scale(0.95);
}

.story-label {
  font-size: var(--text-xs);
  color: var(--tg-hint);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Портфолио сетка ─── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.portfolio-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.portfolio-item:active { opacity: 0.8; }

.portfolio-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 500;
}

/* ─── Слоты времени ─── */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
}

.slot-btn {
  height: var(--touch-target);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: var(--tg-bg);
  color: var(--tg-text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}

[data-theme="dark"] .slot-btn {
  border-color: rgba(255,255,255,0.15);
}

.slot-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.slot-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}

.slot-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ─── Дата-пикер (горизонтальный скролл) ─── */
.date-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 64px;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--tg-secondary-bg);
  transition: all 0.15s;
  user-select: none;
}

.date-item:active:not(.disabled) {
  transform: scale(0.95);
}

.date-item.selected {
  background: var(--accent);
  color: #fff;
}

.date-item.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.date-day-name {
  font-size: var(--text-xs);
  font-weight: 500;
  opacity: 0.75;
  margin-bottom: 2px;
}

.date-day-num {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1;
}

.date-month {
  font-size: var(--text-xs);
  opacity: 0.65;
  margin-top: 2px;
}

/* ─── Карточка записи ─── */
.booking-card {
  background: var(--tg-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--gap-lg);
  transition: transform 0.15s;
  cursor: pointer;
}

.booking-card:active { transform: scale(0.98); }

.booking-card-date {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 4px;
}

.booking-card-service {
  font-size: var(--text-md);
  color: var(--tg-hint);
  margin-bottom: var(--gap-sm);
}

.booking-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Badges статусов записей ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 600;
}

.badge-confirm {
  background: rgba(49, 181, 69, 0.12);
  color: var(--status-confirm);
}

.badge-pending {
  background: rgba(245, 166, 35, 0.12);
  color: var(--status-pending);
}

.badge-cancel {
  background: rgba(158, 158, 158, 0.12);
  color: var(--status-cancel);
}

/* ─── Карточка итога записи (экран подтверждения) ─── */
.summary-card {
  background: var(--tg-secondary-bg);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: var(--gap-sm) 0;
}

.summary-row + .summary-row {
  border-top: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .summary-row + .summary-row {
  border-top-color: rgba(255,255,255,0.08);
}

.summary-label {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  flex-shrink: 0;
}

.summary-value {
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: right;
}

.summary-price {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--tg-text);
}

/* ─── Инпуты ─── */
.input-field {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--gap-sm) var(--gap-md);
  background: var(--tg-secondary-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: var(--text-md);
  color: var(--tg-text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.input-field:focus {
  border-color: var(--accent);
}

.input-field::placeholder {
  color: var(--tg-hint);
}

.input-label {
  display: block;
  font-size: var(--text-sm);
  color: var(--tg-hint);
  margin-bottom: 6px;
  font-weight: 500;
}

.input-group {
  margin-bottom: var(--gap-sm);
}

/* ─── Таб-переключатель (Предстоящие / Прошедшие) ─── */
.tab-switch {
  display: flex;
  background: var(--tg-secondary-bg);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.tab-switch-item {
  flex: 1;
  height: 34px;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--tg-hint);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-switch-item.active {
  background: var(--tg-bg);
  color: var(--tg-text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ─── Скелетоны (placeholder пока грузится) ─── */
.skeleton {
  background: var(--tg-secondary-bg);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-text:last-child { width: 60%; margin-bottom: 0; }

.skeleton-card {
  border-radius: var(--radius-lg);
  height: 200px;
  margin-bottom: var(--gap-md);
}

/* ─── Empty State ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--gap-2xl) var(--gap-xl);
  gap: var(--gap-md);
  min-height: 240px;
}

.empty-state-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: var(--gap-sm);
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 600;
}

.empty-state-desc {
  font-size: var(--text-md);
  color: var(--tg-hint);
  max-width: 260px;
  line-height: 1.5;
}

/* ─── Баннер акции ─── */
.promo-banner {
  margin: 0 var(--gap-lg);
  padding: var(--gap-lg);
  background: linear-gradient(135deg, var(--accent) 0%, #1e90d4 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  cursor: pointer;
  transition: opacity 0.15s;
}

.promo-banner:active { opacity: 0.9; }

.promo-banner-text { flex: 1; }

.promo-banner-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: 2px;
}

.promo-banner-sub {
  font-size: var(--text-sm);
  opacity: 0.85;
}

.promo-banner-arrow {
  font-size: var(--text-xl);
  opacity: 0.8;
}

/* ─── Отзыв ─── */
.review-item {
  padding: var(--gap-md) 0;
}

.review-item + .review-item {
  border-top: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .review-item + .review-item {
  border-top-color: rgba(255,255,255,0.08);
}

.review-header {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-sm);
}

.review-author {
  font-size: var(--text-sm);
  font-weight: 600;
  flex: 1;
}

.review-date {
  font-size: var(--text-xs);
  color: var(--tg-hint);
}

.review-text {
  font-size: var(--text-sm);
  color: var(--tg-text);
  line-height: 1.5;
}

/* ─── Экран успеха — чекмарк ─── */
.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--status-confirm), #27ae60);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  margin: 0 auto var(--gap-xl);
  box-shadow: 0 8px 32px rgba(49, 181, 69, 0.35);
}

/* ─── Список услуг (сокращённый, на профиле) ─── */
.service-list-item {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md) 0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.service-list-item:active { opacity: 0.7; }

.service-list-item + .service-list-item {
  border-top: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .service-list-item + .service-list-item {
  border-top-color: rgba(255,255,255,0.08);
}

.service-list-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  overflow: hidden;
}

.service-list-info { flex: 1; }

.service-list-name {
  font-size: var(--text-md);
  font-weight: 500;
}

.service-list-price {
  font-size: var(--text-sm);
  color: var(--tg-hint);
}

.service-list-arrow {
  color: var(--tg-hint);
  font-size: var(--text-lg);
}

/* ─── Чекбокс согласия на ПД ─── */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-sm);
  cursor: pointer;
  padding: var(--gap-xs) 0;
}

.consent-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent-text {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  line-height: 1.5;
}

.consent-text a {
  color: var(--accent);
  text-decoration: underline;
}

/* ─── Кнопка "Поделиться контактом" ─── */
.contact-btn {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--gap-sm) var(--gap-md);
  background: var(--tg-secondary-bg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: var(--text-md);
  color: var(--tg-text);
  cursor: pointer;
  transition: opacity 0.15s;
  text-align: left;
}

.contact-btn:active { opacity: 0.75; }

.contact-btn.shared {
  color: var(--status-confirm);
}

.contact-btn-icon { font-size: var(--text-xl); }

/* ─── Статус контакта ─── */
.contact-success {
  margin-top: var(--gap-sm);
  padding: var(--gap-sm) var(--gap-md);
  background: rgba(49, 181, 69, 0.1);
  border: 1px solid rgba(49, 181, 69, 0.25);
  border-radius: var(--radius-md);
}

.contact-success-inner {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.contact-success-icon { font-size: 20px; }

.contact-success-phone {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--tg-text);
}

.contact-success-hint {
  font-size: var(--text-sm);
  color: var(--status-confirm);
  margin-top: 2px;
}

/* ─── Демо-режим ─── */

.demo-badge {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
  background-color: rgba(42, 171, 238, 0.85);
}

.demo-cta {
  margin: 0 var(--gap-lg) var(--gap-xl);
  background: linear-gradient(135deg, rgba(42, 171, 238, 0.1), rgba(162, 155, 254, 0.15));
  border: 1.5px solid rgba(42, 171, 238, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.demo-cta-body {
  display: flex;
  gap: var(--gap-md);
  align-items: flex-start;
}

.demo-cta-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.demo-cta-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  object-position: center;
}

.demo-cta-author-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-text);
  text-align: center;
  line-height: 1.3;
}

.demo-cta-content {
  flex: 1;
}

.demo-cta-hint {
  font-size: var(--text-sm);
  color: var(--tg-hint);
}

.demo-cta-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--tg-text);
  line-height: 1.4;
}

.demo-cta-features {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.demo-cta-feature {
  font-size: var(--text-sm);
  color: var(--tg-hint);
}

/* ─── Кнопка «← Назад» на стековых экранах ─── */
.screen-back-btn {
  flex-shrink: 0;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--tg-secondary-bg);
  border: none;
  cursor: pointer;
  color: var(--tg-text);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gap-md);
  margin-right: var(--gap-sm);
  white-space: nowrap;
  font-family: var(--font);
}

.screen-back-btn:active { opacity: 0.6; transform: scale(0.97); }

/* Для экранов без хедера (галерея и т.п.) — плавающая версия */
.screen-back-btn--overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 11;
  background: var(--tg-bg);
  box-shadow: var(--shadow-md);
  margin-right: 0;
  width: auto;
  border-radius: var(--radius-md);
  height: 36px;
  padding: 0 var(--gap-md);
}

/* ─── HTML-заглушка для TG.MainButton (вне Telegram) ─── */
.html-main-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 52px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

.html-main-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.html-main-btn:active:not(:disabled) { opacity: 0.85; }

.html-main-btn--loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ─── Онбординг: «Как записаться» на главной ─── */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-md);
}

.how-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.how-step-body { flex: 1; }

.how-step-title {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 2px;
}

.how-step-desc {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  line-height: 1.4;
}

/* ─── FAQ-аккордеон «Об оплате» ─── */
.faq-block {
  background: var(--tg-secondary-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--gap-sm);
}

.faq-block-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--tg-hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--gap-xs) var(--gap-md);
  padding-bottom: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .faq-item {
  border-bottom-color: rgba(255,255,255,0.06);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: var(--gap-md);
  text-align: left;
  cursor: pointer;
  color: var(--tg-text);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.3;
  gap: var(--gap-sm);
  min-height: var(--touch-target);
}

.faq-arrow {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--tg-hint);
  transition: transform 0.25s ease;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: var(--gap-sm) var(--gap-md) var(--gap-md);
  font-size: var(--text-sm);
  color: var(--tg-hint);
  line-height: 1.5;
}

/* ─── Онбординг: «Что дальше?» на экране успеха ─── */
.next-steps {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  background: var(--tg-secondary-bg);
  border-radius: var(--radius-lg);
  padding: var(--gap-md) var(--gap-lg);
}

.next-step {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-md);
  padding: var(--gap-sm) 0;
}

.next-step + .next-step {
  border-top: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .next-step + .next-step {
  border-top-color: rgba(255,255,255,0.08);
}

.next-step-icon {
  font-size: 20px;
  width: 28px;
  flex-shrink: 0;
  line-height: 1.4;
}

.next-step-body { flex: 1; }

.next-step-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

.next-step-desc {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  line-height: 1.4;
}

/* ─── Подтвердить запись: подсказка + кнопка ─── */
.confirm-action {
  margin-top: var(--gap-sm);
}

.confirm-hint {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  text-align: center;
  padding: var(--gap-xs) 0;
}

/* ─── Варианты оплаты (экран успеха) ─── */
.payment-option {
  padding: var(--gap-md) 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .payment-option {
  border-bottom-color: rgba(255,255,255,0.08);
}

.payment-option-last {
  border-bottom: none;
}

.payment-option-header {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-md);
  margin-bottom: 4px;
}

.payment-option-icon {
  font-size: 20px;
  width: 28px;
  flex-shrink: 0;
  line-height: 1.4;
}

.payment-option-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--tg-text);
}

.payment-option-hint {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  margin-top: 2px;
}

.payment-option-details {
  font-size: var(--text-sm);
  color: var(--tg-hint);
  padding-left: calc(28px + var(--gap-md));
  line-height: 1.5;
}
