/**
 * COSMOS checkout correction layer.
 * Kept intentionally narrow so Stripe's secure iframe remains untouched.
 */

.wp-block-woocommerce-checkout {
	--vfc-checkout-surface: #0b1024;
	--vfc-checkout-surface-raised: #10162d;
	--vfc-checkout-text: #f4f2ed;
	--vfc-checkout-muted: #aeb4c7;
	--vfc-checkout-line: rgba(244, 242, 237, 0.2);
	--vfc-checkout-focus: #91a0ff;
}

.vaffyn-usd-reference {
	color: #aeb4c7;
	display: block;
	font-family: var(--wp--preset--font-family--sans, sans-serif);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.45;
	margin-top: 0.35rem;
}

/* Text fields and selects: a dark, readable surface with one radius system. */
.wp-block-woocommerce-checkout .wc-block-components-text-input input,
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
.wp-block-woocommerce-checkout textarea {
	background: var(--vfc-checkout-surface) !important;
	border: 1px solid var(--vfc-checkout-line) !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	color: var(--vfc-checkout-text) !important;
	min-height: 52px !important;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.wp-block-woocommerce-checkout .wc-block-components-text-input input:hover,
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:hover,
.wp-block-woocommerce-checkout textarea:hover {
	border-color: rgba(244, 242, 237, 0.38) !important;
}

.wp-block-woocommerce-checkout .wc-block-components-text-input input:focus,
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wp-block-woocommerce-checkout textarea:focus {
	background: var(--vfc-checkout-surface-raised) !important;
	border-color: var(--vfc-checkout-focus) !important;
	box-shadow: 0 0 0 3px rgba(145, 160, 255, 0.18) !important;
	outline: 0 !important;
}

.wp-block-woocommerce-checkout .wc-block-components-text-input label,
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__label {
	color: var(--vfc-checkout-muted) !important;
	font-weight: 500 !important;
}

.wp-block-woocommerce-checkout .wc-block-components-text-input.is-active label,
.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__label {
	color: #c7ccdc !important;
}

.wp-block-woocommerce-checkout input::placeholder,
.wp-block-woocommerce-checkout textarea::placeholder {
	color: var(--vfc-checkout-muted) !important;
	opacity: 1 !important;
}

.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__expand {
	fill: var(--vfc-checkout-muted) !important;
}

/* Undo the theme's 3rem min-height on native selection controls. */
.wp-block-woocommerce-checkout input.wc-block-components-checkbox__input {
	appearance: none !important;
	-webkit-appearance: none !important;
	background: var(--vfc-checkout-surface) !important;
	border: 1px solid rgba(244, 242, 237, 0.48) !important;
	border-radius: 5px !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	flex: 0 0 20px !important;
	height: 20px !important;
	margin: 0 !important;
	min-height: 20px !important;
	min-width: 20px !important;
	padding: 0 !important;
	width: 20px !important;
}

.wp-block-woocommerce-checkout input.wc-block-components-checkbox__input:checked {
	background: var(--vfc-checkout-focus) !important;
	border-color: var(--vfc-checkout-focus) !important;
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox__mark {
	fill: #050711 !important;
	pointer-events: none;
}

.wp-block-woocommerce-checkout input.wc-block-components-radio-control__input {
	appearance: none !important;
	-webkit-appearance: none !important;
	background: var(--vfc-checkout-surface) !important;
	border: 1px solid rgba(244, 242, 237, 0.48) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	flex: 0 0 20px !important;
	height: 20px !important;
	margin: 0 !important;
	min-height: 20px !important;
	min-width: 20px !important;
	padding: 0 !important;
	width: 20px !important;
}

.wp-block-woocommerce-checkout input.wc-block-components-radio-control__input:checked {
	background: radial-gradient(circle, var(--vfc-checkout-focus) 0 4px, var(--vfc-checkout-surface) 5px) !important;
	border-color: var(--vfc-checkout-focus) !important;
}

/*
 * A single shipping rate or gateway is information, not a decision. Hide the
 * redundant outer radio only while exactly one option exists. If another
 * shipping service or payment gateway is added later, WooCommerce restores
 * the selectors automatically.
 */
.wp-block-woocommerce-checkout
	.wc-block-components-shipping-rates-control__package
	.wc-block-components-radio-control:has(> .wc-block-components-radio-control__option:only-child)
	> .wc-block-components-radio-control__option
	> input[name="radio-control-0"],
.wp-block-woocommerce-checkout
	#payment-method
	.wc-block-components-radio-control:has(> .wc-block-components-radio-control-accordion-option:only-child)
	input[name="radio-control-wc-payment-method-options"] {
	display: none !important;
}

.wp-block-woocommerce-checkout
	.wc-block-components-shipping-rates-control__package
	.wc-block-components-radio-control:has(> .wc-block-components-radio-control__option:only-child)
	> .wc-block-components-radio-control__option,
.wp-block-woocommerce-checkout
	#payment-method
	.wc-block-components-radio-control:has(> .wc-block-components-radio-control-accordion-option:only-child)
	> .wc-block-components-radio-control-accordion-option
	> .wc-block-components-radio-control__option {
	column-gap: 0 !important;
}

.wp-block-woocommerce-checkout
	#payment-method
	.wc-block-components-radio-control:has(> .wc-block-components-radio-control-accordion-option:only-child)
	.wc-block-components-radio-control-accordion-content {
	padding-left: 18px !important;
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox label,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__option {
	align-items: center !important;
	column-gap: 12px !important;
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox__label,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__label,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__secondary-label {
	color: var(--vfc-checkout-text) !important;
	line-height: 1.45 !important;
}

/* Shipping and payment choices become calm, compact cards. */
.wp-block-woocommerce-checkout .wc-block-components-radio-control,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option {
	background: rgba(11, 16, 36, 0.58) !important;
	border-color: var(--vfc-checkout-line) !important;
	border-radius: 12px !important;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__option {
	min-height: 64px !important;
	padding: 16px 18px !important;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__option-layout,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__label-group {
	min-width: 0 !important;
	width: 100% !important;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control__option--checked-option-highlighted,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	box-shadow: inset 0 0 0 1px rgba(145, 160, 255, 0.72) !important;
}

.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-content {
	padding: 0 18px 18px 50px !important;
}

.wp-block-woocommerce-checkout .wc-block-components-checkbox {
	margin-block: 18px !important;
}

@media (max-width: 600px) {
	.wp-block-woocommerce-checkout .wc-block-components-text-input input,
	.wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
	.wp-block-woocommerce-checkout textarea {
		border-radius: 9px !important;
		min-height: 50px !important;
	}

	.wp-block-woocommerce-checkout .wc-block-components-radio-control__option {
		min-height: 60px !important;
		padding: 14px !important;
	}

	.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-content {
		padding: 0 14px 14px !important;
	}

	.wp-block-woocommerce-checkout .wc-block-components-checkbox__label,
	.wp-block-woocommerce-checkout .wc-block-components-radio-control__label,
	.wp-block-woocommerce-checkout .wc-block-components-radio-control__secondary-label {
		font-size: 15px !important;
	}
}
