/* PDP overlay styles (lib/hybrid-pdp/overlay.ts). Uses the build's own --hpdp-* tokens. Scoped to .hpdp-embed pages that carry data-hpdp-overlay. */

/* fix 4: the badge pair on the 3-Month ribbon ("Most Popular" | the live "Best Value") */
.hpdp-pack__ribbon--pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px calc(var(--hpdp-space) * 0.75); max-width: 100%; white-space: normal; overflow-wrap: normal; }
@media (max-width: 699px) { .hpdp-pack__ribbon--pair { font-size: 0.8125rem; } }
.hpdp-pack__ribbon-sep { width: 1px; align-self: stretch; background: currentColor; opacity: 0.55; }
/* fix 4: per-day line, third line of a pack's text block */
.hpdp-pack__perday { display: block; font-family: var(--hpdp-font-body); font-size: 0.75rem; line-height: 1.2; font-weight: 700; color: var(--hpdp-color-accent); }
.hpdp-pack.is-selected .hpdp-pack__perday { color: var(--hpdp-color-primary); }

/* fix 5: trust chips under the button */
.hpdp-of-trust { list-style: none; display: grid; grid-template-columns: 0.9fr 1fr 1.3fr; gap: 4px; margin: calc(var(--hpdp-space) * 0.75) 0 0; padding: 0; }
.hpdp-of-trust li { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 5px 3px; font-family: var(--hpdp-font-body); font-size: 0.65rem; overflow-wrap: normal; word-break: normal; hyphens: none; line-height: 1.15; font-weight: 700; text-align: left; color: var(--hpdp-color-text); background: var(--hpdp-color-background); border: 1.5px solid var(--hpdp-color-border); border-radius: var(--hpdp-radius); }
.hpdp-of-trust svg { flex: none; width: 14px; height: 14px; color: var(--hpdp-color-accent); }
/* fix 4: delivery line */
.hpdp-of-delivery { margin: calc(var(--hpdp-space) * 0.75) 0 0; font-family: var(--hpdp-font-body); font-size: 0.875rem; line-height: 1.25; font-weight: 700; text-align: center; color: var(--hpdp-color-text); }
.hpdp-of-delivery[hidden] { display: none; }
/* fix 4: bonus unlock bar */
.hpdp-of-unlock { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(var(--hpdp-space) * 1); margin: calc(var(--hpdp-space) * 1) 0 0; padding: calc(var(--hpdp-space) * 1) calc(var(--hpdp-space) * 1.25); background: var(--hpdp-color-background); border: 2px dashed var(--hpdp-color-border); border-radius: var(--hpdp-radius); }
.hpdp-of-unlock__bar { display: grid; grid-auto-flow: column; gap: 3px; }
.hpdp-of-unlock__bar i { display: block; width: 14px; height: 22px; border-radius: 3px; background: var(--hpdp-color-surface); border: 1.5px solid var(--hpdp-color-border); }
.hpdp-of-unlock.is-on { border-style: solid; border-color: var(--hpdp-color-primary); }
.hpdp-of-unlock.is-on .hpdp-of-unlock__bar i { background: var(--hpdp-color-primary); border-color: var(--hpdp-color-primary); }
.hpdp-of-unlock__txt { margin: 0; font-family: var(--hpdp-font-body); font-size: 0.875rem; line-height: 1.25; font-weight: 700; color: var(--hpdp-color-text); }

/* phone order: the chips and the delivery line follow the button; the unlock bar follows the payment marks (the build's offer-first order: pack 4, cta 5, payments 6, price 7) */
@media (max-width: 699px) {
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-buybox__card > .hpdp-of-trust { order: 5; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-buybox__card > .hpdp-of-delivery { order: 5; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-buybox__card > .hpdp-of-unlock { order: 6; }
  /* the per-day line adds a row to each pack: the ladder stays tight so the button is still on the first screen */
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-pack { padding-block: 2px; gap: 6px; }
  .hpdp-page .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-pack.has-ribbon { padding-top: 6px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-pack__thumb { width: 34px; height: 34px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-pack__mark { width: 20px; height: 20px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-pack__lead { gap: 6px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-packs { gap: 6px; margin-top: 16px; margin-bottom: 6px; }
  /* the pair ribbon sits IN the row's flow (a first grid row of its own) on every ladder, so it can never cover the title */
  .hpdp-page .hpdp-hero__grid[data-hpdp-phone="offer-first"] .hpdp-pack__ribbon--pair { position: static; grid-column: 1 / -1; justify-self: start; margin: 0 0 4px; }
}

/* fix 3: a concept variant carries a subline right under its headline on the phone first screen (otherwise the build moves the subhead far below the button) */
@media (max-width: 699px) {
  .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-buybox__card > .hpdp-buybox__subhead { order: 2; margin: 0 0 calc(var(--hpdp-space) * 0.5); font-size: 0.875rem; line-height: 1.2; }
}

/* fix 3 + fix 2 together: the variant's extra subline costs about 50px, so a variant's gallery strip and card spacing give back enough that the Claim button still clears the sticky bar */
@media (max-width: 699px) {
  .hpdp-page .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-gallery .hpdp-gallery__track { aspect-ratio: 4 / 1; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-buybox__card { padding-top: 6px; padding-bottom: 12px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-buybox__card > .hpdp-rating { line-height: 1.1; margin-top: -2px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-pack { padding-block: 0; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-buybox__card > .hpdp-buybox__subhead { font-size: 0.8125rem; margin-bottom: 4px; }
  .hpdp-hero__grid[data-hpdp-phone="offer-first"][data-hpdp-variant] .hpdp-buybox__card > .hpdp-buybox__kicker { font-size: 0.9rem; }
}
