/* Product options on the product page (product-options.php) */

/* The add-to-cart row is a flex row (quantity + button): the fields take a
   full line of their own above it. */
.woocommerce-variation-add-to-cart:has(.cbc-po),
form.cart:has(> .cbc-po) {
	flex-wrap: wrap !important;
}

.cbc-po {
	flex: 1 1 100%;
	order: -1;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 4px 0 20px;
	font-family: "Poppins", sans-serif;
	text-align: left;
}

.cbc-po__field[hidden] {
	display: none;
}

.cbc-po .cbc-po__label,
.cbc-po legend.cbc-po__label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-family: "Poppins", sans-serif !important;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1.35;
	color: #1f2430;
}

.cbc-po__req {
	color: #b91c1c;
	text-decoration: none;
	border: 0;
}

.cbc-po__hint,
.cbc-po__price {
	font-weight: 400;
	color: #64748b;
}

.cbc-po__heading {
	margin: 4px 0 0;
	font-size: 16px;
	font-weight: 600;
	color: #1f2430;
}

.cbc-po__group {
	margin: 0;
	padding: 0;
	border: 0;
}

.cbc-po input[type="text"],
.cbc-po select,
.cbc-po textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 15px;
	letter-spacing: 0;
	color: #1f2430;
	background: #fff !important;
	border: 1px solid #d1d5db !important;
	border-radius: 10px !important;
	box-shadow: none;
}

.cbc-po input[type="text"]:focus,
.cbc-po select:focus,
.cbc-po textarea:focus {
	border-color: #0e5887 !important;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(14, 88, 135, 0.2);
}

/* Choices as buttons, like the variation options above them */
.cbc-po__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cbc-po .cbc-po__choice {
	position: relative;
	display: inline-flex;
	margin: 0;
	cursor: pointer;
}

.cbc-po .cbc-po__choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cbc-po .cbc-po__choice span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 42px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
	color: #1f2430;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.cbc-po .cbc-po__choice:hover span {
	border-color: #a31647;
}

.cbc-po .cbc-po__choice input:checked + span {
	color: #fff;
	background: #a31647;
	border-color: #a31647;
}

.cbc-po .cbc-po__choice input:checked + span .cbc-po__price {
	color: rgba(255, 255, 255, 0.85);
}

.cbc-po .cbc-po__choice input:focus-visible + span {
	outline: 3px solid rgba(14, 88, 135, 0.35);
	outline-offset: 2px;
}

.cbc-po .cbc-po__choice input:disabled + span {
	color: #9ca3af;
	background: #f8fafc;
	cursor: not-allowed;
}

.cbc-po__help {
	margin: 6px 0 0;
	font-size: 13px;
	color: #64748b;
}

.cbc-po__field.has-error input[type="text"],
.cbc-po__field.has-error select,
.cbc-po__field.has-error textarea {
	border-color: #dc2626 !important;
}

.cbc-po__error {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 500;
	color: #b91c1c;
}

.cbc-po__total {
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding: 10px 14px;
	font-size: 14px;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

.cbc-po__total[hidden] {
	display: none;
}
