.page-wrap {
  min-width: 360px;
}

/* site-f .page-wrap { overflow: hidden } режет выпадающие списки фильтров */
.page-wrap:has(.schedule) {
  overflow: visible;
}

main {
  background: rgba(245, 247, 248, 1);
}

.schedule {
  --schedule-text: #0f2531;
  --schedule-muted: #767676;
  --schedule-border: #e1e1e1;
  --schedule-accent: #007088;
  --schedule-soft: #acacac;

  --color-white: #ffffff;

  --color-orange: #fd853a;
  --color-orange-light: #ffead5;

  --color-violet: #6875d8;
  --color-violet-light: #e0eaff;

  --color-green: #23b36b;
  --color-green-light: #ecfdf3;

  color: var(--schedule-text);
}

.schedule .wrapper {
  padding-bottom: 100px;
  overflow: visible;
}

.schedule-filters,
.schedule-filters__row {
  overflow: visible;
}

.schedule-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 0 40px;
}

.schedule-filters__subrow {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-y: hidden;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.schedule-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-width: 0;
  margin-right: auto;
}

.relative {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}

.schedule-filter {
  position: relative;
  display: block;
  width: fit-content;
  flex: 0 0 fit-content;
  min-width: 0;
  flex-shrink: 0;
  min-height: 51px;
}

/* class display:block иначе перебивает нативный [hidden] */
.schedule-filter[hidden] {
  display: none !important;
}

.schedule-filter__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.schedule-filter--suggest {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
}

.schedule-suggest {
  position: relative;
  display: inline-block;
  width: auto;
  max-width: 100%;
  vertical-align: top;
}

.schedule-suggest__input {
  box-sizing: border-box;
  display: block;
  width: auto;
  min-width: 0;
  height: 51px;
  min-height: 51px;
  max-height: 51px;
  padding: 15px 20px;
  border: 1px solid rgba(236, 240, 242, 1);
  border-radius: 50px;
  background: var(--color-white);
  color: var(--schedule-accent);
  font-size: 14px;
  line-height: 140%;
  outline: none;
  transition: border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.schedule-suggest.has-value .schedule-suggest__input {
  padding-right: 44px;
}

.schedule-suggest__input[data-filter="disease"] {
  width: 11.5rem;
}

.schedule-suggest__input[data-filter="service"] {
  /* под плейсхолдер «Услуга» + padding 20px; без лишней пустоты справа */
  width: 6rem;
  box-sizing: border-box;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

.schedule-suggest__input::placeholder {
  color: var(--schedule-accent);
  opacity: 1;
}

.schedule-suggest__input:focus {
  border-color: var(--schedule-accent);
}

.schedule-suggest__clear {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.schedule-suggest__clear::before,
.schedule-suggest__clear::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--schedule-soft);
}

.schedule-suggest__clear::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.schedule-suggest__clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.schedule-suggest__list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(350px, calc(100vw - 32px));
  max-width: 350px;
  max-height: 404px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  list-style: none;
  background: var(--color-white);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 15px 21.6px 0 rgba(186, 204, 213, 0.2);
}

.schedule-suggest__item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px;
  border-radius: 8px;
  color: var(--schedule-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
  cursor: pointer;
}

.schedule-suggest__item:hover,
.schedule-suggest__item:focus {
  background: rgba(47, 123, 159, 0.08);
}

.schedule-filter .ts-wrapper {
  display: inline-block;
  width: auto !important;
  max-width: none;
  min-height: 0;
}

.schedule-filter .ts-control {
  position: relative;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  width: auto !important;
  max-width: min(70vw, 320px);
  min-width: 0;
  min-height: 0;
  padding: 15px 20px !important;
  border: 1px solid rgba(236, 240, 242, 1);
  border-radius: 50px;
  background: var(--color-white);
  box-shadow: none;
  color: var(--schedule-accent);
  font-size: 14px;
  line-height: 140%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-filter__select {
  height: 0;
}

.schedule-filter__select.has-selected-value .ts-control {
  background: var(--schedule-accent) !important;
  border-color: var(--schedule-accent) !important;
}

.schedule-filter .ts-wrapper.focus .ts-control,
.schedule-filter .ts-wrapper.dropdown-active .ts-control {
  box-shadow: none;
}

.schedule-filter .plugin-dropdown_input.focus.dropdown-active .ts-control,
.schedule-filter .ts-wrapper .ts-control:hover {
  border-color: var(--schedule-accent);
}

.schedule-filter .ts-control > input {
  position: absolute;
  width: 1px !important;
  min-width: 0;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.schedule-filter .ts-wrapper:not(.has-selected-value) .ts-control::before {
  content: attr(data-button-label);
  color: var(--schedule-accent);
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
}

.schedule-filter .ts-control .item {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--schedule-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-filter .ts-control .item:not(:first-of-type) {
  display: none;
}

.schedule-filter
  .ts-wrapper.has-selected-extra
  .ts-control
  .item:first-of-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.schedule-filter
  .ts-wrapper.has-selected-extra
  .ts-control
  .item:first-of-type::after {
  content: "+ " attr(data-extra-count);
  flex: 0 0 auto;
  color: currentColor;
  font-weight: 400;
}

.ts-wrapper .ts-control > .item,
.ts-wrapper.multi .ts-control > .item {
  margin: 0;
  padding: 0;
  color: var(--color-white);
  background: transparent;
  border: none;
  font-size: 16px;
  pointer-events: none;
}

.schedule-filter .ts-wrapper.has-selected-value .ts-control {
  /* clear-button в потоке — большой padding-right давал пустоту справа */
  padding: 15px 18px 15px 20px !important;
}

.schedule-filter .ts-wrapper.plugin-clear_button .clear-button {
  position: relative;
  display: none;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px 0 0 10px;
  padding: 0;
  align-self: center;
  color: var(--schedule-muted);
  font-size: 0;
  opacity: 1;
  top: auto;
  left: auto;
  transform: none;
}

.schedule-filter .ts-wrapper.plugin-clear_button .clear-button::before,
.schedule-filter .ts-wrapper.plugin-clear_button .clear-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
}

.schedule-filter .ts-wrapper.plugin-clear_button .clear-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.schedule-filter .ts-wrapper.plugin-clear_button .clear-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.schedule-filter
  .ts-wrapper.plugin-clear_button.has-selected-value
  .clear-button {
  display: block;
}

.schedule-filter .ts-wrapper.plugin-clear_button .clear-button:hover {
  color: var(--schedule-text);
}

.schedule-filter .ts-dropdown {
  width: min(350px, calc(100vw - 32px)) !important;
  max-width: 350px;
  max-height: 460px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--color-white);
  box-shadow: 0 15px 21.6px 0 rgba(186, 204, 213, 0.2);
  overflow: hidden;
  z-index: 4;
}

.schedule-filter .ts-dropdown-content {
  max-height: 404px;
  padding: 10px;
}

.schedule-filter .dropdown-input-wrap {
  padding: 12px 12px 8px;
}

.schedule-filter .dropdown-input {
  width: 100%;
  min-height: 40px;
  padding: 10px 15px 10px 40px;
  border: none;
  border-radius: 10px;
  color: var(--schedule-text);
  font-size: 14px;
  font-weight: 400;
  outline: none;
  background-color: #f4f4f4;
  background-image: url("./assets/search.svg");
  background-position: left 15px top 12px;
  background-size: 16px;
  background-repeat: no-repeat;
}

.schedule-filter .dropdown-input:placeholder {
  color: var(--schedule-soft);
}

.schedule-filter .dropdown-input:focus {
  border-color: var(--schedule-accent);
}

.schedule-filter .optgroup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  min-height: 40px;
  color: var(--schedule-soft);
  font-size: 14px;
  line-height: 140%;
  font-weight: 400;
  width: 100%;
  white-space: nowrap;
}

.schedule-filter .optgroup-header::after {
  content: "";
  flex: 1 1 auto;
  min-width: 16px;
  height: 1px;
  background: #e1e1e1;
}

.optgroup-header .highlight {
  background: rgba(125, 168, 208, 0.2);
}

.schedule-filter .option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px;
  border-radius: 8px;
  color: var(--schedule-text);
  font-size: 14px;
  line-height: 140%;
}

.schedule-filter .no-results {
  padding: 12px 10px;
  color: var(--schedule-muted);
  font-size: 15px;
}

.schedule-filter .option.selected {
  background: rgba(47, 123, 159, 0.08);
}

.schedule-filter__option-check {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--schedule-border);
  border-radius: 5px;
  background: var(--color-white);
}

.schedule-filter .option.selected .schedule-filter__option-check {
  border-color: var(--schedule-accent);
  background: var(--schedule-accent);
}

.schedule-filter .option.selected .schedule-filter__option-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: rotate(45deg);
}

.schedule-filter__option-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.schedule-filter--format .schedule-filter__option-check {
  display: none;
}

.schedule-filter--format .ts-dropdown-content {
  max-height: 460px;
}

.schedule-filter--format .option {
  padding-left: 12px;
}

.schedule-filter--service .ts-wrapper:not(.has-selected-value) .ts-control {
  min-width: 6rem;
  justify-content: center;
}

.schedule-filter--service .ts-wrapper:not(.has-selected-value) .ts-control::before {
  text-align: center;
  width: 100%;
}

.schedule-filters__nearest {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  color: var(--schedule-text);
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.schedule-filters__nearest-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.schedule-filters__nearest-box {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 2px solid #c4dce2;
  border-radius: 6px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.schedule-filters__nearest-input:focus-visible
  + .schedule-filters__nearest-box {
  border-color: var(--schedule-accent);
  box-shadow: 0 0 0 3px rgba(47, 123, 159, 0.12);
}

.schedule-filters__nearest-input:checked + .schedule-filters__nearest-box {
  border-color: var(--schedule-accent);
  background: var(--schedule-accent);
}

.schedule-filters__nearest-input:checked
  + .schedule-filters__nearest-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0px;
  width: 7px;
  height: 12px;
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: rotate(45deg);
}

.schedule-filters__nearest-text {
  font-size: 14px;
  line-height: 140%;
  color: var(--schedule-accent);
  min-width: 0;
}

.schedule-filters__reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--schedule-accent);
  font: inherit;
  font-size: 14px;
  line-height: 140%;
  cursor: pointer;
  margin-left: 20px;
}

.schedule-filters__reset-btn[hidden] {
  display: none;
}

.schedule-filters__reset-btn span {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.schedule-filters__reset-btn span::before,
.schedule-filters__reset-btn span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.schedule-filters__reset-btn span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.schedule-filters__reset-btn span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.schedule__list {
  display: grid;
  gap: 30px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.doctor-card {
  display: grid;
  padding: 10px 0;
  box-shadow: 0px 15px 21.6px 0px rgba(186, 204, 213, 0.2);
  border: 2px solid rgba(236, 240, 242, 1);
  border-radius: 20px;
  background: var(--color-white);
}

.doctor-card__header {
  padding: 10px;
  border-bottom: 1px solid #eef2f3;
}

.doctor-card__header .doctor-card__type {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.doctor-card__type-item {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 100%;
  position: relative;
  padding: 5px 10px 5px 19px;
  border-radius: 50px;
  border: 2px solid var(--schedule-border);
  color: var(--schedule-muted);
}

.doctor-card__type-item:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--schedule-border);
}

.type_ftf {
  color: var(--color-orange);
  border-color: var(--color-orange-light);
}

.type_ftf:before {
  background: var(--color-orange);
}

.type_online {
  color: var(--color-violet);
  border-color: var(--color-violet-light);
}

.type_online:before {
  background: var(--color-violet);
}

.type_home {
  color: var(--color-green);
  border-color: var(--color-green-light);
}

.type_home:before {
  background: var(--color-green);
}

.doctor-card__body {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
}

.doctor-card__photo {
  position: relative;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--schedule-soft);
}

.doctor-card__photo img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-card__main-content {
  display: flex;
  flex-direction: column;
}

.doctor-card__name {
  font-weight: 500;
  font-size: 16px;
  line-height: 130%;
  margin-bottom: 10px;
}

.doctor-card__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.doctor-card__row .doctor-card__type {
  display: none;
}

.doctor-card__specializations,
.doctor-card__type {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.doctor-card__type {
  gap: 10px;
}

.doctor-card__footer,
.service-details {
  display: grid;
  gap: 10px;
}

.service-details {
  margin-bottom: 30px;
}

.doctor-card__footer {
  padding: 0 20px 20px;
}

.doctor-card__footer .btn {
  width: 100%;
  max-width: 100%;
  font-size: 16px;
}

.doctor-card__specializations-item {
  font-weight: 500;
  color: var(--schedule-muted);
  font-size: 14px;
  line-height: 130%;
}

.doctor-card__specializations-item:not(:last-child)::after {
  content: "/";
  margin: 0 6px;
  color: var(--schedule-muted);
}

.doctor-card__descr {
  display: none;
  flex-grow: 1;
  position: relative;
  overflow: visible;
  color: var(--schedule-muted);
  font-size: 16px;
  line-height: 140%;
  cursor: default;
  outline: none;
}

.doctor-card__descr-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  color: var(--schedule-muted);
  margin-bottom: 10px;
}

.doctor-card__descr:empty {
  display: none;
}

.doctor-card__descr::after {
  content: attr(data-full-text);
  position: absolute;
  top: 25px;
  left: 0;
  z-index: 10;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(236, 240, 242, 1);
  border-radius: 10px;
  background: var(--color-white);
  box-shadow: 0px 15px 21.6px 0px rgba(186, 204, 213, 0.2);
  color: var(--schedule-text);
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease;
}

.doctor-card__descr:hover::after,
.doctor-card__descr:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.doctor-card__more {
  width: fit-content;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  color: var(--schedule-accent);
  border-bottom: 1px solid rgba(0, 112, 136, 0.2);
}

.service-details__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px;
  align-items: end;
}

.service-details__dots {
  min-width: 10px;
  border-bottom: 2px dotted var(--schedule-border);
  transform: translateY(-4px);
}

.service-details__label,
.service-details__value {
  font-size: 14px;
  color: var(--schedule-text);
  line-height: 130%;
}

.service-details__value strong {
  font-weight: 500;
  line-height: 130%;
  font-size: 20px;
}

.schedule__list-empty {
  width: 100%;
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  grid-column: 1 / -1;
}

.schedule__list-empty[hidden] {
  display: none !important;
}

.schedule.is-loading .schedule__list-empty {
  display: none !important;
}

.schedule__list-empty b {
  font-weight: 500;
  font-size: 18px;
  line-height: 140%;
  text-align: center;
  color: var(--schedule-accent);
  margin-bottom: 10px;
}

.schedule__list-empty p {
  display: inline-block;
  max-width: 230px;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  text-align: center;
  margin-bottom: 30px;
}

.schedule__list-empty .btn {
  width: fit-content;
  padding: 9px 20px;
}

.schedule-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  padding: 40px 0;
  text-align: center;
}

.schedule-loader[hidden] {
  display: none !important;
}

.schedule-loader img {
  width: 50px;
  height: 50px;
  animation: schedule-loader-spin 0.9s linear infinite;
}

.schedule.is-loading .schedule__list {
  min-height: 0;
}

.schedule__results {
  min-height: 320px;
}

.schedule-v2-modal .schedule__results {
  min-height: 320px;
}

.schedule-v2-modal .schedule-filters {
  margin-bottom: 24px;
}

.schedule-v2-modal .schedule-loader,
.schedule-v2-modal .schedule__list {
  min-height: 0;
}

.schedule-v2-modal.is-loading .schedule__results,
.schedule.is-loading .schedule__results {
  display: flex;
  flex-direction: column;
}

.schedule.is-loading .schedule-loader {
  flex: 1 1 auto;
  min-height: 280px;
}

@keyframes schedule-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1199px) {
  .schedule-filter .ts-dropdown {
    position: fixed !important;
    top: var(--schedule-filter-dropdown-top, 96px) !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 40px) !important;
    max-height: min(460px, calc(100dvh - 128px));
    margin-top: 0;
  }

  .schedule-filter .ts-dropdown-content {
    max-height: min(404px, calc(100dvh - 184px));
  }

  .schedule-filters {
    gap: 15px;
    margin: 0 0 24px;
    width: 100%;
  }

  .schedule-filters__row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-right: 0;
  }

  /* Page: full-bleed scroll с fade под фон страницы #f5f7f8 (как в Figma) */
  .relative {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    width: calc(100% + 2.5rem);
    max-width: calc(100% + 2.5rem);
  }

  .relative .schedule-filters__subrow {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 0 1.25rem 10px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
  }

  /* Только правый fade (как в Figma) — слева градиент режет первый чип */
  .relative::before {
    content: none;
    display: none;
  }

  .relative::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 10px;
    z-index: 4;
    width: 56px;
    pointer-events: none;
    background: linear-gradient(
      90deg,
      rgba(245, 247, 248, 0) -16.07%,
      #f5f7f8 89.29%
    );
  }

  .relative .schedule-filters__nearest {
    flex: 0 0 auto;
    margin-left: 0;
    margin-top: 10px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .schedule-filter .ts-control,
  .schedule-suggest__input {
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    padding: 15px 20px !important;
  }

  .schedule-filter .ts-wrapper.has-selected-value .ts-control {
    padding: 15px 18px 15px 20px !important;
  }

  .schedule-suggest.has-value .schedule-suggest__input {
    padding-right: 44px !important;
  }

  .schedule-suggest__input[data-filter="service"] {
    width: 6rem;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .schedule-suggest.has-value .schedule-suggest__input[data-filter="service"] {
    width: auto;
    min-width: 6rem;
    max-width: min(70vw, 220px);
    padding-right: 44px !important;
  }

  .schedule.is-loading .schedule-loader {
    min-height: 160px;
    padding: 32px 0;
  }

  .schedule__results {
    min-height: 160px;
  }

  /* Modal: без bleed — фильтры внутри белой панели (Figma 360 / Frame 51) */
  .schedule-v2-modal {
    width: 100% !important;
    max-width: 100%;
    min-height: min(560px, calc(100dvh - 48px));
    max-height: 100dvh;
    padding: 48px 0 20px !important;
    border-radius: 12px;
  }

  #referenceDateModal .modal-content:has(.schedule-v2-modal) {
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 16px) !important;
    min-height: min(560px, calc(100dvh - 28px));
    padding: 0 !important;
    margin-top: 12px;
  }

  .schedule-v2-modal .schedule .wrapper {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 16px;
  }

  .schedule-v2-modal .schedule-filters {
    margin: 0 0 16px;
  }

  .schedule-v2-modal .schedule-filters__row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .schedule-v2-modal .relative {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .schedule-v2-modal .relative .schedule-filters__subrow {
    flex-wrap: nowrap;
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: auto;
    overflow-y: visible;
  }

  .schedule-v2-modal .relative::before {
    content: none;
    display: none;
  }

  .schedule-v2-modal .relative::after {
    right: 0;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) -16.07%,
      #ffffff 89.29%
    );
  }

  .schedule-v2-modal .schedule-filters__nearest {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-top: 12px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .schedule-v2-modal .schedule__results {
    min-height: 280px;
    padding: 0 20px;
  }

  .schedule-v2-modal .schedule.is-loading .schedule-loader,
  .schedule-v2-modal .is-loading .schedule-loader {
    min-height: 280px;
    padding: 24px 0 40px;
  }

  .schedule-v2-modal__close {
    top: 0;
    right: 4px;
    width: 48px;
    height: 48px;
  }

  .schedule-suggest__list {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
    left: 50%;
    transform: translateX(-50%);
    position: fixed;
    top: var(--schedule-filter-dropdown-top, 96px);
    z-index: 1000;
  }

  .schedule-v2-modal .schedule-filter .ts-dropdown {
    position: fixed !important;
    top: var(--schedule-filter-dropdown-top, 96px) !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 10000;
    width: calc(100% - 40px) !important;
    max-width: 350px;
    max-height: min(460px, calc(100dvh - 128px));
    margin-top: 0;
  }

  .schedule-v2-modal .schedule-filter .ts-dropdown-content {
    max-height: min(404px, calc(100dvh - 184px));
  }

  .schedule-v2-modal .schedule-suggest__list {
    position: fixed;
    top: var(--schedule-filter-dropdown-top, 96px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: calc(100vw - 40px);
    max-width: 350px;
  }
}

@media (min-width: 768px) {
  .schedule__list {
    grid-template-columns: 1fr 1fr;
  }

  .schedule__list-empty p {
    max-width: 100%;
  }

  .schedule-loader img {
    width: 60px;
    height: 60px;
  }
}

@media (min-width: 1200px) {
  .relative {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: auto;
  }

  .relative .schedule-filters__nearest {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .schedule-filter .ts-wrapper {
    position: relative;
  }

  .schedule-filter .ts-dropdown {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: var(--schedule-filter-dropdown-offset, calc(100% + 8px)) !important;
    transform: none !important;
    margin-top: 0 !important;
    font-size: 16px;
  }

  .schedule-suggest__list {
    position: absolute !important;
    left: 0 !important;
    top: calc(100% + 8px) !important;
    transform: none !important;
    width: min(350px, calc(100vw - 32px));
    max-width: 350px;
  }

  .schedule-suggest__item {
    font-size: 16px;
  }

  .schedule-filters__nearest-text,
  .schedule-filter .dropdown-input,
  .schedule-filters__reset-btn {
    font-size: 16px;
  }

  .schedule-filter .ts-wrapper:not(.has-selected-value) .ts-control::before {
    font-size: 16px;
  }

  .schedule-filters__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }

  .schedule-filters {
    justify-content: flex-start;
  }

  .schedule-filter {
    flex: 0 0 fit-content;
  }

  .schedule-filters__subrow {
    align-items: flex-start;
    overflow: unset;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
  }

  .schedule-filter--format {
    flex-basis: auto;
  }

  .schedule-filters__nearest {
    margin-left: 10px;
  }

  .schedule-filter .ts-wrapper,
  .schedule-filter .ts-control {
    width: auto !important;
  }

  .doctor-card {
    align-items: stretch;
    grid-template-columns: 1fr 35%;
    padding: 30px;
  }

  .doctor-card__header {
    display: none;
  }

  .doctor-card__footer {
    padding: 0 0 0 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .doctor-card__body {
    justify-content: flex-start;
    flex-direction: row;
    gap: 30px;
    padding: 0 15px 0 0;
    border-right: 1px solid#eeeeee;
  }

  .doctor-card__photo {
    border-radius: 30px;
    flex: 0 0 161px;
    width: 161px;
    height: 161px;
  }

  .doctor-card__descr {
    display: block;
  }

  .doctor-card__row .doctor-card__type {
    display: flex;
  }

  .doctor-card__specializations-item:not(:last-child)::after {
    content: none;
  }

  .doctor-card__type-item {
    border-radius: 5px;
  }

  .doctor-card__specializations-item {
    font-weight: 400;
    border-radius: 5px;
    padding: 5px;
    background: #f4f4f4;
    color: var(--schedule-text);
  }

  .doctor-card__specializations,
  .doctor-card__type {
    gap: 10px;
  }

  .doctor-card__footer .btn {
    margin-top: auto;
    margin-left: auto;
    width: fit-content;
    padding: 9px 20px;
  }

  .service-details__item {
    gap: 10px;
  }

  .schedule__list {
    grid-template-columns: 1fr;
  }
}

/* Booking overlay */
.schedule-booking-host.is-open {
  display: block;
}

.schedule-booking {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.schedule-booking__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 37, 49, 0.45);
}

.schedule-booking__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  height: min(86vh, 740px);
  max-height: min(86vh, 740px);
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 20px;
  box-shadow: 0 16px 48px rgba(15, 37, 49, 0.18);
  color: var(--schedule-text, #0f2531);
}

.schedule-booking__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.schedule-booking__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #767676;
}

.schedule-booking__name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  padding-right: 28px;
}

.schedule-booking__hint,
.schedule-booking__loading,
.schedule-booking__empty {
  color: #767676;
  font-size: 14px;
  margin-bottom: 12px;
}

.schedule-booking__days {
  min-height: 120px;
}

.schedule-booking__hours {
  min-height: 72px;
}

.schedule-booking__days-grid,
.schedule-booking__hours-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.schedule-booking__day,
.schedule-booking__hour {
  border: 1px solid #e1e1e1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  min-width: 110px;
}

.schedule-booking__day span,
.schedule-booking__hour span {
  display: block;
  font-weight: 600;
}

.schedule-booking__day small,
.schedule-booking__hour small {
  color: #767676;
}

.schedule-booking__day.is-active,
.schedule-booking__hour.is-active {
  border-color: #007088;
  box-shadow: inset 0 0 0 1px #007088;
}

.schedule-booking__formats {
  margin-bottom: 16px;
}

.schedule-booking__visit-types {
  margin-bottom: 16px;
}

.schedule-booking__formats-title,
.schedule-booking__hours-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.schedule-booking__formats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-booking__format {
  border: 1px solid #e1e1e1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.schedule-booking__format.is-active {
  border-color: #007088;
  box-shadow: inset 0 0 0 1px #007088;
}

.schedule-booking__format--clinic {
  border-left: 3px solid #fd853a;
}

.schedule-booking__format--online {
  border-left: 3px solid #6875d8;
}

.schedule-booking__hour--clinic {
  border-left: 3px solid #fd853a;
}

.schedule-booking__hour--online {
  border-left: 3px solid #6875d8;
}

.schedule-booking__hour--home {
  border-left: 3px solid #23b36b;
}

.schedule-booking__form {
  display: grid;
  gap: 12px;
}

.schedule-booking__form[hidden],
.schedule-booking__hours[hidden],
.schedule-booking__formats[hidden],
.schedule-booking__visit-types[hidden],
.schedule-booking__success[hidden],
.schedule-booking__selected[hidden],
.schedule-booking__error[hidden] {
  display: none !important;
}

.schedule-booking__field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.schedule-booking__field input {
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.schedule-booking__field em {
  font-style: normal;
  color: #acacac;
}

/* «Для кого вы ищете медицинскую помощь?» — радио в стиле чипов формата приёма */
.schedule-booking__for-whom-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-booking__for-whom-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 140px;
  font-size: 14px;
}

.schedule-booking__for-whom .schedule-booking__for-whom-option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
  accent-color: #007088;
}

.schedule-booking__for-whom-option:has(input:checked) {
  border-color: #007088;
  box-shadow: inset 0 0 0 1px #007088;
}

.schedule-booking__for-whom-option:focus-within {
  outline: 2px solid rgba(0, 112, 136, 0.35);
  outline-offset: 1px;
}

.schedule-booking__consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(15, 37, 49, 0.78);
  cursor: pointer;
  user-select: none;
}

.schedule-booking__consent .schedule-filters__nearest-box {
  margin-top: 1px;
}

.schedule-booking__selected {
  margin: 0;
  font-size: 14px;
  color: #007088;
}

.schedule-booking__error {
  margin: 0;
  color: #c0392b;
  font-size: 14px;
}

.schedule-booking__success {
  text-align: center;
  padding: 20px 0;
}

.schedule-booking__success b {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.doctors-popup-content.schedule-v2-modal {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.schedule-v2-modal {
  position: relative;
  width: min(1120px, 92vw);
  min-height: min(560px, 85vh);
  max-height: 85vh;
  overflow-x: clip;
  overflow-y: auto;
  padding: 52px 28px 24px;
  box-sizing: border-box;
}

.schedule-v2-modal__close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 40;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #007088;
}

.schedule-v2-modal__close::before,
.schedule-v2-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #007088;
  border-radius: 2px;
}

.schedule-v2-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.schedule-v2-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.schedule-v2-modal__close:hover::before,
.schedule-v2-modal__close:hover::after {
  background: #fd853a;
}

.schedule-v2-modal .schedule,
.schedule-v2-modal .schedule__results,
.schedule-v2-modal .schedule__list,
.schedule-v2-modal .doctor-card,
.schedule-v2-modal .doctor-card__body,
.schedule-v2-modal .doctor-card__main-content {
  min-width: 0;
  max-width: 100%;
}

/* Не overflow-x на фильтрах (режет дропдауны). Вылет карточек — у списка результатов. */
.schedule-v2-modal .schedule-filters,
.schedule-v2-modal .schedule-filters__row,
.schedule-v2-modal .relative {
  overflow: visible;
}

.schedule-v2-modal .schedule__results,
.schedule-v2-modal .schedule__list {
  overflow-x: clip;
}

.schedule-v2-modal .schedule .wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  padding-bottom: 24px;
}

@media (min-width: 1200px) {
  #referenceDateModal .modal-content:has(.schedule-v2-modal) {
    width: min(1160px, 94vw) !important;
    min-width: min(960px, 94vw) !important;
    max-width: 96vw !important;
  }
}

@media (min-width: 1300px) {
  .doctor-card__footer {
    padding: 0 0 0 30px;
  }

  .doctor-card__body {
    padding: 0 30px 0 0;
  }

  .doctor-card__name {
    font-size: 20px;
  }

  .doctor-card__more,
  .doctor-card__specializations-item {
    font-size: 16px;
  }

  .doctor-card__type-item {
    padding: 5px 10px 5px 21px;
  }

  .doctor-card__type-item:before {
    width: 6px;
    height: 6px;
  }

  .doctor-card__row {
    margin-bottom: 20px;
  }

  .service-details__label,
  .service-details__value {
    font-size: 16px;
  }

  .schedule__list-empty b {
    font-size: 20px;
  }

  .schedule__list-empty p,
  .schedule__list-empty .btn {
    font-size: 16px;
  }
}
