/* Hide Woo default price only when our cards are present */
.ms-has-price-cards .summary .price,
.ms-has-price-cards .single_variation .price { display: none; }

/* --- PLAN CARDS --- */
.wcsatt-options-prompt-radios {
  display: grid;
  gap: 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

/* Remove outer LI padding/border from APS */
.wcsatt-options-prompt-radio {
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  margin-bottom: 14px !important;
}

/* Base card (NOT selected): light bg + muted text */
.wcsatt-options-prompt-radio .wcsatt-options-prompt-label {
  display: block;
  position: relative;           /* needed for ::after outline */
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px 18px;
  color: #757676;
  transition: box-shadow .2s, background-color .2s, border-color .2s, color .2s;
  overflow: visible !important; /* ensure the selected outline isn't clipped */
  z-index: 0;
}
.wcsatt-options-prompt-radio .wcsatt-options-prompt-label:hover {
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
}
.wcsatt-options-prompt-radio .wcsatt-options-prompt-label .wcsatt-options-prompt-action {
  color: #757676;  /* muted heading by default */
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}

/* === Fix badge overlap with Subscribe heading === */
.wcsatt-options-prompt-label-subscription .wcsatt-options-prompt-action {
  display: block;
  margin-top: 40px !important;
}

/* === Hide the actual radio inputs (all contexts) === */
.wcsatt-options-prompt-label-one-time input[type="radio"],
.wcsatt-options-prompt-label-subscription input[type="radio"]{
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0; height: 0; margin: 0;
}

/* --- SELECTED STATE (Safari/Firefox-proof) --- */
/* We draw a custom outline via ::after so plugin borders can't override it */
.wcsatt-options-prompt-radio.is-active .wcsatt-options-prompt-label,
.wcsatt-options-prompt-label.ms-selected {
  background: #fff !important;
  color: #000 !important;
  border-color: transparent !important; /* let the outline be the visible border */
}
.wcsatt-options-prompt-radio.is-active .wcsatt-options-prompt-label .wcsatt-options-prompt-action,
.wcsatt-options-prompt-label.ms-selected .wcsatt-options-prompt-action {
  color: #000 !important;
}

/* The visible border/outline */
.wcsatt-options-prompt-radio.is-active .wcsatt-options-prompt-label::after,
.wcsatt-options-prompt-label.ms-selected::after {
  content: "";
  position: absolute;
  inset: -3px;                   /* extend a bit outside the label */
  border: 3px solid #111;
  border-radius: 14px;           /* slightly larger than label radius */
  pointer-events: none;
  z-index: 1;                    /* above card, below badges */
  box-shadow: 0 0 0 2px rgba(0,0,0,.12); /* subtle halo for extra contrast */
}

/* --- PRICE ROW --- */
.ms-price-line{
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 8px;
}
.ms-price   { font-weight: 700; font-size: 1.2rem; }
.ms-compare { text-decoration: line-through; opacity: .55; }
.ms-saving, .ms-per-serving { font-size: .95rem; opacity: .85; }

/* Dropdown inside Subscribe card */
.ms-subscribe-inner{ margin-top: 10px; border-top: 1px dashed #e3e3e3; padding-top: 10px; }
.wcsatt-options-product-dropdown-label{ display: none; }
.wcsatt-options-product-dropdown{ width: 100%; }

/* --- BADGES --- */
.ms-save-badge,
.ms-best-badge{
  position: absolute; top: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; height: 32px; padding: 0 20px;
  line-height: 1; border-radius: 10px; letter-spacing: .02em; text-align: center;
  z-index: 2; /* ensure above the outline */
}
.ms-save-badge{ right: 10px; background: #111; color: #fff; font-size: .78rem; }
.ms-best-badge{ left: 10px;  background: #3d9be9; color: #fff; font-size: .75rem; font-weight: 700; }
@media (max-width: 768px){
  .ms-save-badge, .ms-best-badge{ height: 28px; padding: 0 10px; }
}

/* --- PERKS --- */
.ms-sub-perks{ margin: 10px 0 0; padding: 0; list-style: none; display: grid !important; gap: 6px; font-size: .95rem; }
.ms-sub-perks li{ display: flex; align-items: center; gap: 8px; }
.ms-sub-perks li .ms-check{ color: #2e7d32; font-size: 1rem; line-height: 1; }

/* --- QTY + CTA --- */
.single-product .summary form.cart { display: block !important; margin-top: 16px; }
.single-product .summary form.cart .ms-qty-add-row{ display: block !important; margin-top: 12px; }
.single-product .summary form.cart .ms-qty-line{
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.single-product .summary form.cart .ms-qty-label{ font-weight: 600; white-space: nowrap; }
.single-product .summary form.cart .quantity{
  display: inline-flex !important; align-items: center; margin: 0 !important; vertical-align: middle;
}
.single-product .summary form.cart .single_add_to_cart_button.button{
  display: block !important; width: 100% !important;
  padding: 40px !important; border-radius: 0 !important;
  text-transform: uppercase !important; font-weight: 800 !important; font-size: 1.25rem !important; line-height: 1.1 !important;
}
.single-product .summary form.cart .single_add_to_cart_button.button.alt{
  padding: 40px !important; border-radius: 0 !important; font-size: 1.25rem !important;
}
@media (max-width: 768px){
  .single-product .summary form.cart .single_add_to_cart_button.button,
  .single-product .summary form.cart .single_add_to_cart_button.button.alt{
    padding: 28px !important; font-size: 1.05rem !important;
  }
}
/* Disabled CTA look */
.single-product .summary form.cart .single_add_to_cart_button.button[disabled]{
  opacity: .55; cursor: not-allowed;
}

/* Kill APS padding-left on text spans; keep badges’ padding */
.wcsatt-options-product-prompt-radio label > span.wcsatt-options-prompt-action,
.wcsatt-options-prompt-text .wcsatt-options-prompt-text-label,
.wcsatt-options-product li span.subscription-option-details,
.wcsatt-options-product li span.one-time-option-details { padding-left: 0 !important; }
.ms-save-badge, .ms-best-badge{ padding-left: 20px !important; padding-right: 20px !important; }
@media (max-width: 768px){
  .ms-save-badge, .ms-best-badge{ padding-left: 10px !important; padding-right: 10px !important; }
}
