/* ─── Страница select_date (наш Mustache-шаблон) ───────────── */
.tp-page {
  background: #2b3030;
  color: #ffffff;
  padding: 2.5rem 2rem;
  min-height: 100%;
  font-family: 'Jost', sans-serif;
}

.tp-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

/* ─── Табы месяцев ─────────────────────────────────────────── */
.tp-month-tabs {
  display: flex;
  gap: 2rem;
  margin-bottom: 0;
}

.tp-month-tab {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  user-select: none;
}

.tp-month-tab.active {
  color: #ffffff;
  border-bottom-color: #11dbdb;
}

.tp-tabs-divider {
  display: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 1.5rem;
}

.tp-tabs-divider.visible {
  display: block;
}

/* ─── Сетка дат ────────────────────────────────────────────── */
.tp-dates-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.tp-day-group {
  display: contents;
}

.tp-date-card {
  background: #3a3f3f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 1rem 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tp-date-card:hover {
  border-color: rgba(17, 219, 219, 0.4);
}

.tp-date-card.b-date-choice__event_status_active,
.tp-date-card.js-date-choice.active {
  border-color: #11dbdb;
  box-shadow: 0 0 0 1px #11dbdb;
}

.tp-date-card.b-date-choice__event_status_inactive {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.tp-date-card__day {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.tp-date-card__dow {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: lowercase;
}

.tp-date-card__price {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
}

/* ─── Кнопка-триггер на странице ───────────────────────────── */
.tp-trigger-btn {
  display: inline-flex;
  align-items: center;
  background: #11dbdb;
  color: #000000;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 4px;
  padding: 1rem 2.5rem;
  transition: opacity 0.2s;
}

.tp-trigger-btn:hover {
  opacity: 0.88;
}

/* ─── Нативный шаблон Timepad: main / pay ──────────────────── */
#tpw_cont {
  background: #2b3030;
}

.i-page {
  background: #2b3030;
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  padding: 2.5rem 2rem;
  min-height: 100%;
  box-sizing: border-box;
}

/* Выбранная дата */
.b-date-choice__day {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.b-date-choice__select-date {
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #11dbdb;
  text-decoration: none;
  transition: opacity 0.2s;
}

.b-date-choice__select-date:hover {
  opacity: 0.8;
  color: #11dbdb;
}

/* Секции */
.b-registration__section {
  margin-bottom: 1.5rem;
}

.b-registration__section_indent {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Скрываем заголовки таблицы («Тип билета / Цена / Кол-во») */
.b-registration__header,
.b-reg-table__row_header {
  display: none !important;
}

/* Внешний контейнер — 2 колонки карточек */
.b-reg-table .span12 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Строка со статусом "не выбрали" — на всю ширину */
.b-reg-table__row:not([id^="rei_cont"]) {
  grid-column: 1 / -1;
  background: transparent;
  border: none;
}

/* Карточка билета — вертикальная, grid-areas: название вверху, цена+кнопки внизу */
.b-reg-table__row[id^="rei_cont"] {
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "name name"
    "price count";
  gap: 1rem 0;
  padding: 1.5rem;
  background: #3a3f3f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  float: none !important;
  min-height: 180px;
}

.b-reg-table__row[id^="rei_cont"]::before,
.b-reg-table__row[id^="rei_cont"]::after {
  display: none !important;
}

/* Сбрасываем Bootstrap-колонки внутри карточки */
.b-reg-table__row[id^="rei_cont"] .span6,
.b-reg-table__row[id^="rei_cont"] .span3,
.b-reg-table__row[id^="rei_cont"] .span2 {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.b-reg-table__cell-name {
  grid-area: name;
}

.b-reg-table__cell-price {
  grid-area: price;
  display: flex !important;
  align-items: flex-end;
}

.b-reg-table__cell-count {
  grid-area: count;
  display: flex !important;
  align-items: flex-end;
  justify-content: flex-end;
}

/* Название билета */
.b-reg-table__cell-name > label.b-reg-table__text {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

/* Описание билета и метаданные (вложенные блоки после названия) */
.b-reg-table__cell-name > p,
.b-reg-table__cell-name > div:not(.js-reg-table-pricing):not(.b-reg-table__price-mobile),
.b-reg-table__cell-name > span:not(.b-reg-table__text) {
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Jost', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Прочий текст в таблице */
.b-reg-table__text {
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0;
}

/* Мобильная цена в name-ячейке — скрыта (цена есть в price-ячейке) */
.b-reg-table__price-mobile {
  display: none !important;
}

/* Цена в price-ячейке */
.b-reg-table__cell-price .js-reg-table-price {
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 500;
}

/* Выбранный билет (Timepad добавляет класс при count > 0) */
.b-reg-table__row.b-reg-table__row_selected,
.b-reg-table__row.active {
  border-color: #11dbdb;
  box-shadow: 0 0 0 1px #11dbdb;
}

.selectedTicketsInfo {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0;
}

/* Управление количеством билетов */
.b-reg-table__plusminus {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  float: none !important;
}

.b-reg-table__plusminus_btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid #11dbdb;
  background: transparent;
  color: #11dbdb;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
  user-select: none;
}

/* + всегда заполненный; − всегда только обводка */
.b-reg-table__plusminus_btn.js-plusminus_plus {
  background: #11dbdb;
  color: #000000;
}

/* SVG-иконки ± в кнопках скрыты (width/height=0) — заменяем символами */
.b-reg-table__plusminus_btn svg {
  display: none;
}

.b-reg-table__plusminus_btn.js-plusminus_minus::before {
  content: '−';
}

.b-reg-table__plusminus_btn.js-plusminus_plus::before {
  content: '+';
}

.b-reg-table__plusminus_btn.js-plusminus_minus:hover {
  background: #11dbdb;
  color: #000000;
}

.b-reg-table__plusminus_btn.js-plusminus_plus:hover {
  opacity: 0.85;
}

.b-reg-table__plusminus-value {
  font-size: 1rem;
  font-weight: 500;
  min-width: 1.5rem;
  text-align: center;
  color: #ffffff;
}

/* Поля формы покупателя */
.b-attendee {
  max-width: 400px;
}

.b-registration__question {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.b-registration__question_mandatory {
  color: #11dbdb;
}

.b-reg-row {
  margin-bottom: 0.75rem;
}

.b-input {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.875rem;
  font-family: 'Jost', sans-serif;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.b-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

/* Способы оплаты */
.b-payment__methods {
  margin-bottom: 1.5rem;
}

.b-payment__method {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 380px;
  background: #3a3f3f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.b-payment__method-active {
  border-color: #11dbdb;
  box-shadow: 0 0 0 1px #11dbdb;
}

.b-payment__method-input {
  display: none;
}

.b-payment__method-icon {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}

.b-payment__method-label {
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Чекбоксы соглашений */
.b-registration__check {
  margin-bottom: 0.75rem;
}

.b-registration__accept {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  max-width: 400px;
}

.b-registration__accept input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  accent-color: #11dbdb;
  cursor: pointer;
}

.b-registration__accept a {
  color: #11dbdb;
  text-decoration: none;
}

.b-registration__accept a:hover {
  opacity: 0.8;
}

/* Кнопка регистрации / покупки */
#eventreg_submit,
.b-pro-wiget__reg-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(50% - 0.375rem);
  background: #11dbdb;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Oswald', sans-serif;
  border: none;
  border-radius: 4px;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 1.5rem;
}

#eventreg_submit:not(:disabled):not(.disabled):hover,
.b-pro-wiget__reg-button:not(:disabled):not(.disabled):hover {
  opacity: 0.88;
}

#eventreg_submit:disabled,
#eventreg_submit.disabled,
.b-pro-wiget__reg-button:disabled,
.b-pro-wiget__reg-button.disabled {
  background: rgba(17, 219, 219, 0.3);
  color: rgba(0, 0, 0, 0.4);
  cursor: not-allowed;
}

/* Ошибки валидации */
.b-registration__error:not(.hide) {
  color: #ff6b6b;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

/* Брендинг Timepad */
.twf2-branding {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
}

.twf2-branding a {
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

.twf2-branding svg {
  display: none;
}

/* ─── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .tp-dates-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .tp-dates-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tp-title {
    font-size: 1.75rem;
  }

  .b-reg-table .span12 {
    grid-template-columns: 1fr;
  }

  #eventreg_submit,
  .b-pro-wiget__reg-button {
    width: 100%;
  }
}
