/* swvs — page title, wave edges, sticker, shop / promo band pull-up.
   Brand skin (theme model, phase 0): static file served at /themes/<id>/skin.css, hoisted into <head> by the tenant layout. Every rule lives in
   `@layer brand` (declared after Tailwind's utilities in globals.css) and every selector starts with `[data-tenant="<id>"]`. */
@layer brand {
  /* RD-70 (swvs): the visible page title RenderLayout emits on a hero-less page that no block titles — the service page's title type
     (80/700, 36/700 phone, text token), centred. Was `.page-title-b` in globals.css (Tailwind @apply); a skin is plain CSS, so the
     utilities are written out as Tailwind compiled them. */
  [data-tenant="swvs"] .page-title-b {
    margin-inline: auto;
    max-width: 1440px;
    padding-inline: 1rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
    text-align: center;
    font-family: var(--vd-font-heading);
    font-size: 36px;
    line-height: 39.6px;
    font-weight: 700;
    color: var(--vd-color-text);
  }
  @media (min-width: 768px) {
    [data-tenant="swvs"] .page-title-b {
      padding-inline: 5rem;
      padding-top: 80px;
      font-size: 80px;
      line-height: 88px;
    }
  }
  /* swvs (cards b): the wave edges of the live home are real aria-hidden elements inside their blocks (RD-W3-9/WHS-5/WHS-6/WHS-9); the latest-news
     one belongs to the home band that is followed by the app band only. The after-hours separator keeps its own stacking context for its sticker.
     Neighbour rules key on the `[data-reveal]` wrapper RenderLayout puts round every block (blocks are no longer siblings of each other). */
  [data-tenant="swvs"] [data-reveal='appPromo'] + [data-reveal='imageSeparator'] [data-block='imageSeparator'] {
    position: relative;
    isolation: isolate;
  }
  [data-tenant="swvs"] [data-reveal='latestNews']:not(:has(+ [data-reveal='appPromo'])) [data-block='latestNews'] > [data-wave] {
    display: none;
  }
  /* WHS-6: the premier-team art is a home-only floating div on the legacy site (its `dynamic` two-column style, the about-us one, has none):
     shown only where the band is followed by the shop band. */
  [data-tenant="swvs"] [data-reveal='twoColumnWithImage']:not(:has(+ [data-reveal='shop'])) [data-decor='premier'] {
    display: none;
  }
  /* WHS-6: on the live home the subscription promo (wellnessHeroPromo here) sits INSIDE the grey shop band. Only when the promo directly
     follows the shop: a phone keeps it in flow (48px under the header, the band's 80px tail below it); from md the band reserves the
     promo's 161px gap + 807px height (the promo's height is fixed there) and the promo is pulled up over that room with margins that
     cancel (band tail 80, from lg 160) so the flow after it is unchanged. The promo stays the grey of the band on a phone. */
  [data-tenant="swvs"] [data-reveal='shop']:has(+ [data-reveal='wellnessHeroPromo'] [data-promo-band]) [data-block='shop'] {
    padding-bottom: 0;
  }
  [data-tenant="swvs"] [data-reveal='shop'] + [data-reveal='wellnessHeroPromo'] [data-promo-band] {
    padding-top: 48px;
    padding-bottom: 80px;
  }
  @media (min-width: 768px) {
    [data-tenant="swvs"] [data-reveal='shop']:has(+ [data-reveal='wellnessHeroPromo'] [data-promo-band]) [data-block='shop'] {
      padding-bottom: 80px;
    }
    [data-tenant="swvs"] [data-reveal='shop']:has(+ [data-reveal='wellnessHeroPromo'] [data-promo-band]) [data-block='shop'] > div::after {
      content: '';
      display: block;
      height: 968px;
    }
    [data-tenant="swvs"] [data-reveal='shop'] + [data-reveal='wellnessHeroPromo'] [data-promo-band] {
      padding-top: 0;
      padding-bottom: 0;
      margin-top: -887px;
      margin-bottom: 80px;
      background: transparent;
    }
  }
  @media (min-width: 1024px) {
    [data-tenant="swvs"] [data-reveal='shop']:has(+ [data-reveal='wellnessHeroPromo'] [data-promo-band]) [data-block='shop'] {
      padding-bottom: 160px;
    }
    [data-tenant="swvs"] [data-reveal='shop'] + [data-reveal='wellnessHeroPromo'] [data-promo-band] {
      margin-top: -967px;
      margin-bottom: 160px;
    }
  }
  [data-tenant="swvs"] [data-reveal='appPromo'] + [data-reveal='imageSeparator'] [data-block='imageSeparator'] {
    min-height: 800px; /* live: 800 at 1440 and at 390 (the block's own phone floor is 560) */
  }
  /* P-1 (RD-P-3): the live kickers render exactly as authored — the dev blocks' `uppercase` utility on `[data-eyebrow]` is dropped. */
  [data-tenant="swvs"] [data-eyebrow] {
    text-transform: none;
  }
  /* P-2 (RD-P-4): the live SWVS button is Poppins 600 14px/20px, padding 12px 16px, radius 4px, 1px solid border; dev's B blocks use 12px
     uppercase with no padding or border. The fixed 60px / 38px heights (and the hero's 200px / promo's 160px / climate's min 214px widths)
     stay, so the boxes do not grow: the padding sits inside them. Hero: brand blue on blue / transparent; promo: blue on white; climate:
     blue on white, white border. Live puts each label in a `<p>` inside the button (S2B-5: hero 16/24/400, promo and climate 12/16/600, now real elements in the theme overrides). */
  [data-tenant="swvs"] [data-block='hero'] [data-action] {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 16px;
  }
  [data-tenant="swvs"] [data-block='wellnessHeroPromo'] [data-action='primary'] {
    white-space: nowrap;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 16px;
    border: 1px solid var(--color-primary);
  }
  [data-tenant="swvs"] [data-block='imageSeparator'] [data-action] {
    white-space: nowrap;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 16px;
    border: 1px solid white;
  }
  /* S2B-5 (RD-S2B-6): the label is a real inner `<p>` (overrides/WellnessHeroPromo.tsx, ImageSeparator.tsx, Hero.tsx) as on live, so the
     `::first-line` strut that kept it at 12px is gone and the anchors are the inline-flex boxes the markup classes give them. At 390 the climate
     band's title is 36px/32.4px and its copy 18px/19.8px (dev 39.6px and 24px/26.4px); the CTA label keeps its own 12px/16px. */
  @media (max-width: 767.98px) {
    [data-tenant="swvs"] [data-block='imageSeparator'] h2 {
      line-height: 32.4px;
    }
    [data-tenant="swvs"] [data-block='imageSeparator'] p:not([data-action] > p) {
      font-size: 18px;
      line-height: 19.8px;
    }
  }
  /* the home service tiles' VIEW MORE link keeps its 12/16/600 type and 1px transparent border; live rounds it to 4px */
  [data-tenant="swvs"] [data-tile] [data-more] {
    border-radius: 4px;
  }
  /* P-3 (RD-P-4): the clinic-card links are live buttons too — 4px radius and a 1px transparent border (the home GET DIRECTION link had none; the
     /clinics VIEW DETAILS link already has the border). S2B-5: the home link is the live 26px box (h-[26px] in overrides/lib/LocationCardList.tsx, the 12px/600 label an inner `<p>`; the card's bottom padding gives back the 14px). Cards, rows and heights are untouched. */
  [data-tenant="swvs"] [data-block='locations'] [data-card] [data-action='primary'] {
    border-radius: 4px;
  }
  [data-tenant="swvs"] [data-block='locations'] [data-card]:has([data-hours]) [data-action='primary'] {
    border: 1px solid transparent;
    white-space: nowrap;
  }
  /* S2B-1 (RD-S2B-2): the live header is Poppins 600 14px/20px on the two CTAs, 12px/12px nav items (dev 12/17) and a Download-app pill of
     7px 20px / 14px/20px (dev 7px 24px, 14/21). The CTA label is a 12px/12px inner span (overrides/Header.tsx, live's `<p>`), so the boxes
     keep their 38px (one line) / 50px (phone, two lines); the pill's 37px is fixed from md (the phone row sets its own). */
  [data-tenant="swvs"] header [data-action] {
    font-size: 14px;
    line-height: 20px;
  }
  [data-tenant="swvs"] header [data-nav-item] {
    line-height: 12px;
  }
  [data-tenant="swvs"] header [data-download] {
    line-height: 20px;
  }
  @media (min-width: 768px) {
    [data-tenant="swvs"] header [data-download] {
      height: 37px;
      padding-inline: 20px;
    }
  }
  /* S2B-2 (RD-S2B-3): the live footer Download-app pill is 600 14px/20px with padding 12px 24px in a 160x47 box (dev: padding 0, 14/21). The
     markup keeps the fixed h-[47px] w-40 box, so only the padding and line height change. */
  [data-tenant="swvs"] footer [data-action="secondary"] {
    padding: 12px 24px;
    line-height: 20px;
  }
  /* S2B-3 (RD-S2B-4): the live READ MORE is one 367x26 row, 600 12px/16px, radius 4px, 1px solid transparent (dev: a 72x12 inline link inside a
     bordered wrapper). Skin-only (the card is core until the news round): the wrapper loses its border, the link takes the whole row (its own
     1px border, 4px block padding = 26px; 367px wide, the /news cards' 413px less 2x20 margin is 373) and the arrow is placed over the row's right end. The live card chips on /news are 600 14/20 r4,
     padding 4px 8px and a 1px solid rgb(115,115,115) border (no token holds it; a colour-mix serialises as color(srgb ...), so the exact rgb literal). The live
     TEXT is the same grey, but rgb(115,115,115) on the page's rgb(241,241,241) is 4.2:1 and check-axe.mjs (core scripts, out of scope) has no
     brand-contrast flag for it, so the chip text keeps the text-muted token: carried (carry-forward.md). The active chip keeps the primary fill. */
  [data-tenant="swvs"] :is([data-block="latestNews"], [data-block="newsList"]) [data-card] > div:has(> [data-action="primary"]) {
    position: relative;
    max-width: 367px;
    border-width: 0;
  }
  [data-tenant="swvs"] :is([data-block="latestNews"], [data-block="newsList"]) [data-card] [data-action="primary"] {
    flex: 1 1 auto;
    height: auto;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 32px 4px 0;
    line-height: 16px;
  }
  [data-tenant="swvs"] :is([data-block="latestNews"], [data-block="newsList"]) [data-card] > div:has(> [data-action="primary"]) > svg {
    position: absolute;
    top: 50%;
    right: 1px;
    margin: 0;
    transform: translateY(-50%);
    pointer-events: none;
  }
  [data-tenant="swvs"] [data-block="newsList"] button[data-chip] {
    padding: 4px 8px;
    border: 1px solid rgb(115 115 115);
  }
  [data-tenant="swvs"] [data-block="newsList"] button[data-chip][aria-pressed="true"] {
    border-color: var(--color-primary);
  }
  /* S2B-4 (RD-S2B-5): the live Send message button is 600 14px/20px, padding 12px 16px, radius 4px, 1px solid blue, blue fill / white text,
     133x38 (dev 12/12, padding 0 16px, no border outside the band). The core form keeps its fixed h-[38px], so the box holds at 38.
     The band variant of the form already draws a white border; the live button's border is the primary blue in both. */
  [data-tenant="swvs"] form [data-action="send"] {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 20px;
    border: 1px solid var(--color-primary);
  }
  /* T0-5: the home "Our Services" tiles are two across from sm, but between 768 and 1023 that leaves ~190px tiles whose absolute 40/52px
     titles are clipped by the tile's overflow-hidden; one column there gives each tile the content width (the live site stacks them too).
     1024+ keeps the two-across grid and the phone is already one column. */
  @media (min-width: 768px) and (max-width: 1023.98px) {
    [data-tenant="swvs"] [data-block='groupList'] [data-block='service'] {
      grid-template-columns: minmax(0, 1fr);
    }
  }
}
