/* ==========================================================================
   MembershipWorks Billing Toggle UI
   ========================================================================== */

/* Hide original MW billing labels — radio inputs stay accessible in the DOM */
label.SFusrbil.mw-bt-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------
   Wrapper: 3 cards in a row, wrap on small screens
   ------------------------------------------------------------------ */
.mw-billing-toggle-wrapper {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------
   Individual level card
   ------------------------------------------------------------------ */
.mw-billing-card {
  flex: 1 1 140px;
  background: #fff;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  padding: 16px 14px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  box-sizing: border-box;
}

.mw-billing-card:hover {
  border-color: #9ca3af;
}

.mw-billing-card:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.mw-billing-card.mw-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ------------------------------------------------------------------
   Card header (level name)
   ------------------------------------------------------------------ */
.mw-billing-card-header {
  font-size: 0.95em;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------
   Price
   ------------------------------------------------------------------ */
.mw-billing-price {
  font-size: 1.45em;
  font-weight: 800;
  color: #111827;
  margin-bottom: 14px;
  line-height: 1.2;
}

/* ------------------------------------------------------------------
   One-Time / Recurring pill toggle
   ------------------------------------------------------------------ */
.mw-billing-pills {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.mw-pill {
  flex: 1;
  background: #f3f4f6;
  border: none;
  padding: 5px 4px;
  font-size: 0.78em;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.12s ease, color 0.12s ease;
}

.mw-pill:first-child {
  border-right: 1px solid #d1d5db;
}

.mw-pill:hover:not(.mw-pill-active) {
  background: #e5e7eb;
  color: #374151;
}

.mw-pill.mw-pill-active {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}

/* Keep pill active colour visible even when card is not selected */
.mw-billing-card:not(.mw-selected) .mw-pill.mw-pill-active {
  background: #93c5fd;
  color: #1e3a8a;
}

/* ------------------------------------------------------------------
   Payment detail line
   ------------------------------------------------------------------ */
.mw-billing-detail {
  font-size: 0.75em;
  color: #6b7280;
  line-height: 1.4;
  min-height: 2.8em;       /* prevent layout shift when text appears */
}

/* ------------------------------------------------------------------
   Responsive: stack cards on narrow screens
   ------------------------------------------------------------------ */
@media (max-width: 480px) {
  .mw-billing-card {
    flex-basis: 100%;
  }
}
