/* Round 13: client final changes (shared). Loaded after the r8 files. */

/* --------------------------------------------------------------------------
   1. No orphan words (client: "perfect at any angle").
      Headings, labels and buttons balance their lines, so a title never ends
      with one word alone; running text uses the browser's "pretty" wrapping,
      which keeps the last line of a paragraph from holding a single word.
      Neither rule changes a box's width, only where its lines break.
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.eyebrow, .tag, .kicker, .mega__kicker, .dnav__kicker,
.card__title, .tcard__title, .svc h3, .fact__v, .fact__k,
.hero-team__name, .hero-team__role,
.btn, .btn__slot, .pill, .go-link, .tlink, .chip,
.readmore > summary, .fold-row,
.footer__col-title, figcaption {
	text-wrap: balance;
}

p, li, dd, dt, blockquote, .lede {
	text-wrap: pretty;
}

/* Short texts (card sentences, list items, roles, steps) balance too:
   "pretty" only lifts a word that is short, these must never end with one
   word alone whatever its length. Chrome balances up to six lines and wraps
   normally beyond, so long paragraphs are unaffected. */
li, dd, dt, figcaption,
.tcard__text, .checks li, .person p, .person--sm p, .steps p, .stepper p,
.proof__item p, .hero-team__reviews,
.mega-card__note, .mega-link__t, .mega-link__d, .dnav-link__t, .booking-help, .loc-lines__list dd {
	text-wrap: balance;
}

/* Words are never split with a hyphen at a line end. */
h1, h2, h3, h4, .lede, .btn, .eyebrow { hyphens: manual; }

/* --------------------------------------------------------------------------
   2. The footer logo (client item 1). The reversed artwork (theme mod
      elite_logo_reversed, see template-parts/layout/brand.php) is shown as
      drawn, not whitened by the older filter.
   -------------------------------------------------------------------------- */
:root .site-footer .brand img.brand__logo--reversed,
:root .premium-inner .site-footer .brand img.brand__logo--reversed { filter: none; }

/* Round 13 (client point 5): a treatment card's icon sits beside its title, not alone on the photo. */
.tcard__title { display: flex; align-items: flex-start; gap: 0.6rem; }
.tcard__title > .tcard__icon {
  position: static; flex: none; width: 2rem; height: 2rem; margin-top: -0.2rem; border-radius: 0.6rem;
  background: var(--ortho-tint, #eee9f7); color: var(--ortho); box-shadow: none;
}
.tcard--ped .tcard__title > .tcard__icon { background: var(--ped-tint, #e5f5f6); color: var(--ped); }
.tcard__title > span:last-child { min-width: 0; }
@media (max-width: 47.99rem) {
  .tcard__title > .tcard__icon { display: none; }
}

/* Round 13 (client point 10): Patient Resources care guides, the number is a badge in front of the title. */
.post-type-archive-elite_resource.premium-inner .care__sum { grid-template-columns: minmax(0, 1fr) 2.25rem; }
.post-type-archive-elite_resource.premium-inner .care__tline { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); align-items: start; column-gap: 0.7rem; }
.post-type-archive-elite_resource.premium-inner .care__n {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-top: 0.05rem; padding: 0; border-radius: 50%;
  background: var(--ortho); color: #fff; font-family: var(--text); font-size: 0.82rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 14px -8px var(--ortho);
}
.post-type-archive-elite_resource.premium-inner .care__k,
.post-type-archive-elite_resource.premium-inner .care__p { padding-left: 2.4rem; }
@media (max-width: 47.99rem) {
  .post-type-archive-elite_resource.premium-inner .care__sum { grid-template-columns: minmax(0, 1fr) 2rem; }
  .post-type-archive-elite_resource.premium-inner .care__n { width: 1.55rem; height: 1.55rem; font-size: 0.78rem; }
  .post-type-archive-elite_resource.premium-inner .care__tline { grid-template-columns: 1.55rem minmax(0, 1fr); column-gap: 0.6rem; }
  .post-type-archive-elite_resource.premium-inner .care__k,
  .post-type-archive-elite_resource.premium-inner .care__p { padding-left: 2.15rem; }
}

/* Contact: the monthly late-hours note never leaves the hours alone on a line. */
.page-template-template-contact .cdet__hnotes li { text-wrap: balance; }

/* Round 12 QA A5: the footer phone reacts to hover and keyboard focus on every page, as on the home page. */
.premium-inner .footer__phone { transition: color 0.2s ease; }
.premium-inner .footer__phone:hover,
.premium-inner .footer__phone:focus-visible { color: #fff !important; }

/* Round 12 QA A12: the Why Elite panel's rating follows its links (no empty band), and the office hours print two days per line. */
.mega__in:has(> .mega-card--visit) > .mega__main > .mega-rating--main { margin-top: 1.25rem; }
.mega .mega-card__hours .mega-card__hline { display: block; }

/* Offer pages, a tablet: two doctor cards side by side left the credentials in a column a few words wide.
   As on a phone, the portrait sits beside the name and role and the credentials run across the card. */
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .page-template-template-offer.premium-inner .offer-doc {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    grid-template-areas: "photo name" "photo role" "creds creds";
    grid-template-rows: 1fr auto auto;
    column-gap: 1.1rem; row-gap: 0;
  }
  .page-template-template-offer.premium-inner .offer-doc__photo { grid-area: photo; }
  .page-template-template-offer.premium-inner .offer-doc__body { display: contents; }
  .page-template-template-offer.premium-inner .offer-doc__name { grid-area: name; align-self: end; margin: 0; }
  .page-template-template-offer.premium-inner .offer-doc__role { grid-area: role; align-self: start; }
  .page-template-template-offer.premium-inner .offer-doc__creds { grid-area: creds; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft, var(--line)); }
}

/* Offer pages, a small laptop: four review columns were too narrow for the quotes; two by two until 80rem. */
@media (min-width: 64rem) and (max-width: 79.99rem) {
  .page-template-template-offer.premium-inner .offer-reviews__grid:not(.offer-reviews__grid--badge) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
