/**
 * CFB.gg All-Access native checkout — dark skin.
 *
 * Styles the native WooCommerce checkout rendered by [woocommerce_checkout]
 * inside [cfbgg_all_access_checkout]. This is the consolidated end-state of the
 * Madden School checkout skin (all the scattered iterative fixes folded into
 * one clean pass), re-prefixed for CollegeFootball.gg.
 *
 * Scope: every rule is namespaced under .cfbgg-plan so nothing here leaks to
 * the rest of the site.
 */
.cfbgg-plan {
	--cfb-bg: #0f0f0f;
	--cfb-surface: #1e1e1e;
	--cfb-surface-2: #181818;
	--cfb-border: #333;
	--cfb-border-2: #2a2a2a;
	--cfb-text: #ececec;
	--cfb-muted: #9a9a9a;
	--cfb-faint: #6f6f6f;
	--cfb-blue: #3d7bff;
	--cfb-blue-hi: #2f6ae8;
	--cfb-gold: #f5b51e;
	--cfb-good: #5dcaa5;
	max-width: 600px;
	margin: 0 auto;
	color: var(--cfb-text);
}

/* ============================================================
   LOGIN BAR ("Already a member? Log in")
   ============================================================ */
.cfbgg-login-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 14px;
	margin: 14px 0 0;
	background: var(--cfb-surface);
	border: 1px solid var(--cfb-border);
	border-radius: 10px;
	font-size: 14px;
}
.cfbgg-login-bar__text {
	color: var(--cfb-muted);
}
.cfbgg-login-bar__btn,
.cfbgg-login-bar__btn:link,
.cfbgg-login-bar__btn:visited {
	color: var(--cfb-blue);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.cfbgg-login-bar__btn:hover {
	color: var(--cfb-blue-hi);
	text-decoration: underline;
}

/* ============================================================
   PLAN TOGGLE
   ============================================================ */
.cfbgg-plan__toggle {
	display: flex;
	align-items: stretch;
	background: var(--cfb-surface);
	border: 1px solid var(--cfb-border);
	border-radius: 12px;
	padding: 5px;
	margin-bottom: 0;
}
.cfbgg-plan__opt {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 64px;
	padding: 12px 8px;
	border: none;
	background: transparent;
	border-radius: 8px;
	cursor: pointer;
	overflow: visible;
	transition: background 0.15s;
	font-family: inherit;
}
.cfbgg-plan__opt:hover { background: rgba(255,255,255,0.03); }
.cfbgg-plan__opt.is-active { background: var(--cfb-blue); }

.cfbgg-plan__term {
	font-size: 16px;
	font-weight: 600;
	color: var(--cfb-muted);
}
.cfbgg-plan__price {
	font-family: "Oswald", sans-serif;
	font-size: 18px;
	font-weight: 600;
	color: #ccc;
}
.cfbgg-plan__opt.is-active .cfbgg-plan__term,
.cfbgg-plan__opt.is-active .cfbgg-plan__price { color: #fff; }

.cfbgg-plan__price--yearly {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	gap: 1px;
}
.cfbgg-plan__per {
	font-size: 0.55em;
	font-weight: 600;
	color: inherit;
	opacity: 0.92;
	margin-left: 1px;
}
.cfbgg-plan__was {
	color: var(--cfb-faint);
	text-decoration: line-through;
	font-size: 0.62em;
	font-weight: 400;
	margin-right: 6px;
}
.cfbgg-plan__opt.is-active .cfbgg-plan__was { color: rgba(255,255,255,0.6); }

.cfbgg-plan__billed {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-top: 2px;
	letter-spacing: 0.01em;
}
.cfbgg-plan__opt:not(.is-active) .cfbgg-plan__billed {
	color: var(--cfb-muted, #c4c4c4);
}
.cfbgg-plan__opt.is-active .cfbgg-plan__billed {
	color: rgba(255,255,255,0.9);
}

.cfbgg-plan__badge {
	position: absolute;
	top: -9px;
	right: 8px;
	background: var(--cfb-gold);
	color: #1a1a1a;
	font-family: "Oswald", sans-serif;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 2px 7px;
	border-radius: 6px;
	white-space: nowrap;
}

/* Swapping state: subtle top loading bar over the checkout */
.cfbgg-plan__checkout { position: relative; }
.cfbgg-plan.is-swapping .cfbgg-plan__checkout::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--cfb-blue), transparent);
	background-size: 200% 100%;
	animation: cfb-load 0.9s linear infinite;
	z-index: 5;
}
@keyframes cfb-load {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ============================================================
   ONE CARD WRAPPER
   ============================================================ */
.cfbgg-plan__checkout {
	border: 1px solid var(--cfb-border);
	border-radius: 14px;
	background: var(--cfb-surface-2);
	padding: 20px 20px 24px;
	margin-top: 16px;
	overflow: visible;
}
.cfbgg-plan__checkout .woocommerce { background: transparent; }

/* ============================================================
   NATIVE WOOCOMMERCE CHECKOUT -> dark
   ============================================================ */
.cfbgg-plan .woocommerce-checkout,
.cfbgg-plan form.checkout,
.cfbgg-plan #customer_details,
.cfbgg-plan #order_review,
.cfbgg-plan #order_review_heading {
	color: var(--cfb-text) !important;
	background: transparent !important;
}

/* Single-column: collapse Woo's two-column layout */
.cfbgg-plan .col2-set,
.cfbgg-plan .woocommerce-checkout .col2-set { display: block !important; }
.cfbgg-plan .col2-set .col-1,
.cfbgg-plan .col2-set .col-2 {
	width: 100% !important;
	float: none !important;
	max-width: 100% !important;
	padding: 0 !important;
}
.cfbgg-plan #customer_details,
.cfbgg-plan #order_review,
.cfbgg-plan #order_review_heading {
	width: 100% !important;
	float: none !important;
	clear: both !important;
}

/* Kill big inter-section gaps -> tight rhythm */
.cfbgg-plan #customer_details,
.cfbgg-plan .woocommerce-billing-fields,
.cfbgg-plan .woocommerce-account-fields,
.cfbgg-plan #order_review,
.cfbgg-plan #payment {
	margin: 0 !important;
	padding: 0 !important;
}

/* Section headings */
.cfbgg-plan h3,
.cfbgg-plan .woocommerce-billing-fields h3,
.cfbgg-plan .woocommerce-account-fields h3,
.cfbgg-plan .woocommerce-additional-fields h3 {
	font-family: "Oswald", sans-serif !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	font-size: 12px !important;
	color: #fff !important;
	margin: 0 0 8px !important;
	padding: 0 !important;
}

/* Labels */
.cfbgg-plan .checkout label,
.cfbgg-plan .woocommerce-form__label {
	color: var(--cfb-muted) !important;
	font-size: 12px !important;
	margin: 0 0 4px !important;
	display: block !important;
}

/* Fields */
.cfbgg-plan .form-row { margin: 0 0 10px !important; padding: 0 !important; }
.cfbgg-plan .checkout input[type="text"],
.cfbgg-plan .checkout input[type="email"],
.cfbgg-plan .checkout input[type="tel"],
.cfbgg-plan .checkout input[type="password"],
.cfbgg-plan .checkout input[type="number"],
.cfbgg-plan .checkout select,
.cfbgg-plan .checkout textarea,
.cfbgg-plan .checkout .input-text,
.cfbgg-plan input.input-text,
.cfbgg-plan #billing_email,
.cfbgg-plan #account_username,
.cfbgg-plan #account_password,
.cfbgg-plan .woocommerce-billing-fields input,
.cfbgg-plan .woocommerce-billing-fields select,
.cfbgg-plan .woocommerce-account-fields input,
.cfbgg-plan .select2-container .select2-selection--single {
	background-color: var(--cfb-surface) !important;
	border: 1px solid var(--cfb-border) !important;
	border-radius: 8px !important;
	color: var(--cfb-text) !important;
	-webkit-text-fill-color: var(--cfb-text) !important;
	padding: 11px 12px !important;
	font-size: 15px !important;
}
.cfbgg-plan .checkout input::placeholder,
.cfbgg-plan #billing_email::placeholder,
.cfbgg-plan input.input-text::placeholder {
	color: var(--cfb-muted) !important;
	-webkit-text-fill-color: var(--cfb-muted) !important;
}
.cfbgg-plan .checkout input:focus,
.cfbgg-plan .checkout select:focus,
.cfbgg-plan .checkout textarea:focus {
	border-color: var(--cfb-blue) !important;
	box-shadow: 0 0 0 1px var(--cfb-blue) !important;
	outline: none !important;
}
.cfbgg-plan .checkout input:-webkit-autofill,
.cfbgg-plan #billing_email:-webkit-autofill {
	-webkit-text-fill-color: var(--cfb-text) !important;
	-webkit-box-shadow: 0 0 0 1000px var(--cfb-surface) inset !important;
}

/* Account fields tight under billing */
.cfbgg-plan .woocommerce-account-fields { margin-top: 10px !important; }
.cfbgg-plan .create-account { margin: 0 !important; padding: 0 !important; }

/* ============================================================
   TRIM CLUTTER
   ============================================================ */
/* Order notes / additional info, shipping, company, native login toggle */
.cfbgg-plan .woocommerce-additional-fields,
.cfbgg-plan #order_comments,
.cfbgg-plan #order_comments_field,
.cfbgg-plan .woocommerce-additional-fields__field-wrapper,
.cfbgg-plan .woocommerce-shipping-fields,
.cfbgg-plan #ship-to-different-address,
.cfbgg-plan #billing_company_field,
.cfbgg-plan .woocommerce-form-login-toggle,
.cfbgg-plan .col2-set > .col-2:empty {
	display: none !important;
}
/* Remove the "Your Order" heading; toggle + total line are self-explanatory */
.cfbgg-plan #order_review_heading { display: none !important; }

/* ============================================================
   ORDER SUMMARY -> one inline Total line
   ============================================================ */
.cfbgg-plan .woocommerce-checkout-review-order-table thead,
.cfbgg-plan .woocommerce-checkout-review-order-table tbody,
.cfbgg-plan .woocommerce-checkout-review-order-table tr.cart_item,
.cfbgg-plan .woocommerce-checkout-review-order-table tr.cart-subtotal,
.cfbgg-plan .woocommerce-checkout-review-order-table tr.recurring-totals,
.cfbgg-plan .woocommerce-checkout-review-order-table tr.recurring-total,
.cfbgg-plan .wcs-recurring-totals {
	display: none !important;
}
.cfbgg-plan .woocommerce-checkout-review-order-table,
.cfbgg-plan .woocommerce-checkout-review-order-table tfoot {
	border: none !important;
	background: transparent !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	display: block !important;
}
.cfbgg-plan .woocommerce-checkout-review-order-table tfoot tr.order-total:not(.recurring-total) {
	display: flex !important;
	justify-content: space-between !important;
	align-items: baseline !important;
	width: 100% !important;
	border: none !important;
	padding: 4px 2px !important;
	margin-top: 8px !important;
}
.cfbgg-plan .woocommerce-checkout-review-order-table tfoot tr.order-total:not(.recurring-total) th,
.cfbgg-plan .woocommerce-checkout-review-order-table tfoot tr.order-total:not(.recurring-total) td {
	border: none !important;
	padding: 0 !important;
	background: transparent !important;
}
.cfbgg-plan .woocommerce-checkout-review-order-table tfoot tr.order-total:not(.recurring-total) th {
	font-size: 17px !important;
	font-weight: 500 !important;
}
.cfbgg-plan .woocommerce-checkout-review-order-table tfoot tr.order-total:not(.recurring-total) td {
	font-size: 20px !important;
	font-weight: 500 !important;
	text-align: right !important;
}
.cfbgg-plan .woocommerce-Price-amount,
.cfbgg-plan .woocommerce-Price-amount bdi { color: var(--cfb-text) !important; }
.cfbgg-plan .order-total td strong,
.cfbgg-plan .order-total .woocommerce-Price-amount { color: #fff !important; }

/* ============================================================
   PAYMENT METHOD TILES (authoritative)
   ============================================================ */
.cfbgg-plan #payment,
.cfbgg-plan #payment ul.payment_methods {
	background: transparent !important;
	border: none !important;
	overflow: visible !important;
	padding-top: 4px !important;
}
.cfbgg-plan #payment ul.wc_payment_methods {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	border: none !important;
	overflow: visible !important;
}

/* Base tile */
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 10px !important;
	padding: 14px 16px !important;
	margin: 0 !important;
	border: 1px solid var(--cfb-border) !important;
	border-radius: 10px !important;
	background: var(--cfb-surface) !important;
	box-shadow: none !important;
	cursor: pointer !important;
	position: relative !important;
	overflow: visible !important;
	list-style: none !important;
	transition: border-color 0.15s, background 0.15s !important;
}
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method:hover {
	border-color: var(--cfb-muted) !important;
}

/* Selected tile: blue border + subtle fill */
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
	border-color: var(--cfb-blue) !important;
	box-shadow: 0 0 0 1px var(--cfb-blue) !important;
	background: rgba(61, 123, 255, 0.08) !important;
}

/* Radio hidden (tile state shows selection) */
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method > input[type="radio"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	pointer-events: none !important;
	clip: rect(0 0 0 0) !important;
}

/* Label: bright when selected, muted otherwise */
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method > label {
	flex: 1 1 auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	font-weight: 500 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	cursor: pointer !important;
}
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method:has(input[type="radio"]:checked) > label {
	color: #fff !important;
}
.cfbgg-plan #payment ul.wc_payment_methods li.wc_payment_method:not(:has(input[type="radio"]:checked)) > label {
	color: var(--cfb-muted) !important;
}

/* Hide the clipped Stripe card icon in the label (text is enough); keep PayPal logo */
.cfbgg-plan #payment label[for="payment_method_stripe"] img,
.cfbgg-plan #payment .stripe-cards-icon,
.cfbgg-plan #payment img.stripe-icon {
	display: none !important;
}
.cfbgg-plan #payment li.wc_payment_method img { max-height: 22px !important; width: auto !important; }

/* No stray pseudo-element dots/markers */
.cfbgg-plan #payment ul.wc_payment_methods::before,
.cfbgg-plan #payment ul.wc_payment_methods li::before,
.cfbgg-plan #payment li.wc_payment_method::before,
.cfbgg-plan #payment li.wc_payment_method::after,
.cfbgg-plan #payment li.wc_payment_method > label::before,
.cfbgg-plan #payment label[for^="payment_method"]::before {
	content: none !important;
	display: none !important;
	background: none !important;
	border: none !important;
	width: 0 !important;
	height: 0 !important;
}
.cfbgg-plan #payment ul.wc_payment_methods li::marker,
.cfbgg-plan #payment li.wc_payment_method::marker {
	content: "" !important;
	color: transparent !important;
	font-size: 0 !important;
}

/* ============================================================
   CARD FIELD (Stripe UPE) — flattened, framed dark
   ============================================================ */
/* Show the payment box only for the selected method */
.cfbgg-plan #payment li.wc_payment_method input[type="radio"]:checked ~ .payment_box {
	display: block !important;
}
/* Payment box: part of the tile, not a box-in-a-box */
.cfbgg-plan #payment .payment_box,
.cfbgg-plan #payment li.wc_payment_method > .payment_box {
	flex: 1 1 100% !important;
	width: 100% !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 12px 0 0 !important;
	box-shadow: none !important;
}
.cfbgg-plan #payment .payment_box::before { display: none !important; }
.cfbgg-plan #payment .payment_box p { margin: 8px 0 0 !important; }

/* Stripe UPE wrapper: strip inner panel; ensure mount height */
.cfbgg-plan #payment .wc-stripe-upe-element,
.cfbgg-plan #payment #wc-stripe-upe-form,
.cfbgg-plan #payment .wc-stripe-elements-field,
.cfbgg-plan #payment .StripeElement {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	min-height: 40px !important;
	display: block !important;
}

/* ============================================================
   CLOUDFLARE TURNSTILE — dark frame
   ============================================================ */
.cfbgg-plan #cf-turnstile-woo-checkout,
.cfbgg-plan .cf-turnstile {
	background: transparent !important;
	border: none !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	min-height: 0 !important;
	color-scheme: dark;
	display: inline-block !important;
}
.cfbgg-plan .cf-turnstile-br,
.cfbgg-plan br.cf-turnstile-br-woo-checkout { display: none !important; }

/* ============================================================
   PLACE ORDER BUTTON
   ============================================================ */
.cfbgg-plan .form-row.place-order { margin: 20px 0 4px !important; padding: 0 !important; clear: both !important; overflow: visible !important; float: none !important; }
/* WooCommerce core sets #place_order to float:right, which breaks the full-width
   layout and makes the button look oddly spaced / clipped. Force it back into
   normal flow as a full-width block. */
.cfbgg-plan #place_order,
.cfbgg-plan button#place_order,
.woocommerce .cfbgg-plan #payment #place_order {
	float: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}
.cfbgg-plan #place_order,
.cfbgg-plan button#place_order {
	background: var(--cfb-blue) !important;
	color: #fff !important;
	font-family: "Oswald", sans-serif !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	border-radius: 8px !important;
	border: none !important;
	width: 100% !important;
	padding: 16px 14px !important;
	line-height: 1 !important;
	font-size: 16px !important;
	margin: 0 !important;
}
.cfbgg-plan #place_order:hover { background: var(--cfb-blue-hi) !important; }
.cfbgg-plan #place_order.cfbgg-disabled,
.cfbgg-plan #place_order:disabled {
	opacity: 0.55 !important;
	cursor: not-allowed !important;
}

/* ============================================================
   NOTICES / PRIVACY
   ============================================================ */
.cfbgg-plan .woocommerce-info,
.cfbgg-plan .woocommerce-message,
.cfbgg-plan .woocommerce-error {
	background: var(--cfb-surface) !important;
	color: var(--cfb-text) !important;
	border-top-color: var(--cfb-blue) !important;
}
.cfbgg-plan .woocommerce-privacy-policy-text,
.cfbgg-plan .woocommerce-privacy-policy-text p,
.cfbgg-plan .woocommerce-terms-and-conditions-wrapper {
	color: var(--cfb-faint) !important;
}

/* ============================================================
   WIDTHS / RESPONSIVE
   ============================================================ */
.cfbgg-plan #customer_details,
.cfbgg-plan #order_review,
.cfbgg-plan .woocommerce-checkout-review-order,
.cfbgg-plan #payment,
.cfbgg-plan .place-order {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
@media (max-width: 480px) {
	.cfbgg-plan__price { font-size: 16px; }
}
