/* Public site and cabinet share the consultation button shape. */
:root {
  --center-control-radius: 99px;
}

:is(.button, .specialist-card-link, .consult-profile-action, .menu-button, .menu-close,
    .link-button, .center-analytics-settings, .center-cookie-actions button,
    .specialist-share-fields button, input[type="submit"], input[type="button"]):not([data-crop-x]) {
  border-radius: var(--center-control-radius);
}

.specialist-card-content {
  container-type: inline-size;
}

.specialist-card-content :is(h2, h3),
.people-page .person :is(h2, h3),
.related-person h2 {
  font-size: clamp(20px, 2vw, 26px);
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.specialist-card-content :is(h2, h3) {
  font-size: max(15px, min(clamp(20px, 2vw, 26px), 7.4cqi));
}

.center-format-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.center-format-item {
  min-inline-size: 0;
}

.center-service-amount {
  display: inline-flex;
  align-items: baseline;
  column-gap: 8px;
  vertical-align: baseline;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.center-service-amount .center-service-value {
  color: inherit;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.2;
}

.center-service-amount .center-service-time {
  color: var(--muted, inherit);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

:is(.personal-service-price, .service-price) .center-service-value {
  font-size: clamp(17px, 2.1vw, 21px);
}

.practice-choice {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.practice-choice legend {
  padding: 0;
  font-weight: 600;
}

.practice-choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 8px;
}

.practice-choice-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 8px 12px;
  border: 1px solid var(--stroke, #8590a1);
  border-radius: var(--center-control-radius);
  cursor: pointer;
}

.practice-choice-option input {
  flex: none;
  inline-size: 16px;
  block-size: 16px;
  margin: 0;
  accent-color: var(--ink);
}

.practice-choice-option:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.practice-choice-legacy,
.practice-choice-recovery {
  margin-block-start: 10px;
  overflow-wrap: anywhere;
}

/* Compact rhythm for the public footer link columns. */
.center-footer .center-footer-columns {
  padding-block: 26px;
}

.center-footer .center-footer-columns > .center-footer-column h2 {
  margin-block-end: 8px;
  font-size: 15px;
}

.center-footer .center-footer-columns > .center-footer-column a {
  min-height: 26px;
  padding-block: 3px;
  font-size: 14px;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .center-footer .center-footer-columns {
    padding-block: 22px;
    row-gap: 16px;
  }

  .center-footer .center-footer-columns > .center-footer-column:last-child {
    padding-block-start: 16px;
  }

  .center-footer .center-footer-columns > .center-footer-column a {
    min-height: 36px;
    padding-block: 7px;
    font-size: 13.5px;
    line-height: 1.4;
  }
}

@media (max-width: 359px) {
  .center-footer .center-footer-columns > .center-footer-column + .center-footer-column {
    padding-block-start: 16px;
  }
}


/* The same press feedback for buttons on the public site and in the cabinet. */
:is(button, input[type="button"], input[type="submit"], input[type="reset"],
    a:is(.button, .specialist-card-link, .consult-profile-action), [role="button"],
    details > summary,
    :is(.personal-service, .practice-choice-option, .enhanced-file):has(input:enabled)):not(:disabled, [aria-disabled="true"]) {
  transition: scale 120ms ease-out;
}

/* Replace the older press offset and the separate consent-button scale. */
.button:active,
.center-cookie-actions button:active:not(:disabled):not(:focus-visible),
.center-analytics-actions button:active:not(:disabled):not(:focus-visible) {
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  :is(button, input[type="button"], input[type="submit"], input[type="reset"],
      a:is(.button, .specialist-card-link, .consult-profile-action), [role="button"],
      details > summary,
      :is(.personal-service, .practice-choice-option, .enhanced-file):has(input:enabled)):is(
        html:not([data-button-touch]) *:active:not(:focus-visible, :has(:focus-visible)),
        [data-button-pressed]):not(:disabled, [aria-disabled="true"]) {
    scale: .97;
  }

  input[type="file"]:not(.enhanced-file input)::file-selector-button {
    transition: scale 120ms ease-out;
  }

  input[type="file"]:not(:disabled, .enhanced-file input):is(html:not([data-button-touch]) *:active:not(:focus-visible), [data-button-pressed])::file-selector-button {
    scale: .97;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(button, input[type="button"], input[type="submit"], input[type="reset"],
      a:is(.button, .specialist-card-link, .consult-profile-action), [role="button"],
      details > summary,
      :is(.personal-service, .practice-choice-option, .enhanced-file):has(input:enabled)):not(:disabled, [aria-disabled="true"]) {
    transition: none;
  }

  :is(button, input[type="button"], input[type="submit"], input[type="reset"],
      a:is(.button, .specialist-card-link, .consult-profile-action), [role="button"],
      details > summary,
      :is(.personal-service, .practice-choice-option, .enhanced-file):has(input:enabled)):is(
        html:not([data-button-touch]) *:active:not(:focus-visible, :has(:focus-visible)),
        [data-button-pressed]):not(:disabled, [aria-disabled="true"]) {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }

  input[type="file"]:not(:disabled, .enhanced-file input):is(html:not([data-button-touch]) *:active:not(:focus-visible), [data-button-pressed])::file-selector-button {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }
}
