/**
 * Product page: Add-to-Cart area styling.
 *
 * Restyling for the "All Products for WooCommerce Subscriptions" (APFS)
 * radio options and the WooCommerce quantity / add-to-cart button.
 */

.wcsatt-options-wrapper {
	margin-bottom: 1.5em;
}

.wcsatt-options-prompt-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 1em 0;
}

ul.wcsatt-options-prompt-radios {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

ul.wcsatt-options-prompt-radios li.wcsatt-options-prompt-radio {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #f5f5f5;
	transition: border-color 0.2s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

ul.wcsatt-options-prompt-radios li.wcsatt-options-prompt-radio:hover {
	border-color: #ccc;
}

ul.wcsatt-options-prompt-radios li.wcsatt-options-prompt-radio:has(input.wcsatt-options-prompt-action-input:checked) {
	border-color: #6b3a2a;
	background: #faf6f4;
}

ul.wcsatt-options-prompt-radios li label.wcsatt-options-prompt-label {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.875em 1em;
	cursor: pointer;
	font-weight: 500;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
}

ul.wcsatt-options-prompt-radios li label input[type="radio"].wcsatt-options-prompt-action-input {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #ccc;
	border-radius: 50%;
	flex-shrink: 0;
	position: relative;
	cursor: pointer;
	transition: border-color 0.2s ease;
	margin: 0;
}

ul.wcsatt-options-prompt-radios li label input[type="radio"].wcsatt-options-prompt-action-input:checked {
	border-color: #6b3a2a;
}

ul.wcsatt-options-prompt-radios li label input[type="radio"].wcsatt-options-prompt-action-input:checked::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #6b3a2a;
}

/* Right align price and flex layout for the text */
ul.wcsatt-options-prompt-radios li label span.wcsatt-options-prompt-action {
	padding: 0;
	display: flex;
	align-items: center;
	width: 100%;
}

ul.wcsatt-options-prompt-radios li label span.wcsatt-options-prompt-action .price {
	margin-left: auto;
}

/* Save badge styling */
.yub-save-badge {
	background: #8b2e08;
	color: white;
	border-radius: 30px;
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
	font-size: 0.85em;
	display: inline-block;
	font-weight: 600;
}

/* APFS Dropdown Styling (now inside the card) */
.wcsatt-options-product-wrapper {
	display: block !important;
	height: auto !important;
	opacity: 1 !important;
	overflow: visible !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 1em 1em 3em !important; /* indent to align with text */
}

.yub-dropdown-badge-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.yub-dropdown-badge-row .yub-save-badge {
	margin-left: auto;
	margin-right: 0;
}

ul.wcsatt-options-product, .wcsatt-options-product-dropdown {
	margin: 0 0 0rem 0;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0rem;
	margin-left: 0px;
}

.wcsatt-options-product-dropdown-label {
	display: none !important;
}

select.wcsatt-options-product-dropdown {
	width: fit-content;
	min-width: 150px;
	padding: 0.6em 2em 0.6em 0.6em;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background-color: #fff;
	font-size: 0.95em;
	color: #333;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23333333%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
	background-repeat: no-repeat;
	background-position: right 0.6em center;
	background-size: 1em;
}

select.wcsatt-options-product-dropdown:focus {
	border-color: #6b3a2a;
	outline: none;
}

/* ---- Cart row layout ---- */

.woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75em;
}

.woocommerce div.product form.cart > .wc-points-rewards-product-message,
.woocommerce div.product form.cart > .wcsatt-options-wrapper {
	flex-basis: 100%;
}

.woocommerce div.product form.cart > br {
	display: none;
}

/* ---- Quantity input ---- */

.woocommerce div.product form.cart .quantity {
	display: inline-flex;
	align-items: center;
	border: 2px solid #e0e0e0;
	border-radius: 999px;
}

.woocommerce div.product form.cart .quantity .qty {
	width: 2em;
	text-align: center;
	border: none;
	font-size: 18px;
	font-weight: 600;
	color: #000;
	padding: 0.5em 0;
	-moz-appearance: textfield;
	appearance: textfield;
	background: transparent;
}

.woocommerce div.product form.cart .quantity .qty::-webkit-inner-spin-button,
.woocommerce div.product form.cart .quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.woocommerce div.product form.cart .quantity .minus,
.woocommerce div.product form.cart .quantity .plus {
	background: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px;
	min-height: 44px;
	cursor: pointer;
	color: #6b3a2a;
	transition: opacity 0.2s ease;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	margin: 0;
	line-height: 1;
}

.woocommerce div.product form.cart .quantity .minus svg,
.woocommerce div.product form.cart .quantity .plus svg {
	stroke: #6b3a2a;
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	display: block;
}

.woocommerce div.product form.cart .quantity .minus:hover,
.woocommerce div.product form.cart .quantity .plus:hover {
	opacity: 0.7;
}

/* ---- Add to cart button ---- */

.woocommerce div.product form.cart .single_add_to_cart_button {
	flex: 1;
	background-color: #6b3a2a;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.75em 2em;
	font-size: 1em;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
	background-color: #532d20;
}

.woocommerce div.product form.cart .single_add_to_cart_button:active {
	transform: scale(0.98);
}
