/* Shared component geometry. Preserve the established fonts, spacing and layouts.
   Full-bleed media, logos, illustrations, book covers, circular controls and
   border-only navigation/FAQ rows intentionally keep their original shapes. */
:root {
  --hd-radius-button: 999px;
  --hd-radius-card: 18px;
  --hd-radius-field: 10px;
  --hd-radius-photo: 28px;
}

/* Filled/outlined actions, including disabled actions and mobile call buttons. */
body :is(.btn, .btn-navy, .btn-ghost, .verify-btn, .cbtn, .nav-cta, .side-cta,
  .mobile-call a, .gform button, .primary-button, .reset-actions button,
  .quiz-option, .tab-list button, .sg-filter, .hd-cookie-actions button,
  .hd-map-placeholder button) {
  border-radius: var(--hd-radius-button);
}
body #a11y-panel button:not(.a11y-close) {
  border-radius: var(--hd-radius-button);
}

/* Bounded cards and form containers. Child photos remain part of their card. */
body :is(.svc, .member, .review, .contact-card, .bpost, .need, .mp-card,
  .ins-grid > a, .ins-grid > span, .svc-trio > a, .cherry-card, .pp-results,
  form, .qform, .gform, .callout, .clinical-figure, .clinical-comparison > div,
  .hd-cookie-dialog, .hd-map-placeholder, .topic-card, .product-card,
  .feature-card, .ask-section, .quiz-section, .takeaway, .quiz-feedback,
  .reset-confirmation, .viw, .viw-plans, .viw-plans > a, .viw-plans > span,
  .viw-note, .sg-photo-pending, .tech-ph) {
  border-radius: var(--hd-radius-card);
}
body #hdc, body #a11y-panel,
.site-home details, .site-home .map iframe {
  border-radius: var(--hd-radius-card);
}
body .bpost { overflow: hidden; }

/* Native checkboxes/radios and circular icon buttons retain their own geometry. */
body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),
body select, body textarea, body .amt-pill,
body #hdc .hdc-in input, body .viw-tabs button {
  border-radius: var(--hd-radius-field);
}

/* Standalone photographs, without changing dimensions, crop or object position. */
body .cols .media > img:not([src$=".svg"]),
body .fp .cols .media > img:not([src$=".svg"]),
body .cols .media > .figure > img:not([src$=".svg"]),
body .fp .cols .media > .figure > img:not([src$=".svg"]),
body :is(.bio-photo, .pp-photo img, .tech-fig > img, .ot-grid figure,
  .aligner-detail, .sg-case .sg-pair img),
.site-home :is(.hero-img, .why-img, .tour-grid figure) {
  border-radius: var(--hd-radius-photo);
}

/* Insurance uses the same charcoal, gold and cream as the existing inner pages. */
.site-inner .viw {
  --gold: #d3b474;
  background: var(--navy);
}
.site-inner .viw-tabs button { background: var(--navy-deep); color: #fff; }
.site-inner .viw-tabs button:hover { background: var(--navy-deep); color: #d3b474; }
.site-inner .viw-tabs button.on,
.site-inner .viw-tabs button[aria-selected="true"] { background: #806023; color: #fff; }
.site-inner .viw-panel :is(.lead-line, .viw-body) { color: #c9cdd3; }
.site-inner .viw-plans { --gold: #806023; background: var(--cream-soft); }
.site-inner .viw-plans :is(a, span) { color: var(--navy); border-color: #d8cbb6; }
.site-inner .viw-plans a:hover { color: #806023; border-color: #806023; }
.site-inner .viw-note { background: var(--navy-deep); color: #c9cdd3; }

/* Fit the longest gallery label as whole words on the smallest phones, while
   retaining its existing 110px row height and the two-column filter layout. */
@media (max-width: 350px) {
  body .sg-filter[data-sg-category="full-mouth-reconstruction"] {
    padding-inline: 4px;
    min-height: 110px;
  }
}

/* Keep the original mobile menu scrollable above the fixed call/consent bars.
   Extra scroll space lets its final action clear the floating helper controls. */
@media (max-width: 1320px) {
  .site-home .nav-links {
    max-height: calc(100dvh - var(--header-height) - var(--mobile-bar-height, 0px) - var(--hd-cookie-height, 0px) - 1px);
    padding-bottom: 96px;
    overscroll-behavior: contain;
  }
}
/* Allow existing text enlargement to reflow on narrow phones. Default-size
   content keeps the same columns, spacing and alignment. */
@media (max-width: 640px) {
  .a11y-text-enlarged .site-home .hours div { flex-wrap: wrap; }
  .a11y-text-enlarged .site-home .hours div > :last-child { margin-left: auto; }
  .a11y-text-enlarged .site-inner .pp-grid > * { min-width: 0; }
  .a11y-text-enlarged .site-inner .cherry-card { overflow-wrap: anywhere; }
  .a11y-text-enlarged .site-inner .cherry-logo { flex-wrap: wrap; }
  .a11y-text-enlarged .site-inner .hcw .item > div { min-width: 0; }
  .a11y-text-enlarged .site-inner .pp-results .row { flex-wrap: wrap; gap: 6px; }
  .a11y-text-enlarged .site-inner .pp-results .row strong { white-space: nowrap; }
  /* The wordmark stays at its original mobile size so the menu remains reachable. */
  .a11y-text-enlarged .site-inner .side-brand { font-size: 15px !important; }
}
@media (max-width: 920px) and (max-height: 400px) {
  .hd-cookie-banner { max-height: 35dvh; }
  body.hd-cookie-visible :is(#hdc-btn, #a11y-btn) { visibility: hidden; }
  .site-home .nav-links { padding-block: 12px; }
  .site-home:has(.nav-links.open) :is(#hdc-btn, #a11y-btn) { visibility: hidden; }
}
