/* Size picker for products sold in several sizes (data: src/_data/sizes.json) */
.size-picker { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.size-picker legend {
  font-family: var(--display); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: .6rem; padding: 0;
}
.size-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .6rem; }
.size-option {
  position: relative; display: flex; flex-direction: column; gap: .15rem;
  border: 2px solid var(--line); border-radius: 4px; background: #fff;
  padding: .65rem .8rem; cursor: pointer;
}
.size-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size-option:hover { border-color: var(--navy); }
.size-option:has(input:checked) { border-color: var(--navy); background: var(--tint); box-shadow: var(--shadow-sign-sm); }
.size-option:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.size-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.size-sub { font-size: .8rem; color: var(--slate); line-height: 1.3; }
.price-list { border: 2px solid var(--navy); border-radius: 4px; background: #fff; overflow-x: auto; margin: 1rem 0 1.2rem; }
.price-list table { border-collapse: collapse; width: 100%; min-width: 22rem; font-variant-numeric: tabular-nums; }
.price-list th, .price-list td { padding: .6rem .9rem; text-align: right; border-top: 1px solid var(--line); }
.price-list thead th {
  background: var(--navy); color: #fff; border-top: 0;
  font-family: var(--display); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
}
.price-list th:first-child, .price-list td:first-child { text-align: left; }
.price-list td.price { font-weight: 700; }
.price-list td.per { color: var(--slate); font-size: .9rem; }

/* Price table with a postage estimate (sizes.json "postage") */
.qty-head.has-postage, .qty-row.has-postage { grid-template-columns: 3rem 1fr 1fr 1.15fr 1.4fr; }
/* Each money column reads as its own stack: two-line headers bottom-aligned, dividers down the table */
.qty-head.has-postage { align-items: end; line-height: 1.15; letter-spacing: .06em; }
.qty-head.has-postage > span:nth-child(n+3), .qty-row.has-postage > span:nth-child(n+3) { padding-left: .55rem; border-left: 1px solid var(--line); }
.qty-head.has-postage > span:nth-child(n+3) { border-left-color: rgba(255,255,255,.28); align-self: end; }
.qty-head.has-postage > span:nth-child(5), .qty-row.has-postage > span.total { border-left-width: 2px; }
.qty-row.has-postage > span:nth-child(n+3) { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.qty-row .postage { color: var(--slate); white-space: nowrap; }
.qty-row .total { font-weight: 700; }
.qty-row .total small { display: block; font-weight: 400; color: var(--slate); font-size: .8rem; }
.price-includes { margin: 0 0 .8rem; font-size: .95rem; font-weight: 700; line-height: 1.45; }
.price-includes strong { color: var(--red); }
.postage-foot { font-size: .88rem; color: var(--slate); margin: -.5rem 0 1rem; line-height: 1.5; }
@media (max-width: 540px) {
  .qty-head.has-postage, .qty-row.has-postage { grid-template-columns: 2.2rem 1fr 1fr 1.15fr 1.15fr; font-size: .85rem; column-gap: 0; }
  .qty-head.has-postage > span:nth-child(n+3), .qty-row.has-postage > span:nth-child(n+3) { padding-left: .4rem; }
  .qty-head.has-postage { font-size: .68rem; line-height: 1.2; }
}

/* "How your EDDM total is figured" explainer */
.eddm-how { margin: 1.6rem 0; padding: 1.2rem 1.3rem; background: #fff; border: 2px solid var(--navy); border-radius: 4px; }
.eddm-how h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; margin: 0 0 .7rem; }
.eddm-steps { margin: 0 0 1.1rem; padding-left: 1.3rem; font-size: .95rem; line-height: 1.5; }
.eddm-steps li + li { margin-top: .4rem; }
.eddm-example { background: var(--tint); border-radius: 4px; padding: 1rem; }
.eddm-example-lede { margin: 0 0 .8rem; font-size: .95rem; }
.eddm-sum { display: flex; align-items: stretch; gap: .6rem; }
.eddm-tile { flex: 1 1 0; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.eddm-tile-total { border: 2px solid var(--navy); }
.t-label { font-family: var(--display); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--slate); }
.t-big { font-size: .88rem; color: var(--slate); line-height: 1.3; }
.t-amt { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; margin-top: .2rem; }
.eddm-op { align-self: center; font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--navy); }
.eddm-example-foot { margin: .8rem 0 0; font-size: .88rem; color: var(--slate); line-height: 1.5; }
@media (max-width: 540px) {
  .eddm-how { padding: 1rem; }
  .eddm-sum { flex-direction: column; gap: .3rem; }
  .eddm-op { align-self: flex-start; padding-left: .5rem; line-height: 1; }
}

/* Price table with ranges (list mail on /eddm/): per-piece lines and a stacked layout on phones */
.price-list td small { display: block; font-weight: 400; color: var(--slate); font-size: .78rem; }
.price-list-stack table { min-width: 0; }
.price-list-stack th, .price-list-stack td { padding: .55rem .6rem; }
.price-list-stack td:first-child, .price-list-stack td.price { white-space: nowrap; }
.price-list-stack td small { white-space: normal; }
@media (max-width: 540px) {
  .price-list-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .price-list-stack table, .price-list-stack tbody, .price-list-stack tr, .price-list-stack td { display: block; }
  .price-list-stack tr { padding: .7rem .9rem .8rem; border-top: 2px solid var(--line); }
  .price-list-stack tbody tr:first-child { border-top: 0; }
  .price-list-stack td { padding: .15rem 0; border-top: 0; text-align: left; }
  .price-list-stack td::before {
    content: attr(data-label); display: block;
    font-family: var(--display); font-weight: 500; font-size: .68rem;
    text-transform: uppercase; letter-spacing: .14em; color: var(--red);
  }
  .price-list-stack td:first-child { font-family: var(--display); font-weight: 700; font-size: 1.2rem; padding-bottom: .3rem; }
  .price-list-stack td:first-child::before { display: none; }
  .price-list-stack td small { display: inline; margin-left: .3rem; }
}

/* Larger runs under the all-inclusive tiers (sizes.json largeOptions, pricingRules.largeRuns) */
.qty-sub {
  padding: .45rem .9rem; border-top: 2px solid var(--navy); background: var(--tint);
  font-family: var(--display); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--navy);
}
.qty-large-note { margin: -.6rem 0 1.2rem; font-size: .85rem; color: var(--slate); }
