/* Окно записи. Цвета и шрифт берутся из переменных темы, ниже — запасные значения. */
.dlg-lock { overflow: hidden; }

.dlg-booking {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dlg-booking[hidden] { display: none; }

.dlg-booking__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 38, .55);
}

.dlg-booking__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--c-bg, #fff);
  color: var(--c-text, #1d2733);
  border-radius: var(--radius-lg, 20px) var(--radius-lg, 20px) 0 0;
  padding: 16px 16px 24px;
  font: inherit;
  outline: none;
  animation: dlg-up .2s ease-out;
}
@media (min-width: 640px) {
  .dlg-booking { align-items: center; }
  .dlg-booking__dialog { border-radius: var(--radius-lg, 20px); padding: 24px 28px 28px; }
}
@keyframes dlg-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dlg-booking__dialog { animation: none; } }

.dlg-booking__head { display: flex; align-items: center; gap: 8px; }
.dlg-booking__title { flex: 1; margin: 0; font-size: 1.35em; line-height: 1.2; }
.dlg-booking__close,
.dlg-booking__back {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--c-bg-soft, #f2f4f6);
  color: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dlg-booking__progress {
  display: flex;
  gap: 4px;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
  font-size: .8em;
  color: var(--c-muted, #6b7785);
}
.dlg-booking__progress li { flex: 1; padding-top: 8px; border-top: 4px solid var(--c-line, #e3e7eb); }
.dlg-booking__progress .is-done { border-color: var(--c-primary, #1f7a6d); }
.dlg-booking__progress .is-current { border-color: var(--c-primary, #1f7a6d); color: var(--c-text, #1d2733); font-weight: 600; }
@media (max-width: 420px) { .dlg-booking__progress li:not(.is-current) { font-size: 0; } }

.dlg-booking__lead { margin: 0 0 12px; font-size: 1.1em; font-weight: 600; }
.dlg-booking__list { display: grid; gap: 8px; }

.dlg-booking__option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--c-line, #e3e7eb);
  border-radius: var(--radius, 12px);
  background: var(--c-bg, #fff);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dlg-booking__option:hover,
.dlg-booking__option:focus-visible { border-color: var(--c-primary, #1f7a6d); outline: none; }
.dlg-booking__doctor img,
.dlg-booking__avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.dlg-booking__avatar {
  display: grid;
  place-items: center;
  background: var(--c-primary-soft, #e3f1ee);
  color: var(--c-primary, #1f7a6d);
  font-weight: 700;
  font-size: 1.3em;
}
.dlg-booking__doctor small,
.dlg-booking__who small { display: block; color: var(--c-muted, #6b7785); font-size: .9em; }

.dlg-booking__who { margin-bottom: 14px; font-weight: 600; }

.dlg-booking__days {
  display: flex;
  gap: 8px;
  margin: 0 -16px 14px;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.dlg-booking__day {
  flex: none;
  min-width: 68px;
  padding: 8px 10px;
  border: 2px solid var(--c-line, #e3e7eb);
  border-radius: var(--radius, 12px);
  background: var(--c-bg, #fff);
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.dlg-booking__day small { display: block; font-weight: 400; color: var(--c-muted, #6b7785); }
.dlg-booking__day.is-active { border-color: var(--c-primary, #1f7a6d); background: var(--c-primary-soft, #e3f1ee); }
.dlg-booking__day:disabled { opacity: .4; cursor: default; }

.dlg-booking__slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.dlg-booking__slot {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius, 12px);
  background: var(--c-bg-soft, #f2f4f6);
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.dlg-booking__slot:hover,
.dlg-booking__slot:focus-visible { background: var(--c-primary, #1f7a6d); color: #fff; outline: none; }

.dlg-booking__summary {
  position: relative;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius, 12px);
  background: var(--c-bg-soft, #f2f4f6);
  line-height: 1.5;
}
.dlg-booking__summary b { display: block; }
.dlg-booking__when { display: block; margin-top: 4px; font-weight: 600; color: var(--c-primary, #1f7a6d); }
.dlg-booking__change,
.dlg-booking__more {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-primary, #1f7a6d);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.dlg-booking__form { display: grid; gap: 14px; }
.dlg-booking__form label { display: grid; gap: 6px; font-weight: 600; }
.dlg-booking__form small { font-weight: 400; color: var(--c-muted, #6b7785); }
.dlg-booking__form input:not([type=checkbox]),
.dlg-booking__form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--c-line, #e3e7eb);
  border-radius: var(--radius, 12px);
  background: var(--c-bg, #fff);
  color: inherit;
  font: inherit;
  font-weight: 400;
}
.dlg-booking__form input:focus,
.dlg-booking__form textarea:focus { border-color: var(--c-primary, #1f7a6d); outline: none; }
.dlg-booking__form .dlg-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .9em; }
.dlg-booking__form .dlg-consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--c-primary, #1f7a6d); }

.dlg-booking__submit {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius, 12px);
  background: var(--c-accent, #c2501b);
  color: #fff;
  font: inherit;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
}
.dlg-booking__submit:disabled { opacity: .6; }

.dlg-booking__error { padding: 10px 14px; border-radius: var(--radius, 12px); background: #fdecea; color: #8a1c12; }
.dlg-booking__loading { padding: 40px 0; text-align: center; color: var(--c-muted, #6b7785); }

.dlg-booking__done { text-align: center; }
.dlg-booking__check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--c-primary, #1f7a6d);
  color: #fff;
  font-size: 32px;
}
.dlg-booking__bots { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.dlg-booking__bot {
  padding: 10px 18px;
  border-radius: var(--radius, 12px);
  background: var(--c-bg-soft, #f2f4f6);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

/* Ловушка для ботов: человек это поле не видит. */
.dlg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
