body.service-modal-open {
  overflow: hidden;
}

.service-modal[hidden] {
  display: none !important;
}

.service-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.5vw, 34px);
}

.service-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(45, 31, 65, 0.66);
  backdrop-filter: blur(8px);
}

.service-modal__dialog {
  position: relative;
  display: flex;
  width: min(780px, 100%);
  max-height: min(90vh, 900px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(159, 126, 198, 0.24);
  border-radius: clamp(24px, 2vw, 34px);
  background: #fbf9fd;
  box-shadow: 0 30px 90px rgba(50, 33, 71, 0.32);
  color: #3d2d56;
  animation: service-modal-enter 220ms ease-out both;
}

.service-modal__header {
  position: relative;
  flex: 0 0 auto;
  padding: clamp(26px, 3vw, 42px) clamp(24px, 4vw, 48px) clamp(22px, 2.5vw, 34px);
  background: #9f7ec6;
  color: #fff;
}

.service-modal__header::after {
  position: absolute;
  right: clamp(76px, 11vw, 138px);
  bottom: -55px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  content: "";
}

.service-modal__header > p {
  position: relative;
  z-index: 1;
  margin: 0 0 7px;
  color: #f9e8ed;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.service-modal__header h2 {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 64px);
  margin: 0;
  font-family: "Oswald Local", "Arial Narrow", sans-serif;
  font-size: clamp(34px, 4.2vw, 58px);
  font-weight: 600;
  line-height: 1.02;
  text-transform: uppercase;
}

.service-modal__close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.service-modal__body {
  overflow: auto;
  padding: clamp(24px, 3.5vw, 42px) clamp(20px, 4vw, 48px) clamp(28px, 4vw, 46px);
}

.service-modal__description {
  max-width: 680px;
  margin: 0 0 24px;
  color: #6f5a83;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55;
}

.service-modal__table-wrap {
  overflow: hidden;
  border: 1px solid rgba(141, 98, 183, 0.16);
  border-radius: 20px;
  background: #fff;
}

.service-modal__table {
  width: 100%;
  border-collapse: collapse;
}

.service-modal__table th,
.service-modal__table td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(141, 98, 183, 0.12);
  text-align: left;
}

.service-modal__table th {
  background: #f3edf8;
  color: #715e88;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.service-modal__table th:last-child,
.service-modal__table td:last-child {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}

.service-modal__table td {
  color: #4e3a65;
  font-size: 14px;
  line-height: 1.35;
}

.service-modal__table td:last-child {
  color: #8d62b7;
  font-weight: 800;
}

.service-modal__table tr:last-child td {
  border-bottom: 0;
}

.service-modal__note {
  margin: 16px 2px 0;
  color: #8a7898;
  font-size: 12px;
  line-height: 1.45;
}

.service-modal__booking {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  border-radius: 999px;
  background: #ff9fa4;
  color: #fff;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  text-decoration: none;
  transition: filter 180ms ease, transform 180ms ease;
}

.service-modal__booking:hover,
.service-modal__booking:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-2px);
}

@keyframes service-modal-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .service-modal {
    padding: 10px;
  }

  .service-modal__dialog {
    max-height: calc(100dvh - 20px);
    border-radius: 24px;
  }

  .service-modal__header {
    padding: 26px 62px 22px 20px;
  }

  .service-modal__header h2 {
    max-width: 100%;
    font-size: clamp(30px, 10vw, 42px);
  }

  .service-modal__close {
    top: 14px;
    right: 14px;
    width: 42px;
  }

  .service-modal__body {
    padding: 22px 14px 26px;
  }

  .service-modal__table th,
  .service-modal__table td {
    padding: 13px 12px;
  }

  .service-modal__table th:last-child,
  .service-modal__table td:last-child {
    width: 104px;
  }

  .service-modal__booking {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-modal__dialog,
  .service-modal__booking {
    animation: none;
    transition: none;
  }
}
