.appointment-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  color: #343a4c;
}

.appointment-modal._active {
  display: block;
}

.appointment-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.appointment-modal__dialog {
  display: flex;
  flex-direction: column;
  position: relative;
  width: min(1400px, calc(100vw - 28px));
  min-height: min(700px, calc(100vh - 28px));
  margin: 14px auto;
  padding: 38px;
  background: #fff;
  border-radius: 5px;
}

.appointment-modal__close {
  position: absolute;
  top: 36px;
  right: 36px;
  width: 50px;
  height: 50px;
  border: 1px solid #293044;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.appointment-modal__close span {
  position: absolute;
  left: 12px;
  top: 24px;
  width: 25px;
  height: 1px;
  background: #293044;
}

.appointment-modal__close span:first-child {
  transform: rotate(45deg);
}

.appointment-modal__close span:last-child {
  transform: rotate(-45deg);
}

.appointment-modal__title {
  margin: 0;
  padding-right: 70px;
  text-align: center;
  color: #343a4c;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.appointment-modal__content {
  flex: 1;
  min-height: 520px;
  padding: 26px 0;
}

.appointment-modal__progress {
  display: grid;
  grid-template-columns: 2.8fr 1fr 1fr 1fr 1fr;
  gap: 13px;
  margin-top: 30px;
}

.appointment-modal__progress-item {
  height: 10px;
  border-radius: 10px;
  background: #c6d9ff;
}

.appointment-modal__progress-item._active {
  background: #6595f6;
}

.appointment-modal__step {
  min-height: 100%;
}

.appointment-modal__select {
  border: 2px solid #e5e9f2;
  border-radius: 5px;
}

.appointment-modal__select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 78px;
  padding: 0 24px;
  border: 0;
  background: transparent;
  color: #343a4c;
  font: inherit;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.appointment-modal__select-arrow {
  width: 13px;
  height: 13px;
  margin-left: 18px;
  border-right: 3px solid #6595f6;
  border-bottom: 3px solid #6595f6;
  transform: rotate(45deg) translateY(-3px);
}

.appointment-modal__select._open .appointment-modal__select-arrow {
  transform: rotate(225deg) translate(-2px, -2px);
}

.appointment-modal__select-body {
  padding: 0 24px 24px;
}

.appointment-modal__search {
  position: relative;
  margin-bottom: 10px;
}

.appointment-modal__search input {
  width: 100%;
  min-height: 50px;
  padding: 0 50px 0 16px;
  border: 2px solid #e5e9f2;
  border-radius: 5px;
  background: #fff;
  color: #343a4c;
  font: inherit;
  font-size: 18px;
}

.appointment-modal__search::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 20px;
  height: 20px;
  border: 2px solid #293044;
  border-radius: 50%;
  transform: translateY(-55%);
}

.appointment-modal__search::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 1;
  width: 12px;
  height: 2px;
  background: #293044;
  transform: translateY(9px) rotate(45deg);
}

.appointment-modal__list {
  max-height: 330px;
  overflow: auto;
}

.appointment-modal__item,
.appointment-modal__empty {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #343a4c;
  font: inherit;
  font-size: 20px;
  line-height: 1.35;
  text-align: left;
}

.appointment-modal__item {
  cursor: pointer;
}

.appointment-modal__item:hover,
.appointment-modal__item._active {
  color: #6595f6;
  text-decoration: underline;
}

.appointment-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 26px;
  padding-top: 8px;
}

.appointment-modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 270px;
  min-height: 55px;
  padding: 0 26px;
  border-radius: 5px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.appointment-modal__button--primary {
  border: 1px solid #c45f47;
  background: #c45f47;
  color: #fff;
}

.appointment-modal__button--secondary {
  border: 1px solid #c45f47;
  background: #c45f47;
  color: #fff;
}

.appointment-modal__button:disabled {
  cursor: default;
  opacity: 0.45;
}

body.appointment-modal-is-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .appointment-modal__dialog {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 22px 16px;
    border-radius: 0;
  }

  .appointment-modal__close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  .appointment-modal__close span {
    left: 10px;
    top: 20px;
    width: 21px;
  }

  .appointment-modal__title {
    padding-right: 50px;
    font-size: 24px;
  }

  .appointment-modal__progress {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 22px;
  }

  .appointment-modal__content {
    min-height: 0;
    padding: 20px 0;
  }

  .appointment-modal__select-head {
    min-height: 68px;
    padding: 0 16px;
    font-size: 22px;
  }

  .appointment-modal__select-body {
    padding: 0 16px 18px;
  }

  .appointment-modal__footer {
    gap: 12px;
  }

  .appointment-modal__button {
    min-width: 0;
    width: 100%;
    padding: 0 12px;
  }
}
