/* zampa — the hero blobs and hero band the live Zampa home draws.
   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-ZF-7b: the page surface is white; the lavender is the surface-alt token. The CMS has no surfaceAlt field yet, so the skin declares it. */
  [data-tenant="zampa"] {
    --vd-color-surface-alt: #f2f3f8;
  }
  /* The two blobs the live hero draws past its edges (>= 768px), painted over the photo; the band clips their off-canvas halves. */
  @media (min-width: 768px) {
    [data-tenant="zampa"] [data-block='hero']::after {
      content: '';
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        url('/themes/zampa/assets/hero-blob-left.svg') -224px 180px / 384px auto no-repeat,
        url('/themes/zampa/assets/hero-blob-right.svg') calc(100% + 224px) calc(100% + 192px) / 384px auto no-repeat;
    }
  }
  /* The hero band is the lavender (surface-alt) fill at desktop and tablet; the phone keeps the navy band under the photo. */
  @media (min-width: 768px) {
    [data-tenant="zampa"] [data-block='hero'] {
      background-color: var(--color-surface-alt);
    }
  }
  /* The live hero puts its buttons 41px under the copy (42px tall at y458), not the block's 32px. */
  @media (min-width: 768px) {
    [data-tenant="zampa"] [data-block='hero'] div:has(> a[data-action]) {
      margin-top: 41px;
    }
  }
  /* ZF-4: core's MobileMenu root is `md:hidden`; the Zampa header needs the menu until lg (the wrapper hides it from lg up), so brand wins over utilities here. */
  [data-tenant="zampa"] [data-header] [data-menu] > div {
    display: block;
  }

  /* VET-2226 INT-1 (RD-INT-1): the ported wizard's skin tokens, the legacy tailwind-constant.js values. booking.css reads these; the
     main, hover and highlight colours are NOT set here, the appointment provider writes them from bookingConfig at runtime. Only the font
     is v2 (RD-BP-8): one token flips it back to "Open Sans". */
  [data-tenant="zampa"] [data-booking-page] {
    --bk-title: #212529;
    --bk-body: #343a40;
    --bk-placeholder: #495057;
    --bk-grey-light: #e5e6ee;
    --bk-grey: #b4b5bc;
    --bk-grey-dark: #818285;
    --bk-background: #f4f7f9;
    --bk-error-background: #fbeeee;
    --bk-error: #e57575;
    --bk-radius: 8px;
    --bk-shadow: 0px 4px 12px 0px rgba(52, 58, 64, 0.05);
    --bk-font-family: var(--vd-font-body, var(--vd-font-family));
    --bk-text-title-size: 24px;
    --bk-text-title-weight: 700;
    --bk-text-title-line-height: 28.8px;
    --bk-text-body-size: 16px;
    --bk-text-body-weight: 400;
    --bk-text-body-line-height: 24px;
    --bk-text-bodybold-size: 16px;
    --bk-text-bodybold-weight: 700;
    --bk-text-bodybold-line-height: 24px;
    --bk-text-bodysmall-size: 14px;
    --bk-text-bodysmall-weight: 400;
    --bk-text-bodysmall-line-height: 20px;
    --bk-text-bodysmallbold-size: 14px;
    --bk-text-bodysmallbold-weight: 600;
    --bk-text-bodysmallbold-line-height: 20px;
    --bk-text-button-size: 14px;
    --bk-text-button-weight: 700;
    --bk-text-button-line-height: 20px;
    --bk-text-link-size: 14px;
    --bk-text-link-weight: 600;
    --bk-text-link-line-height: 20px;
  }
  /* VET-2226 item 5 (RD-BK-1/2/6): the booking page frame, ported from the live legacy Zampa booking page. */
  [data-tenant="zampa"] [data-booking-page] {
    display: flow-root;
    background-color: #f2f3f8;
  }
  [data-tenant="zampa"] [data-booking-page] [data-block="booking"] {
    background-color: #ffffff;
    max-width: 768px;
    margin: 40px auto;
    padding: 32px;
    gap: 32px;
    border-radius: 8px;
  }
  @media (max-width: 767px) {
    [data-tenant="zampa"] [data-booking-page] [data-block="booking"] {
      margin: 0;
      padding: 32px 16px;
      border-radius: 0;
    }
  }
  [data-tenant="zampa"] [data-booking-page] h1 {
    font-size: 24px;
    font-weight: 700;
    line-height: 28.8px;
    color: #212529;
  }
  [data-tenant="zampa"] [data-booking-page] [data-step] h2 {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #212529;
  }
  /* RD-BK-2: the other body and status lines (each carries text-xs itself) take the v1 body scale; help lines the v1 field-label scale (later rule wins). */
  [data-tenant="zampa"] [data-booking-page] [role="status"],
  [data-tenant="zampa"] [data-booking-page] [data-state="sign-in"],
  [data-tenant="zampa"] [data-booking-page] [data-state="disabled"],
  [data-tenant="zampa"] [data-booking-page] [data-state="empty-month"],
  [data-tenant="zampa"] [data-booking-page] [data-region="important-information"] {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #343a40;
  }
  [data-tenant="zampa"] [data-booking-page] [data-action="calendar-status"],
  [data-tenant="zampa"] [data-booking-page] [data-error] {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #505072;
  }
  [data-tenant="zampa"] [data-booking-page] [data-region="messages"] {
    gap: 16px;
  }
  [data-tenant="zampa"] [data-booking-page] [data-message] {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #343a40;
  }
  [data-tenant="zampa"] [data-booking-page] [data-message="emergency"],
  [data-tenant="zampa"] [data-booking-page] [role="alert"][data-state="error"],
  [data-tenant="zampa"] [data-booking-page] [data-state="unavailable"] {
    background-color: #fbeeee;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #343a40;
  }
  [data-tenant="zampa"] [data-booking-page] [data-message="emergency"] {
    display: flex;
    gap: 8px;
  }
  [data-tenant="zampa"] [data-booking-page] [data-emergency-icon] {
    flex: none;
    color: #e57575;
  }
  [data-tenant="zampa"] [data-booking-page] [data-emergency-title] {
    display: block;
    font-size: 14px;
    font-weight: 600;
  }
  /* RD-BK-5: buttons */
  [data-tenant="zampa"] [data-booking-page] [data-action="complete"],
  [data-tenant="zampa"] [data-booking-page] [data-action="retry"],
  [data-tenant="zampa"] [data-booking-page] [data-action="sign-in"],
  [data-tenant="zampa"] [data-booking-page] [data-action="pet-count-add"],
  [data-tenant="zampa"] [data-booking-page] [data-action="pet-count-remove"] {
    height: 42px;
    padding: 10px 24px;
    border: 1px solid var(--bk-main);
    border-radius: 8px;
    background-color: var(--bk-main);
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #ffffff;
  }
  [data-tenant="zampa"] [data-booking-page] [data-action="complete"]:not(:disabled):hover,
  [data-tenant="zampa"] [data-booking-page] [data-action="retry"]:not(:disabled):hover,
  [data-tenant="zampa"] [data-booking-page] [data-action="sign-in"]:hover,
  [data-tenant="zampa"] [data-booking-page] [data-action="pet-count-add"]:not(:disabled):hover,
  [data-tenant="zampa"] [data-booking-page] [data-action="pet-count-remove"]:not(:disabled):hover {
    background-color: var(--bk-hover);
    border-color: var(--bk-hover);
  }
  [data-tenant="zampa"] [data-booking-page] [data-action="complete"]:disabled,
  [data-tenant="zampa"] [data-booking-page] [data-action="retry"]:disabled,
  [data-tenant="zampa"] [data-booking-page] [data-action="pet-count-add"]:disabled,
  [data-tenant="zampa"] [data-booking-page] [data-action="pet-count-remove"]:disabled {
    opacity: 0.4;
  }
  [data-tenant="zampa"] [data-booking-page] [data-action="prev-month"],
  [data-tenant="zampa"] [data-booking-page] [data-action="next-month"] {
    height: 42px;
    padding: 10px 24px;
    border: 1px solid #b4b5bc;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--color-primary);
  }
  [data-tenant="zampa"] [data-booking-page] [data-action="prev-month"]:disabled,
  [data-tenant="zampa"] [data-booking-page] [data-action="next-month"]:disabled {
    opacity: 0.4;
  }
  [data-tenant="zampa"] [data-booking-page] [data-action="add-pet"],
  [data-tenant="zampa"] [data-booking-page] [data-action="remove-pet"] {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--color-primary);
    text-decoration: underline;
  }
  /* RD-BK-6: a later step is divided from the one before */
  [data-tenant="zampa"] [data-booking-page] [data-step] ~ [data-step] {
    border-top: 1px solid #e5e6ee;
    padding-top: 32px;
  }
  /* RD-BK-6: the confirmed block */
  [data-tenant="zampa"] [data-booking-page] [data-state="confirmed"] {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #343a40;
  }
  [data-tenant="zampa"] [data-booking-page] [data-state="confirmed"] svg[data-confirmed-icon] {
    width: 40px;
    height: 40px;
    fill: var(--bk-main);
  }
  [data-tenant="zampa"] [data-booking-page] [data-state="confirmed"] h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 28.8px;
    color: #212529;
  }
  [data-tenant="zampa"] [data-booking-page] [data-state="confirmed"] ul {
    row-gap: 12px;
    border-top: 1px solid #e5e6ee;
    padding-top: 16px;
    font-size: 14px;
    line-height: 20px;
  }
}

/* MO-7 / RD-MO-11, RD-MO-12: a section already on screen at load plays once instead of showing, vanishing and rising. Until Reveal.tsx (routeReveal on)
   has hydrated a wrapper it is held at the hidden state from first paint, and it sets `data-reveal-live` in the same step that applies the real hidden
   class, so nothing changes at the hand-off (the server markup is untouched). Only where scripts run and motion is allowed: no-JS, crawlers and reduced
   motion see every block. A list wrapper is held too (its items rise once it is live). The animation is the failsafe: whatever stops Reveal from going
   live, the block is shown after 4 s, and it stops applying the moment the attribute is set. GL-2 / RD-GL-3: a wrapper whose first child animates itself
   (`data-reveal-own`, the home shop section) is never held; and Reveal.tsx leaves a wrapper the failsafe has already shown visible. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  @layer brand {
    [data-tenant="zampa"] [data-reveal]:not([data-reveal-live]):not(:has(> [data-reveal-own])) {
      opacity: 0;
      transform: translateY(75px);
      animation: vd-reveal-failsafe 0s 4s forwards;
    }
    /* The shop wrapper is held (empty, while its lazy content streams in) until the own section arrives and the exclusion above stops matching; the wrapper's
       own 0.25 s-delayed opacity transition must not then run, or the section would read hidden for a few frames before Reveal.tsx lifts it. */
    [data-tenant="zampa"] [data-reveal]:has(> [data-reveal-own]) {
      transition: none !important;
    }
    @keyframes vd-reveal-failsafe {
      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}
