/* OVA9 bundle cards. Row reads: image | badges + title + subtitle | pricing.
   Loaded from the page `styles` list, i.e. after next-core.css and
   brand-checkout.css, so equal-specificity overrides win without !important. */

/* Whole card is role="button"; the radio dot is redundant. */
.os-card .radio-style-1 {
  display: none;
}

.os-card__content {
  grid-column-gap: 14px;
  justify-content: flex-start;
}

.landing-bundles .os-cards__vertical {
  gap: 0.5rem;
}

.os-card__wrapper {
  padding: 0.7rem 0.85rem;
}

.os-card__image-slot {
  background-color: transparent;
  flex: none;
  width: 4.5rem;
  height: auto;
}

.os-card__image-slot .image {
  width: 100%;
  height: auto;
}

/* min-width:0 keeps long titles from forcing one word per line. */
.os-card__main-slot {
  min-width: 0;
  justify-content: flex-start;
}

/* Badges share the first row; the title wraps onto its own line under them. */
.os-card__title-section {
  row-gap: 6px;
}

.os-card__title-wrapper {
  grid-column-gap: 6px;
  grid-row-gap: 3px;
}

.os-card__title-badge,
.os-card__badge-inline {
  order: 1;
}

.os-card__title {
  order: 2;
  width: 100%;
  font-size: 1.28rem;
  line-height: 1.15;
  color: var(--brand--color--foreground);
}

.os-card__title-gift {
  display: inline-block;
  width: 26px;
  height: 26px;
  margin-left: 4px;
  object-fit: contain;
  vertical-align: -6px;
}

/* Same pill, unpinned: .os-card__label-2 is normally absolute and offset by
   .os-card__label--middle-*, which this variant deliberately omits. Metrics
   match .os-card__title-badge so both pills on the row read as one set. */
.os-card__badge-inline {
  position: static;
  inset: auto;
  height: auto;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* The inner text node carries its own --font-size--sm, so the size has to be
   set here rather than on the pill for it to match .os-card__title-badge. */
.os-card__badge-inline .os-card__label-text-2 {
  top: 0;
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Make title badge match badge-inline text style */
.os-card__title-badge {
  font-size: .625rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  padding: 2px 6px;
}

.os-card__subtitle-wrapper {
  margin-top: 0;
}

.os-card__subtitle-text {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.os-card__subtitle-strike {
  color: #9a9a9a;
  text-decoration: line-through;
  font-weight: 500;
  margin-right: .2rem;
}

/* Pricing column: compare price, price, shipping line. */
.os-card__secondary-slot {
  flex: none;
  justify-content: center;
}

.os-card__pricing {
  align-items: flex-end;
  flex: none;
}

/* Per-unit price and the "Total:" label are both noise next to one bundle price. */
.os-card__price-container,
.os-card__total-label {
  display: none;
}

.os-card__total-container {
  grid-column-gap: 0;
  grid-row-gap: 2px;
  flex-flow: column;
  align-items: flex-end;
  display: flex;
}

.os-card__total-compare {
  order: 1;
  font-size: .8125rem;
  text-decoration: line-through;
}

.os-card__total-current {
  order: 2;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand--color--foreground);
}

.os-card__shipping-line {
  order: 3;
  margin-top: 2px;
  font-size: .75rem;
  text-align: right;
  white-space: nowrap;
}

.os-card__total-compare {
  color: #9a9a9a;
  font-weight: 500;
}

.os-card__gift-bar {
  background: var(--ova9-badge-popular-surface, #E1C6CC);
  color: var(--ova9-badge-popular, #5A262C);
  font-weight: 600;
  font-size: .8125rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
  padding: .5rem .85rem;
  border-bottom-left-radius: var(--radius--selector, 8px);
  border-bottom-right-radius: var(--radius--selector, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.gift-bar__image {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

@media (max-width: 479px) {
  .os-card__wrapper {
    padding: .75rem;
  }

  .os-card__content {
    grid-column-gap: 10px;
  }

  .os-card__image-slot {
    width: 4.5rem;
  }

  .os-card__title {
    font-size: 1.15rem;
  }

  .os-card__subtitle-text,
  .os-card__shipping-line {
    font-size: .6875rem;
  }

  .os-card__badge-inline,
  .os-card__title-badge,
  .os-card__badge-inline .os-card__label-text-2 {
    font-size: .5625rem;
    padding: 2px 5px;
  }

  .os-card__badge-inline .os-card__label-text-2 {
    padding: 0;
  }

  .os-card__total-compare {
    font-size: .8125rem;
  }

  .os-card__total-current {
    font-size: 1.15rem;
  }

  .os-card__gift-bar {
    font-size: .75rem;
    padding: .45rem .7rem;
  }
}

/* Cards render before the SDK (no data-next-await); keep SDK-only discount bits hidden until it's ready. */
html:not(.next-display-ready) .os-card [data-next-bundle-display="hasDiscount"] {
  display: none;
}
