/* ==========================================================================
   Water Sponge Balls - offer blocks
   Built to the reference mockup. All selectors are scoped to .hwk-offers so
   theme styles cannot win on specificity.
   Reference values: card border #CFE9F7 2px / selected #38B6FF on #F2FAFF,
   collapsed card 14px radius 10px 12px padding 40px icon, expanded (rich)
   card 16px radius 52px icon, badge -10px/right 12px orange with dark text.
   ========================================================================== */

.hwk-offers {
  --hwk-brand: #38b6ff;
  --hwk-brand-dark: #1483c7;
  --hwk-sel-bg: #f2faff;
  --hwk-line: #cfe9f7;
  --hwk-hairline: #edf2f6;
  --hwk-ink: #1c2b36;
  --hwk-ink-strong: #20323c;
  --hwk-muted: #485760;
  --hwk-green: #15803d;
  --hwk-orange: #f58720;
  --hwk-cream: #fbf7f2;
  --hwk-cream-line: #e7e1d8;
  --hwk-tint: #e6f6ff;
  --hwk-pad: 10px;
  --hwk-card-pad: 12px;
  --hwk-font: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hwk-font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;

  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--hwk-font);
  font-size: 14px;
  color: var(--hwk-ink);
  text-align: left;
}

/* --- resets, so theme margins and form styles cannot leak in ------------- */

.hwk-offers *,
.hwk-offers *::before,
.hwk-offers *::after {
  box-sizing: border-box;
}

.hwk-offers label,
.hwk-offers p,
.hwk-offers div,
.hwk-offers span,
.hwk-offers s,
.hwk-offers button {
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
}

.hwk-offers label {
  display: block;
  font-weight: inherit;
}

.hwk-offers img {
  max-width: 100%;
}

/* --- section and step heading ------------------------------------------- */

.hwk-offers .hwk-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0px;
}

.hwk-offers .hwk-block[data-hwk-block='addons'] {
  gap: 10px;
}

.hwk-offers .hwk-block[hidden] {
  display: none;
}

.hwk-offers .hwk-step {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--hwk-font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-step__num {
  display: inline;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.hwk-offers .hwk-step__num::after {
  content: '.';
}

.hwk-offers .hwk-step__title {
  font: inherit;
  color: inherit;
}

.hwk-offers .hwk-block__note {
  margin-top: -14px;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hwk-muted);
}

/* --- card shell ---------------------------------------------------------- */

.hwk-offers .hwk-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hwk-offers .hwk-card {
  position: relative;
  display: block;
  overflow: visible;
  min-height: 60px;
  border: 2px solid var(--hwk-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.hwk-offers .hwk-card--selected {
  border-color: var(--hwk-brand);
  background: var(--hwk-sel-bg);
}

.hwk-offers .hwk-card--rich.hwk-card--selected {
  border-radius: 16px;
}

.hwk-offers .hwk-card__badge {
  position: absolute;
  top: -10px;
  right: 12px;
  z-index: 5;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--hwk-orange);
  color: var(--hwk-ink);
  font-family: var(--hwk-font);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- card head ----------------------------------------------------------- */

.hwk-offers .hwk-card__main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px var(--hwk-card-pad);
  cursor: pointer;
}

.hwk-offers .hwk-card--badged .hwk-card__main {
  padding: 12px var(--hwk-card-pad) 10px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__main {
  padding: 16px var(--hwk-card-pad) 8px;
}

.hwk-offers .hwk-card__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.hwk-offers .hwk-card__marker {
  flex: none;
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--hwk-brand);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
}

.hwk-offers .hwk-card--selected .hwk-card__marker {
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--hwk-brand);
}

.hwk-offers .hwk-card__radio:focus-visible + .hwk-card__marker {
  outline: 3px solid var(--hwk-brand-dark);
  outline-offset: 2px;
}

.hwk-offers .hwk-card__media {
  flex: none;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__media {
  width: 52px;
  height: 52px;
  border-radius: 10px;
}

.hwk-offers .hwk-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- collapsed body: 3-column grid, price right, meta row beneath -------- */

.hwk-offers .hwk-card__body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 5px;
  row-gap: 2px;
  align-items: baseline;
}

.hwk-offers .hwk-card__row,
.hwk-offers .hwk-card__price {
  display: contents;
}

.hwk-offers .hwk-card__headline {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  font-family: var(--hwk-font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-card__now {
  grid-column: 2 / span 2;
  grid-row: 1;
  justify-self: end;
  font-family: var(--hwk-font);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hwk-ink-strong);
  white-space: nowrap;
}

.hwk-offers .hwk-card__descriptor {
  grid-column: 1;
  grid-row: 2;
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hwk-muted);
}

.hwk-offers .hwk-card__was {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--hwk-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.hwk-offers .hwk-card__each {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hwk-green);
  white-space: nowrap;
}

/* Save pill: only on an expanded rich card, per the reference */
.hwk-offers .hwk-card:not(.hwk-card--selected) .hwk-card__headline .hwk-pill,
.hwk-offers .hwk-card:not(.hwk-card--rich) .hwk-card__headline .hwk-pill {
  display: none;
}

/* --- expanded (rich + selected) body ------------------------------------ */

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__row {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__price {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__headline {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 16px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__now {
  font-size: 18px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__was {
  font-size: 11.5px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__each {
  font-size: 13px;
}

.hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__descriptor {
  display: none;
}

/* --- detail panel -------------------------------------------------------- */

.hwk-offers .hwk-card__detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 var(--hwk-card-pad) 12px;
}

.hwk-offers .hwk-card__detail[hidden],
.hwk-offers .hwk-card__detail:empty {
  display: none;
}

.hwk-offers .hwk-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.hwk-offers .hwk-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px 7px;
  border: 1px solid var(--hwk-line);
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--hwk-ink);
  text-align: center;
}

.hwk-offers .hwk-chip img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.hwk-offers .hwk-chip__label {
  font-weight: 400;
}

.hwk-offers .hwk-bonuses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.hwk-offers .hwk-bonus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px 7px;
  border: 1px solid var(--hwk-line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.hwk-offers .hwk-bonus img {
  display: block;
  width: 27px;
  height: 36px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(11, 31, 75, 0.25);
}

.hwk-offers .hwk-bonus__label {
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-bonus__free {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--hwk-green);
}

.hwk-offers .hwk-card__free {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--hwk-cream-line);
  border-radius: 10px;
  background: var(--hwk-cream);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-card__free--replaces::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B45309' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 17l6-6 4 4 8-8'/><path d='M15 7h6v6'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
} 

/* --- pills --------------------------------------------------------------- */

.hwk-offers .hwk-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hwk-green);
  color: #fff;
  font-family: var(--hwk-font);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.hwk-offers .hwk-pill[hidden] {
  display: none;
}

.hwk-offers .hwk-pill--plain {
  background: var(--hwk-tint);
  color: var(--hwk-brand-dark);
}

.hwk-offers .hwk-pill--orange {
  background: var(--hwk-orange);
  color: var(--hwk-ink);
}

/* --- upgrade nudge ------------------------------------------------------- */

.hwk-offers .hwk-upgrade {
  padding: 11px 12px;
  border: 1.5px dashed var(--hwk-brand);
  border-radius: 14px;
  background: var(--hwk-tint);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-upgrade[hidden] {
  display: none;
}

.hwk-offers .hwk-upgrade b,
.hwk-offers .hwk-upgrade strong {
  font-weight: 800;
}

.hwk-offers .hwk-upgrade__btn {
  display: inline;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--hwk-brand-dark);
  font: inherit;
  font-weight: 800;
  line-height: inherit;
  text-decoration: underline;
  text-transform: none;
  cursor: pointer;
}

.hwk-offers .hwk-upgrade__btn:hover {
  color: #0f6fad;
}

/* --- add-ons ------------------------------------------------------------- */

.hwk-offers .hwk-addons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hwk-offers .hwk-addon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border: 2px solid var(--hwk-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.hwk-offers .hwk-addon--checked {
  border-color: var(--hwk-brand);
  background: var(--hwk-sel-bg);
}

.hwk-offers .hwk-addon__check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.hwk-offers .hwk-addon__box {
  flex: none;
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--hwk-brand);
  border-radius: 6px;
  background: #fff;
}

.hwk-offers .hwk-addon--checked .hwk-addon__box {
  background-color: var(--hwk-brand);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M5 12l5 5L20 7' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.hwk-offers .hwk-addon__check:focus-visible + .hwk-addon__box {
  outline: 3px solid var(--hwk-brand-dark);
  outline-offset: 2px;
}

.hwk-offers .hwk-addon__media {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--hwk-tint);
  overflow: hidden;
}

.hwk-offers .hwk-addon__media img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.hwk-offers .hwk-addon__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hwk-offers .hwk-addon__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--hwk-font-display);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.25;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-addon__desc {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hwk-muted);
}

.hwk-offers .hwk-addon__contents {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-addon__price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.hwk-offers .hwk-addon__now {
  font-family: var(--hwk-font);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hwk-ink-strong);
}

.hwk-offers .hwk-addon__was {
  font-size: 11px;
  font-weight: 400;
  color: var(--hwk-muted);
  text-decoration: line-through;
}

.hwk-offers .hwk-addon__save {
  font-size: 11px;
  font-weight: 800;
  color: var(--hwk-green);
}

/* --- warning ------------------------------------------------------------- */

.hwk-offers .hwk-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff4f1;
  color: #b42318;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.hwk-offers .hwk-warning[hidden] {
  display: none;
}

/* --- tablet -------------------------------------------------------------- */

@media (min-width: 600px) {
  .hwk-offers {
    --hwk-pad: 0px;
    --hwk-card-pad: 5px;
  }

  .hwk-offers .hwk-step {
    font-size: 17px;
  }

  .hwk-offers .hwk-card__headline {
    font-size: 15px;
  }

  .hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__headline {
    font-size: 17px;
  }

  .hwk-offers .hwk-card__now {
    font-size: 16px;
  }

  .hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__now {
    font-size: 19px;
  }

  .hwk-offers .hwk-card__descriptor,
  .hwk-offers .hwk-addon__desc,
  .hwk-offers .hwk-addon__contents {
    font-size: 12px;
  }

  .hwk-offers .hwk-chip img {
    width: 44px;
    height: 44px;
  }

  .hwk-offers .hwk-bonus img {
    width: 30px;
    height: 40px;
  }

  .hwk-offers .hwk-bonus__label {
    font-size: 11px;
  }

  .hwk-offers .hwk-addon__title {
    font-size: 15px;
  }
}

/* --- desktop ------------------------------------------------------------- */

@media (min-width: 1024px) {
  .hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__headline {
    font-size: 18px;
  }

  .hwk-offers .hwk-card--rich.hwk-card--selected .hwk-card__now {
    font-size: 20px;
  }

  .hwk-offers .hwk-card__free,
  .hwk-offers .hwk-upgrade {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hwk-offers .hwk-card,
  .hwk-offers .hwk-addon {
    transition: none;
  }
}

.hwk-offers .hwk-block[data-hwk-block='addons'] {
  padding-top: 30px;
  gap: 12px;
}

.hwk-offers .hwk-block__note {
  margin-top: -9px;
  font-family: var(--hwk-font);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hwk-muted);
}

.hwk-offers .hwk-step {
  font-family: var(--hwk-font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--hwk-ink);
}

.hwk-offers .hwk-card__each {
  font-weight: 400;
  color: var(--hwk-muted);
}

.hwk-offers .hwk-card:has(.hwk-card__was) .hwk-card__each {
  font-weight: 800;
  color: var(--hwk-green);
}

.hwk-offers .hwk-card__free b,
.hwk-offers .hwk-card__free strong,
.hwk-offers .hwk-upgrade b,
.hwk-offers .hwk-upgrade strong {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  font-weight: 800;
  line-height: inherit;
}

/* Water Sponge Balls: prevent option labels fading after a tap */
.hwk-offers .hwk-card__main,
.hwk-offers .hwk-card__main:hover,
.hwk-offers .hwk-card__main:active,
.hwk-offers .hwk-card__main:focus,
.hwk-offers .hwk-card__main:focus-within,
.hwk-offers label,
.hwk-offers label:hover,
.hwk-offers label:active,
.hwk-offers label:focus,
.hwk-offers label:focus-within {
  opacity: 1 !important;
}

/* Apply the same protection to the add-on cards */
.hwk-offers .hwk-addon,
.hwk-offers .hwk-addon:hover,
.hwk-offers .hwk-addon:active,
.hwk-offers .hwk-addon:focus,
.hwk-offers .hwk-addon:focus-within {
  opacity: 1 !important;
}
