/* WC Product Addons — storefront */

.wcpa-addons-form {
	--wcpa-border: #e2e5e9;
	--wcpa-border-strong: #c9ced6;
	--wcpa-accent: #2b6cb0;
	--wcpa-accent-soft: #eaf2fb;
	--wcpa-text: #1f2933;
	--wcpa-muted: #6b7280;
	--wcpa-radius: 10px;

	margin: 0 0 24px;
	clear: both;
}

.wcpa-addons-form * {
	box-sizing: border-box;
}

.wcpa-addon-field {
	margin: 0 0 20px;
}

.wcpa-addon-field__head {
	margin-bottom: 8px;
}

.wcpa-addon-field__label {
	display: block;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	color: var( --wcpa-text );
}

.wcpa-addon-field__label .required {
	color: #c53030;
	border: 0;
	text-decoration: none;
}

.wcpa-addon-field__desc {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var( --wcpa-muted );
}

/* Choices */

.wcpa-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wcpa-choice {
	position: relative;
	margin: 0;
	flex: 0 1 auto;
	cursor: pointer;
	display: block;
}

.wcpa-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.wcpa-choice__box {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 62px;
	padding: 10px 16px;
	border: 1px solid var( --wcpa-border );
	border-radius: var( --wcpa-radius );
	background: #fff;
	color: var( --wcpa-text );
	line-height: 1.3;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.wcpa-choice:hover .wcpa-choice__box {
	border-color: var( --wcpa-border-strong );
}

.wcpa-choice input:focus-visible + .wcpa-choice__box {
	outline: 2px solid var( --wcpa-accent );
	outline-offset: 2px;
}

.wcpa-choice.is-selected .wcpa-choice__box,
.wcpa-choice input:checked + .wcpa-choice__box {
	border-color: var( --wcpa-accent );
	background: var( --wcpa-accent-soft );
	box-shadow: inset 0 0 0 1px var( --wcpa-accent );
}

.wcpa-choice__label {
	font-weight: 600;
	font-size: 15px;
}

.wcpa-choice__price {
	font-size: 13px;
	color: var( --wcpa-muted );
	white-space: nowrap;
}

.wcpa-choice.is-selected .wcpa-choice__price,
.wcpa-choice input:checked + .wcpa-choice__box .wcpa-choice__price {
	color: var( --wcpa-accent );
}

.wcpa-choice__price .amount,
.wcpa-choice__price bdi {
	font-weight: 600;
}

/* Text fields */

.wcpa-addons-form .wcpa-text,
.wcpa-addons-form .wcpa-textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var( --wcpa-border );
	border-radius: var( --wcpa-radius );
	background: #fff;
	color: var( --wcpa-text );
	font-size: 15px;
	line-height: 1.5;
}

.wcpa-addons-form .wcpa-text:focus,
.wcpa-addons-form .wcpa-textarea:focus {
	border-color: var( --wcpa-accent );
	outline: none;
	box-shadow: 0 0 0 2px var( --wcpa-accent-soft );
}

.wcpa-addons-form .wcpa-textarea {
	resize: vertical;
	min-height: 96px;
}

/* Summary */

.wcpa-summary {
	margin-top: 18px;
	padding: 14px 16px;
	border: 1px solid var( --wcpa-border );
	border-radius: var( --wcpa-radius );
	background: #f8fafc;
}

.wcpa-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	font-size: 14px;
	color: var( --wcpa-muted );
}

.wcpa-summary__row + .wcpa-summary__row {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var( --wcpa-border );
}

.wcpa-summary__addons {
	text-align: right;
	color: var( --wcpa-text );
}

.wcpa-summary__row--total {
	font-size: 16px;
	font-weight: 700;
	color: var( --wcpa-text );
}

.wcpa-summary__total {
	white-space: nowrap;
}

@media screen and ( max-width: 600px ) {
	.wcpa-choices {
		gap: 8px;
	}

	.wcpa-choice {
		flex: 1 1 calc( 50% - 4px );
	}

	.wcpa-choice__box {
		justify-content: space-between;
		width: 100%;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.wcpa-choice__box {
		transition: none;
	}
}

/* Date & time picker */

.wcpa-datetime__section + .wcpa-datetime__section {
	margin-top: 18px;
}

.wcpa-datetime__heading {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	font-size: 14px;
	color: var( --wcpa-text );
}

.wcpa-dates {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
}

.wcpa-dates__track {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 4px 2px;
	flex: 1 1 auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.wcpa-dates__track::-webkit-scrollbar {
	height: 4px;
}

.wcpa-dates__track::-webkit-scrollbar-thumb {
	background: var( --wcpa-border-strong );
	border-radius: 4px;
}

.wcpa-dates__nav {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var( --wcpa-border );
	border-radius: 50%;
	background: #fff;
	color: var( --wcpa-text );
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.wcpa-dates__nav:hover {
	border-color: var( --wcpa-accent );
	color: var( --wcpa-accent );
	background: #fff;
}

.wcpa-dates__nav[disabled] {
	opacity: 0.35;
	cursor: default;
}

.wcpa-date {
	position: relative;
	margin: 0;
	cursor: pointer;
	flex: 0 0 auto;
}

.wcpa-date input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.wcpa-date__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	width: 58px;
	height: 68px;
	border: 1px solid var( --wcpa-border );
	border-radius: 999px;
	background: #fff;
	line-height: 1.1;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wcpa-date:hover .wcpa-date__box {
	border-color: var( --wcpa-border-strong );
}

.wcpa-date input:focus-visible + .wcpa-date__box {
	outline: 2px solid var( --wcpa-accent );
	outline-offset: 2px;
}

.wcpa-date.is-selected .wcpa-date__box,
.wcpa-date input:checked + .wcpa-date__box {
	border-color: var( --wcpa-accent );
	background: var( --wcpa-accent-soft );
	box-shadow: inset 0 0 0 1px var( --wcpa-accent );
}

.wcpa-date__dow {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var( --wcpa-muted );
}

.wcpa-date__day {
	font-size: 17px;
	font-weight: 700;
	color: var( --wcpa-text );
}

.wcpa-date__month {
	font-size: 10px;
	text-transform: uppercase;
	color: var( --wcpa-muted );
}

.wcpa-date.is-selected .wcpa-date__dow,
.wcpa-date.is-selected .wcpa-date__day,
.wcpa-date.is-selected .wcpa-date__month {
	color: var( --wcpa-accent );
}

.wcpa-choices--time .wcpa-choice {
	flex: 0 0 auto;
}

.wcpa-choices--time .wcpa-choice__box {
	padding: 9px 14px;
	border-radius: 999px;
}

.wcpa-choices--time .wcpa-choice__label {
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

@media screen and ( max-width: 600px ) {
	.wcpa-dates__nav {
		display: none;
	}

	.wcpa-choices--time .wcpa-choice {
		flex: 0 0 auto;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.wcpa-dates__track {
		scroll-behavior: auto;
	}

	.wcpa-date__box {
		transition: none;
	}
}
