/* Виджет «Запись к специалисту» (include/block/online-order.php), вид по макету Figma «Услуга» и «Врач» */
.hg-book {
  width: 100%;
  padding: 60px 0 70px;
  margin: 40px 0;
  background: #f2f6fb;
  box-shadow: 0 0 0 100vmax #f2f6fb;
  clip-path: inset(0 -100vmax);
  font-family: Jost, sans-serif;
  box-sizing: border-box;
}
.hg-book *, .hg-book *::before, .hg-book *::after { box-sizing: border-box; }
.hg-book--plain { padding: 0; margin: 20px 0 50px; background: none; box-shadow: none; clip-path: none; }

.hg-book__title { margin: 0 0 34px; font-size: 44px; line-height: 1.15; font-weight: 400; color: #0c54a0; }

.hg-book__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 24px; }
.hg-book--plain .hg-book__grid { gap: 12px; }
.hg-book--no-doctors .hg-book__card--doctors { display: none; }
.hg-book--no-doctors .hg-book__card--data { grid-column: 1 / -1; }

.hg-book__card {
  min-width: 0;
  padding: 26px 34px 34px;
  border: 1px solid #d5e0ec;
  border-radius: 16px;
  background: #fff url(../images/logo_bg.svg) no-repeat right 14px top 22px / 190px auto;
}
.hg-book__card--data { background-color: #f2f6fb; }
.hg-book--plain .hg-book__card--data { background-color: #fff; background-image: none; }
.hg-book__card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 24px; font-size: 24px; line-height: 1.2; color: #0c54a0; }
.hg-book__month { font-size: 16px; color: #727f8e; white-space: nowrap; }

/* специалисты: список с радио-точкой */
.hg-book__doctors { max-height: 236px; overflow-y: auto; margin-right: -14px; padding-right: 14px; }
.hg-book__doctor { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #d5e0ec; background: none; text-align: left; cursor: pointer; font: inherit; }
.hg-book__doctor:last-child { border-bottom: 0; }
.hg-book__doctor::before { content: ""; flex: 0 0 22px; width: 22px; height: 22px; margin-top: 4px; border: 1px solid #0c54a0; border-radius: 50%; background: #fff; }
.hg-book__doctor.is-active::before { background: radial-gradient(circle, #0c54a0 0 6px, #fff 7px); }
.hg-book__doctor-name { display: block; font-size: 22px; line-height: 1.25; color: #3a4e66; }
.hg-book__doctor-spec { display: block; margin-top: 2px; font-size: 14px; color: #727f8e; }

/* ленты дней и времени */
.hg-book__strip { display: flex; align-items: center; gap: 14px; }
.hg-book__track { display: flex; flex: 1 1 auto; gap: 12px; min-width: 0; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.hg-book__track::-webkit-scrollbar { display: none; }
.hg-book__chip { flex: 0 0 auto; min-width: 90px; height: 64px; padding: 0 14px; border: 1px solid #d5e0ec; border-radius: 12px; background: #fff; color: #3a4e66; font: inherit; font-size: 18px; line-height: 1.1; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.hg-book__chip b { display: block; font-weight: 400; font-size: 22px; }
.hg-book__chip small { display: block; margin-top: 3px; font-size: 16px; }
.hg-book__chip:hover { border-color: #0c54a0; }
.hg-book__chip.is-active { background: #0c54a0; border-color: #0c54a0; color: #fff; }
.hg-book__chip:disabled { background: #f2f6fb; color: #b6c5d7; cursor: default; border-color: #d5e0ec; }
.hg-book__arrow { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #0c54a0; border-radius: 50%; background: #fff; cursor: pointer; position: relative; }
.hg-book__arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border-top: 2px solid #0c54a0; border-right: 2px solid #0c54a0; transform: translate(-70%, -50%) rotate(45deg); }
.hg-book__arrow[hidden] { display: none; }
.hg-book__empty { font-size: 16px; line-height: 1.4; color: #727f8e; }
.hg-book__empty a { color: #0c54a0; white-space: nowrap; }

/* данные пациента */
.hg-book__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.hg-book--no-doctors .hg-book__fields { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hg-book--no-doctors .hg-book__phone { order: -1; }
.hg-book .hg-book__input { width: 100%; height: 62px; margin: 0; padding: 0 22px; border: 1px solid #d5e0ec; border-radius: 14px; background: #fff; box-shadow: none; font: inherit; font-size: 16px; color: #2c3846; outline: none; }
.hg-book--no-doctors .hg-book__input { border-radius: 31px; }
.hg-book .hg-book__input::placeholder { color: #b6c5d7; font-style: normal; }
.hg-book .hg-book__input:focus { border-color: #0c54a0; box-shadow: none; }
.hg-book__submit { height: 62px; border: 0; border-radius: 31px; background: linear-gradient(90deg, #0270c2, #0246aa); color: #fff; font: inherit; font-size: 18px; font-weight: 500; cursor: pointer; box-shadow: 0 10px 24px rgba(2, 70, 170, .25); transition: opacity .15s; }
.hg-book__submit:disabled { background: #7b8ea6; box-shadow: none; cursor: default; }
.hg-book__agree { margin-top: 16px; font-size: 14px; line-height: 1.4; color: #727f8e; }
.hg-book__agree a { color: #0c54a0; }
.hg-book__note { margin-top: 20px; padding: 18px 24px; border-radius: 14px; background: #e1eeff; font-size: 18px; color: #0c54a0; }
.hg-book__note.is-error { background: #fdecec; color: #a12a2a; }

@media (max-width: 1100px) {
  .hg-book__title { font-size: 34px; }
  .hg-book__grid { grid-template-columns: 1fr; gap: 16px; }
  .hg-book--no-doctors .hg-book__fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hg-book { padding: 36px 0 44px; }
  .hg-book__title { font-size: 28px; margin-bottom: 20px; }
  .hg-book__card { padding: 20px 16px 22px; background-size: 130px auto; }
  .hg-book__card-title { font-size: 20px; margin-bottom: 16px; }
  .hg-book__doctor-name { font-size: 18px; }
  .hg-book__chip { min-width: 70px; height: 56px; }
  .hg-book__arrow { flex-basis: 38px; width: 38px; height: 38px; }
  .hg-book__fields, .hg-book--no-doctors .hg-book__fields { grid-template-columns: 1fr; }
}

/* десктоп по макету: крупный заголовок, полоса дат и времени ниже, стрелка с хвостиком */
.hg-book__arrow::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; background: #0c54a0; transform: translate(-50%, -50%); }
.hg-book__arrow::before { transform: translate(-25%, -50%) rotate(45deg); }
@media (min-width: 1200px) {
  .hg-book:not(.hg-book--plain) .hg-book__title { font-size: 48px !important; }
  .hg-book:not(.hg-book--plain) .hg-book__strip { margin-top: 44px; }
}
