* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
}

html,
body {
  /* Отключает отскок (bounce) и pull-to-refresh */
  overscroll-behavior: none;
}

body {
  background-color: rgb(242, 242, 246);
  min-height: 100vh;
  position: relative;
  overscroll-behavior: none;
}

/* Верхняя навигация */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 3rem;
  background-image: linear-gradient(
    90.03deg,
    rgb(38, 79, 206) 0.03%,
    rgb(6, 140, 254) 99.97%
  );
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.step__btn {
  font-size: 2rem;
  cursor: pointer;
}

.search__wrapper {
  position: absolute;
  bottom: -3rem;
  width: 70%;
}

#servicesSearch {
  border-radius: 0.7rem;
  padding: 0.5rem 2rem 0.5rem 2.3rem;
  font-size: 1.1rem;
  outline: none;
  border: none;
  width: 100%;
  box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
}

#servicesSearch:focus {
  border: 1px #007aff solid;
  box-shadow:
    rgba(0, 0, 0, 0.075) 0px 1px 1px 0px inset,
    rgba(82, 168, 236, 0.6) 0px 0px 8px 0px;
}

.search__icon {
  position: absolute;
  top: 0.4rem;
  left: 0.5rem;
  font-size: 1.2rem;
  color: gray;
}

.close__icon {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-size: 1.2rem;
  color: red;
  cursor: pointer;
  display: none;
}
/* Верхняя навигация */

/* ШАГ 1 - ВЫБОР УСЛУГ */
.services__wrapper {
  min-height: 100vh;
  margin-top: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.service__item {
  background-color: #fff;
  margin: 0.3rem;
  border-radius: 0.7rem;
  padding: 1rem;
  width: 70%;
  font-size: 1.1rem;
  /* font-weight: bol; */
}

.service__item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.service__price__duration {
  font-size: 1rem;
  color: rgb(153, 153, 153);
}

.dot {
  color: #005be4;
}

.add__service__btn {
  color: #007aff;
  font-weight: 600;
  background-color: rgb(242, 242, 246);
  border-radius: 1rem;
  padding: 0.3rem 1rem;
  cursor: pointer;
}

.add__service__btn.del {
  color: red;
}

.add__service__btn:hover {
  box-shadow: 0px 4px 8px 0px rgba(34, 60, 80, 0.2) inset;
}
/* ШАГ 1 - ВЫБОР УСЛУГ */

/* ШАГ 2 - ВЫБОР ВРЕМЕНИ */
.times__wrapper {
  min-height: 100vh;
  margin-top: 3.5rem;
  display: none;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  margin-bottom: 0.5rem;
}
/* ШАГ 2 - ВЫБОР ВРЕМЕНИ */

/* FOOTER */
.footer {
  background-color: #fff;
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  box-shadow: 0px -4px 8px 0px rgba(34, 60, 80, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.footer::after {
  content: ""; /* Необходимое свойство для ::after */
  position: absolute;
  top: 0.3rem; /* Вверху */
  left: 50%; /* Сдвиг от левого края на 50% */
  transform: translateX(
    -50%
  ); /* Точная центровка: сдвиг влево на половину своей ширины */
  width: 4rem; /* Длина полоски */
  height: 4px; /* Толщина полоски */
  border-radius: 0.5rem;
  background-color: rgba(128, 128, 128, 0.605); /* Цвет полоски */
}

.footer__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
}

#box {
  overflow: hidden;
  transition: height 0.3s ease;
}

.price {
  font-size: 1rem;
  color: black;
  font-weight: bold;
}

.count__time {
  color: rgb(153, 153, 153);
}

.continue__btn {
  color: #fff;
  font-weight: 600;
  background-image: linear-gradient(
    135deg,
    rgb(15, 135, 255) 0%,
    rgb(97, 186, 255) 100%
  );
  border-radius: 1rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

.footer__fade {
  background: #0000006e;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 500;
  opacity: 1;
  transition: opacity 0.3s linear;
  /* pointer-events: none; */
  display: none;
}

.selected__services__list {
  width: 73%;
}

.service__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  line-height: 1;
  width: 100%;

  /* border: 1px solid black; */
  padding-bottom: 1rem;
}

.service__wrapper:last-child {
  border-bottom: 1px solid gray;
}

.ss__info {
  margin-right: 1rem;
}

.ss__title {
  font-size: 0.9rem;
  font-weight: bold;
}

.ss__price__duration {
  color: rgb(153, 153, 153);
}

.ss__del {
  color: red;
  cursor: pointer;
  font-size: 1.3rem;
}
/* FOOTER */

/* DATE__TIME__ITEM */
.date__time__item {
  background-color: #fff;
  margin: 0.3rem;
  border-radius: 0.7rem;
  padding: 1rem;
  width: 70%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.date__wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
  border-radius: 0.7rem;
  padding: 0.2rem 0.5rem;
  min-width: 4rem;
  min-height: 4rem;
  margin-right: 1rem;
}

.date {
  font-weight: bold;
  font-size: 1.1rem;
}

.day__of__week {
  font-size: 0.9rem;
}

.month {
  font-size: 0.6rem;
}

.time__wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
}

.time {
  margin: 0.25rem;
  border: 1px solid rgba(128, 128, 128, 0.489);
  border-radius: 0.5rem;
  line-height: 1;
  padding: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
}

.time.selected_time{
  background: #007aff;
  color: #fff;
  font-weight: bold;
}

.time:hover {
  border: 1px solid #007aff;
}

.month-wrapper {
  position: absolute;
  bottom: -3rem;
  width: 70%;
  display: none;
  align-items: center;
  justify-content: space-between;
}

.month_btn {
  color: #fff;
  font-weight: 600;
  background-image: linear-gradient(
    135deg,
    rgb(15, 135, 255) 0%,
    rgb(97, 186, 255) 100%
  );
  border-radius: 1rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

#cur-year {
  font-size: .8rem;
  margin-left: .5rem;
}

.month_btn_nav {
  color: #fff;
  font-weight: 600;
  font-size: 1.5rem;
  background-image: linear-gradient(
    135deg,
    rgb(15, 135, 255) 0%,
    rgb(97, 186, 255) 100%
  );
  border-radius: .8rem;
  padding: 0;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.month_btn_nav.block {
  background: gray;
  cursor: no-drop;
}

/* DATE__TIME__ITEM */

/* FORM WRAPPER */
.form__wrapper {
  height: 85vh;
  margin-top: 0.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 0.5rem;
  position: relative;
}

.input {
  margin: 0.5rem;
  padding: 0.3rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  outline: none;
  width: 70%;
}

.input:focus {
  box-shadow:
    rgba(0, 0, 0, 0.067) 0px 0.89564px 0.89564px 0px inset,
    rgba(82, 168, 236, 0.537) 0px 0px 7.16512px 0px;
}

.confirm__record {
  margin: 0.5rem;
  padding: 0.3rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  outline: none;
  width: 70%;
  background-image: linear-gradient(
    135deg,
    rgb(15, 135, 255) 0%,
    rgb(97, 186, 255) 100%
  );
  text-align: center;
  color: #fff;
  cursor: pointer;
}

.confirm__record:hover {
  box-shadow: 0px 4px 8px 0px rgba(34, 60, 80, 0.2) inset;
}

.confirm__record:disabled {
  background-image: none;
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

.selected_date_time {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  background: #fff;
  border-radius: 1rem;
  padding: 0.5rem;
  color: #005be4;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

.time-string {
  font-weight: normal;
  color: gray;
}
/* FORM WRAPPER */

/* Модальное окно подтверждения */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;

  /* opacity: 1;
  visibility: visible; */
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-success {
  background: #fff;
  border: 1px solid #007aff;
  border-radius: 1rem;
  max-width: 450px;
  width: 100%;
  padding: 40px 30px;
  position: relative;
  transform: scale(0.7) translateY(50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);

  /* opacity: 1;
  transform: scale(1) translateY(0); */
}

.modal-overlay.active .modal-success {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  border-radius: 50%;
  height: 1.5rem;
  width: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #007aff;
  color: #fff;
  cursor: pointer;
}

.modal-close:hover {
  color: red;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: #007aff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceIn 0.6s;
}

.success-icon svg {
  width: 50px;
  height: 50px;
  fill: white;
}

.modal-title {
  text-align: center;
  color: #007aff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.1;
}

.modal-message {
  text-align: left;
  color: black;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 30px;
}

.modal-button {
  background: #007aff;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 1rem;
  width: 100%;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-button:hover {
  background: #005be4;
}

.modal-button:active {
  transform: translateY(0);
}
/* Модальное окно подтверждения */

/* МЕДИАЗАПРОСЫ */
@media (max-width: 768px) {
  .search__wrapper {
    width: 95%;
  }

  .service__item {
    width: 95%;
  }

  .date__time__item {
    width: 95%;
  }

  .selected__services__list {
    width: 100%;
  }

  .input {
    width: 95%;
  }

  .confirm__record {
    width: 95%;
  }

  .footer__wrapper {
    justify-content: space-between;
  }
}
