#services.center-profile-booking,
#booking-form {
  scroll-margin-block-start: 8px;
}

.center-profile-booking {
  --booking-picked: color-mix(in srgb, var(--action) 12%, var(--white, #fffdf9));
}

.center-profile-booking .personal-booking-form {
  display: grid;
  gap: 18px;
  max-inline-size: none;
}

.personal-booking-step {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.center-profile-booking .personal-booking-step :is(legend, h3) {
  margin: 0 0 8px;
  padding: 0;
  font-family: inherit;
  font-size: clamp(17px, 2.3vw, 21px);
  font-weight: 660;
  color: var(--ink);
}

.personal-booking-step :is(legend, h3) span {
  color: var(--muted);
}

.personal-service-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personal-service {
  display: grid;
  align-items: start;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 11px;
  min-block-size: 59px;
  border: 1px solid color-mix(in srgb, var(--ink) 26%, transparent);
  border-radius: 10px;
  background: var(--white, #fffdf9);
  cursor: pointer;
}

.personal-service:has(:checked) {
  border-color: var(--ink);
  background: var(--booking-picked);
}

.personal-service:has(:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.personal-service input[type="radio"] {
  inline-size: 16px;
  block-size: 16px;
  min-block-size: 0;
  margin: 4px 0 0;
  padding: 0;
  accent-color: var(--ink);
}

.personal-service-details {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.personal-service-details > span,
.center-profile-booking .booking-contact-choice {
  color: var(--muted);
  font-size: 14px;
}

.personal-service-price {
  text-align: end;
  white-space: nowrap;
}

.center-profile-booking .booking-time {
  display: inline-block;
  inline-size: fit-content;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--booking-picked);
  color: var(--ink);
  font-weight: 600;
}

.personal-booking-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-block-end: 10px;
}

.personal-booking-contact-grid .booking-contact-choice {
  grid-column: 1 / -1;
  margin: 0;
}

.personal-booking-form .booking-field :is(input, textarea) {
  min-inline-size: 0;
  font-size: max(16px, 1em);
}

.personal-booking-form > .booking-consent + .booking-consent {
  margin-block-start: -10px;
}

@media (max-width: 780px) {
  .personal-service-list,
  .personal-booking-contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.center-profile-booking .booking-selection {
  margin-block-start: 14px;
  padding: clamp(16px, 3vw, 25px);
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 12px;
  background: var(--white, #fffdf9);
}

.center-profile-booking .booking-selection > :is(h2, h3) {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.9vw, 24px);
  font-weight: 625;
}

.center-profile-booking .booking-selection > p + p,
.center-profile-booking .booking-selection .booking-visibility,
.center-profile-booking .booking-selection .booking-errors + a {
  margin-block-start: 8px;
}

.center-profile-booking .booking-selection .booking-visibility {
  padding-block-start: 12px;
  border-block-start: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  font-size: 14px;
}

.center-profile-booking .booking-selection .booking-hint {
  font-size: 14px;
  color: var(--muted);
}

.center-profile-booking .booking-selection .text-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
}

.center-profile-booking :is(input, textarea, .text-link, .button):focus-visible,
:is(#services.center-profile-booking, #booking-form):focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
}

.specialist-profile-compact.profile-with-booking .specialist-media > :is(img, .specialist-actions, .specialist-summary),
.specialist-profile-compact.profile-with-booking .specialist-summary > div {
  box-sizing: border-box;
  inline-size: 100%;
  min-inline-size: 0;
  justify-self: stretch;
}

.specialist-profile-compact.profile-with-booking .specialist-actions > :is(.button, .specialist-share) {
  inline-size: 100%;
  min-inline-size: 0;
  justify-self: stretch;
}

@media (min-width: 1024px) {
  .specialist-profile-compact.profile-with-booking .specialist-media {
    position: sticky;
    inset-block-start: calc(var(--header-height) + 12px);
    align-self: start;
    justify-self: stretch;
    max-block-size: none;
    overflow: visible;
  }

  .specialist-profile-compact.profile-with-booking .specialist-media > img {
    max-inline-size: 100%;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .specialist-profile-compact.profile-with-booking .specialist-media {
    gap: 8px;
  }

  .specialist-profile-compact.profile-with-booking .specialist-actions {
    padding: 9px 10px;
  }

  .specialist-profile-compact.profile-with-booking .specialist-summary {
    gap: 5px;
  }

  .specialist-profile-compact.profile-with-booking .specialist-summary > div {
    padding-block: 4px;
  }
}

@media (max-width: 700px) {
  html.center-cookie-open:has(.profile-with-booking) {
    scroll-padding-block-end: 164px;
  }

  .specialist-profile-compact.profile-with-booking {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "identity" "media" "details";
  }

  .specialist-profile-compact.profile-with-booking .specialist-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    inline-size: min(100%, 272px);
  }

  .specialist-profile-compact.profile-with-booking .specialist-media > :is(img, .specialist-actions, .specialist-summary) {
    grid-area: auto;
    grid-column: 1;
  }

}
