/* Календарь беременности — дизайн по эталону math-калькуляторов
   (.calculator-wrapper + inputs-style.css + custom-select), как у kalkulyator-daty-rodov.
   Монохромная палитра эталона: чёрный акцент, серые рамки. */

/* .calculator-wrapper .calculator (inputs-style.css) делает секцию прозрачной (padding:0; margin:0).
   Отступ между калькулятором и панелью недель задаём с id-специфичностью (бьёт inputs-style). */
#cal-wrap .calculator + .calculator { margin-top: 28px; }
.calculator__h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: #000; }

/* Поля наследуют эталонный стиль inputs-style.css (.calculator-wrapper input: 12px, h64, flex,
   значение слева). Для date-инпута снимаем flex-центрирование, иначе дата уезжает в центр. */
#cal-wrap .calculator__input[type="date"] { display: block; text-align: left; }
#cal-wrap .form-group { margin-bottom: 8px; }
/* Перед кнопками выходило 16px: нижний margin последнего поля (8px, не схлопывается — обёртка
   полей это flex-item) складывался с глобальным .btn-wrapper{margin-top:8px}. Снимаем нижний
   отступ последнего блока обёртки — зазор задаёт только margin-top кнопок (ровно 8px, как выше). */
#cal-wrap #f-lmp > *:last-child, #cal-wrap #f-conception > *:last-child { margin-bottom: 0; }

.calc-error { display: none; margin: 4px 0 0; padding: 10px 14px; border-radius: 12px;
  background: #fdeced; color: #b3261e; font-size: 13px; line-height: 1.4; }

.calculator__buttons-container { display: flex; justify-content: center; gap: 8px; }
.calculator__buttons { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  max-width: 300px; height: 48px; padding: 0 24px; font-family: 'Unbounded', sans-serif; font-size: 12px;
  font-weight: 400; line-height: 1.15; border-radius: 16px; border: 1px solid #DDD; cursor: pointer;
  background-color: #000; color: #fff; text-align: center; box-sizing: border-box; transition: background-color .3s ease; margin: 0; }
.calculator__buttons:hover { background-color: #333; }
.button--gray { background-color: #fff; color: #000; }
.button--gray:hover { background-color: #f1f1f1; }

/* Результат */
.calculator-wrapper #res-main { font-family: 'Unbounded', serif; font-size: 16px; line-height: 1.3; color: #000; }
.calculator-wrapper #res-main b { font-weight: 700; }
.calculator-wrapper #res-extra { font-family: 'Unbounded', serif; font-size: 12px; line-height: 1.9; color: rgba(0,0,0,.7); margin-top: 8px; }
.calculator-wrapper #res-extra .res-line { display: block; }
.calculator-wrapper #res-extra b { color: #000; }

/* Важные даты / триместры внутри результата */
.calculator-wrapper #wc-dates { font-family: 'Unbounded', serif; font-size: 12px; line-height: 1.7; color: rgba(0,0,0,.7); width: 100%; }
.calculator-wrapper #wc-dates .res-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.calculator-wrapper #wc-dates .res-line b { color: #000; font-weight: 700; text-align: right; }
.cal-note { font-size: 11px; color: #777; margin: 8px 0 0; line-height: 1.5; }

/* Панель недель */
.cal-week-nav { display: flex; align-items: stretch; gap: 8px; margin-bottom: 12px; }
.cal-week-nav .custom-select { flex: 1 1 auto; margin-bottom: 0; }
.cal-week-arrow { flex: 0 0 56px; height: 64px; border: 1px solid #ddd; border-radius: 16px; background: #fff;
  font-size: 22px; line-height: 1; color: #000; cursor: pointer; transition: background-color .2s; }
.cal-week-arrow:hover { background: #f1f1f1; }
.cal-week-arrow:disabled { opacity: .35; cursor: default; }

.cal-week-card { border: 1px solid #ddd; border-radius: 16px; padding: 16px; }
.cal-week-title { font-family: 'Unbounded', serif; font-size: 16px; font-weight: 700; line-height: 1.25; color: #000; margin-bottom: 10px; }
.cal-now { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 10px; border-radius: 20px;
  background: #000; color: #fff; font-size: 11px; font-weight: 600; }
.cal-week-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cal-pill { font-family: 'Unbounded', serif; font-size: 12px; background: #f3f4f6; color: rgba(0,0,0,.7); border-radius: 20px; padding: 5px 12px; }
.cal-pill b { color: #000; font-weight: 700; }
.cal-week-text { font-family: 'Unbounded', serif; font-size: 12px; line-height: 1.7; color: rgba(0,0,0,.7); margin: 8px 0 0; }
.cal-week-text b { color: #000; }

/* Чип копирования */
.calculator-wrapper .rz-chip { font-family: 'Unbounded', serif; font-size: 12px; color: #000; background: #fff;
  border: 1px solid #DDD; border-radius: 16px; height: 34px; padding: 0 14px; cursor: pointer; width: auto; }
.calculator-wrapper .rz-chip:hover { background: #f3f4f6; }

/* Таблицы в контенте/результате */
.table-scroll { overflow-x: auto; width: 100%; }
.pct-table, #res-table { border-collapse: collapse; width: 100%; font-family: 'Unbounded', serif; font-size: 13px; color: #000; }
.pct-table th, .pct-table td, #res-table th, #res-table td { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: left; vertical-align: top; }
.pct-table thead th, #res-table th { background: #f5f5f5; font-weight: 700; }
.wc-weeks-table td:first-child { font-weight: 700; white-space: nowrap; }
.wc-weeks-table td:nth-child(2), .wc-weeks-table td:nth-child(3) { white-space: nowrap; }

@media (max-width: 560px) {
  .calculator { padding: 15px; }
  .cal-week-title { font-size: 16px; }
  .pct-table, #res-table { font-size: 12px; }
  .pct-table th, .pct-table td, #res-table th, #res-table td { padding: 6px 7px; }
}
