/* ============================================================
   «Кто родился с вами в один день» — форма подбора и панель результата
   ============================================================
   Отдельный файл, а не кусок birthdays.css: форма стоит и на главной, а
   тянуть туда все 500 строк календаря ради одной панели с тремя полями
   незачем — главная и так несёт LCP сайта. Страница дня грузит оба файла.

   Классы держат префикс .bd-, потому что живут вперемешку с календарём
   (.bd-page, .bd-cards) и правила соседствуют в одном дереве.
   ============================================================ */
/* ============================================================
   Лендинг «Кто родился с вами в один день» — /birthdays/match/
   ============================================================
   Форма сознательно без JS: сабмит нативный, вьюха делает 302 на страницу
   дня. Поэтому здесь нет ни одного состояния, которое нельзя отрисовать
   с сервера. */

.bd-match-form {
  background: #f7f8fa;
  border: 1px solid #e6e8ee;
  border-radius: 10px;
  padding: 18px 18px 14px;
  margin: 0 0 18px;
  max-width: 820px;
}

.bd-match-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.bd-match-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bd-match-label {
  font-size: 13px;
  color: #6b7280;
}

.bd-match-optional {
  font-size: 12px;
  color: #9aa1ad;
}

.bd-match-field select,
.bd-match-field input {
  font: inherit;
  font-size: 15px;
  padding: 9px 10px;
  border: 1px solid #cfd4dd;
  border-radius: 7px;
  background: #fff;
  color: #1a1a1a;
  min-width: 96px;
}

.bd-match-field input { width: 110px; }

.bd-match-field select:focus,
.bd-match-field input:focus {
  outline: 2px solid #1a4ba8;
  outline-offset: 1px;
  border-color: #1a4ba8;
}

.bd-match-submit {
  font: inherit;
  font-size: 15px;
  padding: 10px 22px;
  border: 0;
  border-radius: 7px;
  background: #0a2c6b;
  color: #fff;
  cursor: pointer;
}

.bd-match-submit:hover { background: #1a4ba8; }

.bd-match-error {
  margin: 12px 0 0;
  font-size: 14px;
  color: #a12020;
}

.bd-match-hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.bd-match-today {
  font-size: 15px;
  margin: 0 0 26px;
}

.bd-match-today a {
  color: #0a2c6b;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.bd-match-today a:hover { color: #1a4ba8; }

.bd-match-h2 {
  font-size: 18px;
  font-weight: 600;
  color: #0a2c6b;
  margin: 0 0 12px;
}

.bd-match-month-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.bd-match-month-list a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #e6e8ee;
  border-radius: 999px;
  background: #fff;
  color: #0a2c6b;
  font-size: 14px;
  text-decoration: none;
}

.bd-match-month-list a:hover {
  border-color: #1a4ba8;
  color: #1a4ba8;
}

@media (max-width: 600px) {
  .bd-match-fields { gap: 10px; }
  .bd-match-field select,
  .bd-match-field input { min-width: 84px; }
  .bd-match-submit { width: 100%; }
}

/* ============================================================
   Панель персонального результата (?me=1 на странице дня)
   ============================================================
   Видна только пришедшему с формы. Визуально отделена рамкой и подложкой:
   ниже по странице идёт обычный список дня, и посетитель не должен их
   путать — там «все именинники», здесь «ответ лично вам».

   Акцентной полосы слева здесь СОЗНАТЕЛЬНО нет, хотя в проекте такая есть
   у цитат, пояснений в тестах и библиографии. Там она значит «врезка сбоку
   от основного текста»; эта панель — наоборот, главное содержимое страницы
   для пришедшего с формы, и стоит сразу под h1. Плюс рамка с подложкой уже
   отделяют её, а полоса делала бы то же самое второй раз и перетягивала
   взгляд на пустой левый край вместо карточки. */

.bd-match-result {
  border: 1px solid #d7dced;
  border-radius: 10px;
  background: #f7f9fd;
  padding: 18px;
  margin: 0 0 22px;
}

.bd-match-result-badge {
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0a2c6b;
  margin: 0 0 10px;
}

.bd-match-result-lead {
  font-size: 16px;
  line-height: 1.5;
  color: #3a3f4b;
  margin: 0 0 14px;
}

/* Результат — не список: одна-две карточки, растягивать их на всю ширину
   сетки дня незачем. */
.bd-cards--result {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-bottom: 14px;
}

.bd-card-note {
  font-size: 13px;
  color: #0a2c6b;
  margin: 2px 0 0;
}

.bd-match-peers {
  font-size: 14px;
  line-height: 1.55;
  color: #3a3f4b;
  margin: 0 0 14px;
}

.bd-match-peers a {
  color: #0a2c6b;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.bd-match-peers a:hover { color: #1a4ba8; }

.bd-match-peers-all { white-space: nowrap; }

.bd-match-again {
  font-size: 14px;
  margin: 12px 0 0;
}

.bd-match-again a {
  color: #0a2c6b;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.bd-match-again a:hover { color: #1a4ba8; }

@media (max-width: 600px) {
  .bd-match-result { padding: 14px; }
  .bd-cards--result { grid-template-columns: 1fr; }
}

/* Компактный вариант формы — на главной. Пояснение под полями там не
   выводится (см. аргумент compact в _birthday_match_form.html), поэтому
   форма ужимается до одной строки полей. */
.bd-match-form--compact {
  padding: 14px 16px 12px;
  margin: 0;
}

.bd-match-inline { margin-top: 18px; }

.bd-match-inline__lead {
  font-size: 15px;
  line-height: 1.5;
  color: #3a3f4b;
  margin: 0 0 10px;
}

.bd-match-promo {
  font-size: 15px;
  margin: 0 0 16px;
}

.bd-match-promo a {
  color: #0a2c6b;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.bd-match-promo a:hover { color: #1a4ba8; }

/* День — короткое числовое поле (см. комментарий в _birthday_match_form.html:
   на мобильном это числовая клавиатура вместо прокрутки 31 строки). Уже
   года: две цифры против четырёх. */
.bd-match-field input[name="d"] { width: 74px; }
