.appointment-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, calc(24 / var(--design-width) * 100vw), 2rem);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.appointment-popup.is-open {
  visibility: visible;
  opacity: 1;
}

.appointment-popup__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(43 43 43 / 45%);
}

.appointment-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, clamp(18rem, calc(480 / var(--design-width) * 100vw), 30rem));
  padding: clamp(1.75rem, calc(40 / var(--design-width) * 100vw), 2.5rem)
    clamp(1.5rem, calc(32 / var(--design-width) * 100vw), 2rem);
  background-color: var(--color-bg);
  border-radius: clamp(1rem, calc(24 / var(--design-width) * 100vw), 1.5rem);
  box-shadow: 0 20px 48px rgb(43 43 43 / 16%);
}

.appointment-popup__close {
  position: absolute;
  top: clamp(0.75rem, calc(16 / var(--design-width) * 100vw), 1rem);
  right: clamp(0.75rem, calc(16 / var(--design-width) * 100vw), 1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2rem, calc(40 / var(--design-width) * 100vw), 2.5rem);
  height: clamp(2rem, calc(40 / var(--design-width) * 100vw), 2.5rem);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.appointment-popup__close:hover {
  opacity: 0.7;
}

.appointment-popup__logo {
  display: block;
  width: auto;
  height: clamp(1.25rem, calc(30 / var(--design-width) * 100vw), 1.875rem);
  margin-inline: auto;
}

.appointment-popup__title {
  margin-top: clamp(1.25rem, calc(28 / var(--design-width) * 100vw), 1.75rem);
  font-size: clamp(1.125rem, calc(24 / var(--design-width) * 100vw), 1.5rem);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: var(--color-text);
}

.appointment-popup__form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.875rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  margin-top: clamp(1.25rem, calc(28 / var(--design-width) * 100vw), 1.75rem);
}

.appointment-popup__field {
  width: 100%;
  min-height: clamp(3rem, calc(56 / var(--design-width) * 100vw), 3.5rem);
  padding: clamp(0.875rem, calc(16 / var(--design-width) * 100vw), 1rem)
    clamp(1rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  font-family: inherit;
  font-size: clamp(0.9375rem, calc(18 / var(--design-width) * 100vw), 1.125rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
  background-color: transparent;
  border: 1px solid var(--color-gold-border);
  border-radius: var(--radius-btn);
  outline: none;
  transition: border-color 0.2s ease;
}

.appointment-popup__field::placeholder {
  color: #9f9d9b;
}

.appointment-popup__field:focus {
  border-color: var(--color-gold-start);
}

.appointment-popup__consent {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.625rem, calc(12 / var(--design-width) * 100vw), 0.75rem);
  cursor: pointer;
}

.appointment-popup__checkbox {
  flex-shrink: 0;
  width: clamp(1.125rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  height: clamp(1.125rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  margin-top: 0.125rem;
  accent-color: var(--color-gold-start);
  border: 1px solid var(--color-gold-border);
  border-radius: 0.25rem;
  cursor: pointer;
}

.appointment-popup__consent-text {
  font-size: clamp(0.75rem, calc(14 / var(--design-width) * 100vw), 0.875rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.appointment-popup__consent-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: opacity 0.2s ease;
}

.appointment-popup__consent-link:hover {
  opacity: 0.75;
}

.appointment-popup__submit {
  width: 100%;
  min-height: clamp(3rem, calc(56 / var(--design-width) * 100vw), 3.5rem);
  padding: clamp(0.875rem, calc(16 / var(--design-width) * 100vw), 1rem)
    clamp(1rem, calc(20 / var(--design-width) * 100vw), 1.25rem);
  font-family: inherit;
  font-size: clamp(0.9375rem, calc(18 / var(--design-width) * 100vw), 1.125rem);
  font-weight: 400;
  line-height: 1.2;
  color: #ffffff;
  background: var(--gradient-gold);
  border: 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.appointment-popup__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.appointment-popup__submit:not(:disabled):hover {
  opacity: 0.88;
}

.appointment-popup__success {
  margin-top: clamp(1.25rem, calc(28 / var(--design-width) * 100vw), 1.75rem);
  font-size: clamp(0.9375rem, calc(18 / var(--design-width) * 100vw), 1.125rem);
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  color: var(--color-text-muted);
}

.appointment-popup__form.is-hidden,
.appointment-popup__title.is-hidden,
.appointment-popup__success.is-hidden {
  display: none;
}

body.is-appointment-open,
body.is-header-menu-open {
  overflow: hidden;
}
