/**
 * Quantity offer selector styles.
 *
 * @package WooCommerceQuantityOffers
 */

.wcqo-offers {
	border: 0;
	display: grid;
	gap: 12px;
	margin: 24px 0;
	min-inline-size: 0;
	padding: 0;
}

.wcqo-offers-title {
	color: #1d2327;
	font-size: 1.125rem;
	font-weight: 700;
	margin-block-end: 4px;
	padding: 0;
}

.wcqo-offer-card {
	align-items: center;
	background: #fff;
	border: 1px solid #d9dce1;
	border-radius: 10px;
	cursor: pointer;
	display: grid;
	gap: 12px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	min-inline-size: 0;
	padding: 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wcqo-offer-card:hover {
	border-color: #2271b1;
	box-shadow: 0 6px 18px rgb(34 113 177 / 12%);
	transform: translateY(-1px);
}

.wcqo-offer-card.is-selected,
.wcqo-offer-card:has(.wcqo-offer-radio:checked) {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.wcqo-offer-card:focus-within {
	outline: 3px solid rgb(34 113 177 / 35%);
	outline-offset: 2px;
}

.wcqo-offer-radio {
	accent-color: #2271b1;
	margin: 0;
}

.wcqo-offer-radio:focus-visible {
	outline: 2px solid #1d2327;
	outline-offset: 3px;
}

.wcqo-offer-details,
.wcqo-offer-prices {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	min-inline-size: 0;
}

.wcqo-offer-details {
	align-items: center;
}

.wcqo-offer-quantity {
	color: #1d2327;
	font-size: 1rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.wcqo-offer-badge {
	background: #e9f6ee;
	border-radius: 999px;
	color: #176b3a;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 4px 8px;
	text-transform: uppercase;
}

.wcqo-offer-prices {
	align-items: baseline;
	justify-content: flex-end;
	text-align: end;
}

.wcqo-offer-price {
	color: #1d2327;
	font-size: 1.125rem;
	font-weight: 700;
}

.wcqo-checkout-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-block-start: 8px;
}

.wcqo-checkout-actions .button {
	min-block-size: 44px;
}

.wcqo-checkout-actions .button:focus-visible {
	outline: 3px solid rgb(34 113 177 / 35%);
	outline-offset: 2px;
}

.wcqo-regular-price {
	color: #646970;
	font-size: 0.875rem;
	text-decoration: line-through;
}

@media screen and (max-width: 600px) {
	.wcqo-offer-card {
		align-items: start;
		grid-template-columns: auto minmax(0, 1fr);
		padding: 14px;
	}

	.wcqo-offer-prices {
		grid-column: 2;
		justify-content: flex-start;
		text-align: start;
	}

	.wcqo-checkout-actions .button {
		flex: 1 1 100%;
	}
}

@media screen and (max-width: 360px) {
	.wcqo-offer-card {
		gap: 10px;
		grid-template-columns: 1fr;
	}

	.wcqo-offer-radio,
	.wcqo-offer-prices {
		grid-column: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcqo-offer-card {
		transition: none;
	}
}

.wcqo-popup-overlay {
	align-items: center;
	background: rgb(0 0 0 / 55%);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 16px;
	position: fixed;
	z-index: 100000;
}

.wcqo-popup-overlay[hidden] {
	display: none;
}

.wcqo-popup {
	background: #fff;
	border-radius: 10px;
	inline-size: 100%;
	max-inline-size: 420px;
	max-block-size: 90vh;
	overflow-y: auto;
	padding: 24px;
	position: relative;
}

.wcqo-popup-close {
	align-items: center;
	background: none;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	font-size: 1.5rem;
	inset-block-start: 8px;
	inset-inline-end: 8px;
	justify-content: center;
	line-height: 1;
	min-block-size: 44px;
	min-inline-size: 44px;
	padding: 4px;
	position: absolute;
}

.wcqo-popup-title {
	font-size: 1.125rem;
	margin: 0 0 16px;
}

.wcqo-popup-field {
	display: grid;
	gap: 4px;
	margin: 0 0 12px;
}

.wcqo-popup-field label {
	font-weight: 600;
}

.wcqo-popup-field input,
.wcqo-popup-field select {
	border: 1px solid #d9dce1;
	border-radius: 6px;
	box-sizing: border-box;
	min-block-size: 44px;
	padding: 10px;
	width: 100%;
}

.wcqo-popup-error {
	color: #b32d2e;
	font-size: 0.875rem;
	margin: 0 0 12px;
	min-block-size: 1.2em;
}

.wcqo-popup-submit {
	min-block-size: 44px;
	width: 100%;
}
