/* ===================================================================
   wellsprBuy-Box — self-contained component styles.
   Load ONLY inside the .wsc_buybox wrapper. None of this leaks outside.
   =================================================================== */

/* ---------- layout ---------- */
.wsc_buybox { font: 15px/1.55 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--ink); }
.wsc_buybox * { box-sizing: border-box; }

/* ---------- subtitle / meta line ---------- */
.entry-header > .wsc_sub,
.entry-header .wsc_sub,
.wsc_sub {
  font: 14px/1.4 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  color: var(--slate, #5c6b66);
  margin-top: 6px !important;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wsc_sub_sep {
  color: var(--linemid, #828d89);
  font-weight: 800;
  user-select: none;
}
.wsc_sub_item {
  display: inline-block;
}

/* ---------- rating / review module (just above buy box) ---------- */
.wsc_rate {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 12px;
  font: 13px/1.4 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--slate, #5c6b66);
  flex-wrap: wrap;
}
.wsc_stars {
  color: var(--gold, #f0bc00);
  font-size: 15px;
  letter-spacing: .08em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.wsc_stars.empty {
  color: #cbd5e1;
}
.wsc_stars.empty span {
  color: #cbd5e1;
}
.wsc_rate_score b {
  color: var(--pine, #192c27);
  font-weight: 700;
}
.wsc_verified {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--lemon, #62b414);
}
.wsc_rev_link {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo, #1614b4);
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  margin-left: 2px;
  transition: opacity .15s;
}
.wsc_rev_link:hover {
  opacity: .8;
}

/* ---------- variations (pill styled) ---------- */
.wsc_bb_variations { margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.wsc_bb_var_group { display: flex; flex-direction: column; }
.wsc_bb_varlabel { display: block; font-size: 13px; font-weight: 700; color: var(--pine); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.wsc_bb_varpills_wrap { position: relative; width: 100%; }
.wsc_bb_varpills { display: flex; flex-wrap: wrap; gap: 8px; }
.wsc_bb_varpill {
  flex: 1 1 calc(50% - 4px);
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--slate);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.wsc_bb_varpill:active { transform: scale(.98); }
.wsc_bb_varpill.on {
  color: var(--pine);
  border-color: var(--lemon);
  background: var(--mint);
}
.wsc_bb_variation_single { display: inline-block; font-size: 12px; font-weight: 700; color: var(--slate); background: var(--nearw); padding: 4px 10px; border-radius: 999px; }

/* ---------- packs ---------- */
.wsc_bb_packs { margin-bottom: 12px; }
.wsc_bb_packs_row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wsc_bb_pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; position: relative; text-align: center; transition: border-color .15s, background .15s; }
.wsc_bb_pack.on { border-color: var(--lemon); background: var(--mint); }
.wsc_bb_pack .wsc_bb_packlabel { font-size: 13px; font-weight: 600; color: var(--pine); }
.wsc_bb_pack.on .wsc_bb_packlabel { font-weight: 800; }
.wsc_bb_pack b { font-size: 14px; color: var(--pine); }
.wsc_bb_pack .wsc_bb_was { font-size: 12px; color: var(--ink); text-decoration: line-through; line-height: 1.2; min-height: 14px; }
.wsc_bb_pack .wsc_bb_micro { font-size: 13.5px; font-weight: 700; color: var(--slate); line-height: 1.3; }
.wsc_bb_pack .wsc_bb_savepill { display: none; }
.wsc_bb_pack.on .wsc_bb_savepill { display: block; }
.wsc_bb_pack.on .wsc_bb_savepill ~ .wsc_bb_micro { display: none; }

/* ---------- badges / tags ---------- */
.wsc_bb_tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--lemon); color: #fff; font-size: 0.75rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.wsc_bb_tag_best { background: var(--indigo); }

/* ---------- toggle ---------- */
.wsc_bb_mode_wrap { margin-top: 10px; }
.wsc_bb_toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.wsc_bb_toggle_opt { display: block; padding: 11px 6px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--slate); cursor: pointer; background: #fff; border: 2px solid var(--line); border-radius: 12px; -webkit-user-select: none; user-select: none; transition: border-color .15s, background .15s, color .15s; }
.wsc_bb_toggle_opt small { display: block; font-weight: 600; font-size: 13.5px; color: var(--lemon); }
.wsc_bb_toggle_opt.on { color: var(--pine); border-color: var(--lemon); background: var(--mint); }

/* ---------- offer panel ---------- */
.wsc_bb_ofr { padding: 12px; background: var(--mint); border-radius: 0 0 14px 14px; }
.wsc_bb_ofr_line { display: flex; align-items: baseline; gap: 4px; font-size: 13.5px; color: var(--pine); flex-wrap: wrap; }
.wsc_bb_ofr_line b { font-size: 15px; }
.wsc_bb_benefits { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13.5px; color: var(--slate); }
.wsc_bb_benefits li { padding: 2px 0; }
.wsc_bb_benefits li::before { content: "\2713\0020"; color: var(--lemon); font-weight: 800; }

/* ---------- price row ---------- */
.wsc_bb_pricerow { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.wsc_bb_now { font-size: 26px; font-weight: 800; color: var(--pine); }
.wsc_bb_was { font-size: 14px; color: var(--ink); text-decoration: line-through; }
.wsc_bb_micro { font-size: 13.5px; color: var(--slate); margin-top: 2px; }

/* ---------- save pill ---------- */
.wsc_bb_savepill { font-size: 12px; font-weight: 800; color: #fff; background: var(--lemon); padding: 3px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }

/* ---------- ATC ---------- */
.wsc_bb_atcrow { margin-top: 12px; }
.wsc_bb_atc { display: block; width: 100%; min-height: 54px; border: 0; border-radius: 12px; background: var(--lemon); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 12px rgba(98,180,20,.35); transition: transform .1s, box-shadow .15s, opacity .15s; }
.wsc_bb_atc:active { transform: scale(.98); box-shadow: 0 2px 6px rgba(98,180,20,.25); }
.wsc_bb_atc.loading { opacity: .75; cursor: progress; }
.wsc_bb_atc.loading::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: wsc-spin .6s linear infinite; }
@keyframes wsc-spin { to { transform: rotate(360deg); } }

/* ---------- payment methods ---------- */
.wsc_bb_payments { margin-top: 10px; text-align: center; }
.wsc_bb_payments img { max-width: 240px; width: 100%; height: auto; display: inline-block; opacity: .88; }

/* The off-canvas mini-cart "View cart" button duplicates the drawer's purpose;
   hide it in the slide-out cart only (not the checkout or page-level cart). */
#woo-cart-panel .widget_shopping_cart_content .button.wc-forward,
#woo-cart-panel .ct-cart-content .button.wc-forward,
#woo-cart-panel .cart_totals .button.wc-forward { display: none; }

/* ---------- trust row ---------- */
.wsc_bb_trustrow { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wsc_bb_trustrow .wsc_tbadge { font-size: 12px; font-weight: 700; color: var(--pine); background: var(--nearw); border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.wsc_bb_trustrow .wsc_tbadge a { color: inherit; text-decoration: none; }

/* ---------- free shipping bar ---------- */
.wsc_shipbar_inbuybox { margin-top: 14px; }
body.single-product .free-shipping-unified.product-context:not(.wsc_shipbar_inbuybox) { display: none; }

/* ---------- responsive: mobile & tablet horizontal scrolling swatches ---------- */
@media (max-width: 1023px) {
  .wsc_bb_varpills_wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
  }
  .wsc_bb_varpills_wrap::before,
  .wsc_bb_varpills_wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 8px;
    width: 24px;
    pointer-events: none;
    z-index: 2;
  }
  .wsc_bb_varpills_wrap::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 20%, rgba(255, 255, 255, 0));
  }
  .wsc_bb_varpills_wrap::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 20%, rgba(255, 255, 255, 0));
  }
  .wsc_bb_varpills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 8px;
    padding: 2px 14px 8px;
    margin: 0 -4px;
    scrollbar-width: thin;
    scrollbar-color: var(--linemid, #828d89) transparent;
  }
  .wsc_bb_varpills::-webkit-scrollbar {
    height: 4px;
  }
  .wsc_bb_varpills::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, .05);
    border-radius: 999px;
  }
  .wsc_bb_varpills::-webkit-scrollbar-thumb {
    background: var(--linemid, #828d89);
    border-radius: 999px;
  }
  .wsc_bb_varpills::-webkit-scrollbar-thumb:hover {
    background: var(--slate, #5c6b66);
  }
  .wsc_bb_varpill {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 8px 14px;
  }
}

/* ---------- responsive: below 400px wrap to 2-up packs ---------- */
@media (max-width: 420px) {
  .wsc_bb_packs_row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wsc_bb_pack { padding: 10px 4px 8px; }
  .wsc_bb_toggle { gap: 6px; }
  .wsc_bb_toggle_opt { padding: 10px 4px; font-size: 12.5px; }
  .wsc_bb_now { font-size: 22px; }
}
