/*
 * Options linked to a ticket on the product page (classic shop).
 * One card per option: checkbox + name, image, description, price. Override the variables below in the theme.
 */
.aerosi-product-options {
	--aerosi-po-accent: #2b6cb0;
	--aerosi-po-border: #9aa5b4;
	--aerosi-po-text: inherit;
	--aerosi-po-muted: #4a4a4a;
	--aerosi-po-background: #fff;
	--aerosi-po-radius: 6px;
	--aerosi-po-card-width: 340px;
	--aerosi-po-image-size: 110px;
	--aerosi-po-gap: 20px;
	--aerosi-po-name-size: 18px;
	--aerosi-po-price-size: 18px;

	clear: both;
	width: 100%;
	margin: 0 0 20px;
}

.aerosi-product-options__title {
	margin: 0 0 15px;
}

.aerosi-product-options__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aerosi-po-gap);
	/* Room for the check badge of the cards of the first row. */
	padding-top: 10px;
}

.aerosi-product-options__option {
	position: relative;
	width: var(--aerosi-po-card-width);
	max-width: 100%;
}

/* Card */
.aerosi-product-options__label {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	margin: 0;
	padding: 14px 16px 16px;
	border: 1px solid var(--aerosi-po-border);
	border-radius: var(--aerosi-po-radius);
	background: var(--aerosi-po-background);
	color: var(--aerosi-po-text);
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.aerosi-product-options__label:hover,
.aerosi-product-options__option.is-selected .aerosi-product-options__label {
	border-color: var(--aerosi-po-accent);
}

.aerosi-product-options__label:focus-within {
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--aerosi-po-accent) 30%, transparent);
}

/* Check badge of a selected option */
.aerosi-product-options__option.is-selected .aerosi-product-options__label::after {
	content: '';
	position: absolute;
	top: -10px;
	right: -10px;
	width: 22px;
	height: 22px;
	border: 2px solid var(--aerosi-po-background);
	border-radius: 50%;
	background-color: var(--aerosi-po-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 70%;
	box-sizing: content-box;
}

.aerosi-product-options__header {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Drawn by the plugin: themes often restyle checkboxes (e.g. a bare check mark without box). */
.aerosi-product-options__check {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 2px solid var(--aerosi-po-accent);
	border-radius: 3px;
	background: var(--aerosi-po-background);
	box-shadow: none;
	cursor: pointer;
}

/* More specific than the themes' `input[type="checkbox"]:checked::before` check marks (e.g. Twenty Twenty). */
.aerosi-product-options input.aerosi-product-options__check::before,
.aerosi-product-options input.aerosi-product-options__check::after,
.aerosi-product-options input.aerosi-product-options__check:checked::before,
.aerosi-product-options input.aerosi-product-options__check:checked::after {
	content: none;
	display: none;
}

.aerosi-product-options__check:checked {
	background-color: var(--aerosi-po-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 80%;
}

.aerosi-product-options__check:disabled {
	cursor: not-allowed;
}

.aerosi-product-options__name {
	font-size: var(--aerosi-po-name-size);
	line-height: 1.3;
}

.aerosi-product-options__media {
	display: flex;
	justify-content: center;
}

.aerosi-product-options__image {
	width: auto;
	max-width: 100%;
	height: var(--aerosi-po-image-size);
	object-fit: contain;
}

.aerosi-product-options__description {
	color: var(--aerosi-po-muted);
	font-size: 14px;
	line-height: 1.6;
}

.aerosi-product-options__hint,
.aerosi-product-options__stock {
	color: var(--aerosi-po-muted);
	font-size: 12px;
}

.aerosi-product-options__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
}

.aerosi-product-options__price {
	font-size: var(--aerosi-po-price-size);
	font-weight: 700;
}

.aerosi-product-options__price del {
	opacity: .5;
	font-weight: 400;
}

.aerosi-product-options__qty {
	width: 5em;
	min-width: 50px;
}

.aerosi-product-options__option.is-out-of-stock .aerosi-product-options__label {
	opacity: .5;
	cursor: not-allowed;
}

/* Totals */
.aerosi-product-options__totals {
	width: auto;
	margin: 20px 0 0;
	border: 0;
	font-size: 18px;
	line-height: 36px;
}

.aerosi-product-options__totals th,
.aerosi-product-options__totals td {
	padding: 0 12px 0 0;
	border: 0;
	background: none;
	text-align: left;
}

.aerosi-product-options__totals-order {
	font-weight: 700;
}

/*
 * Cart page: options offered on the cart (option setting "Proposée sur : Panier").
 */
.aerosi-cart-options {
	--aerosi-co-accent: #2b6cb0;
	--aerosi-co-background: #fff;
	--aerosi-co-muted: #4a4a4a;
	--aerosi-co-radius: 6px;
	--aerosi-co-image-width: 120px;
	--aerosi-co-shadow: 0 4px 16px rgba(0, 0, 0, .08);

	clear: both;
	width: 100%;
	margin: 0 0 30px;
}

.aerosi-cart-options__title {
	margin: 0 0 15px;
}

.aerosi-cart-options__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.aerosi-cart-options__card {
	display: flex;
	align-items: stretch;
	margin: 0;
	overflow: hidden;
	border-radius: var(--aerosi-co-radius);
	background: var(--aerosi-co-background);
	box-shadow: var(--aerosi-co-shadow);
}

.aerosi-cart-options__media {
	flex: 0 0 var(--aerosi-co-image-width);
}

.aerosi-cart-options__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aerosi-cart-options__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 18px 22px;
}

.aerosi-cart-options__name {
	margin: 0;
	font-size: 22px;
	line-height: 1.25;
}

.aerosi-cart-options__description {
	margin: 0;
	color: var(--aerosi-co-muted);
	font-size: 13px;
	line-height: 1.6;
}

.aerosi-cart-options__price {
	margin: 4px 0;
	font-size: 18px;
	font-weight: 700;
}

.aerosi-cart-options__button {
	margin-top: auto;
	background-color: var(--aerosi-co-accent);
	color: #fff;
}

@media (max-width: 480px) {
	.aerosi-cart-options__media {
		flex-basis: 90px;
	}

	.aerosi-cart-options__body {
		padding: 14px 16px;
	}
}

@media (max-width: 480px) {
	.aerosi-product-options__option {
		width: 100%;
	}

	.aerosi-product-options__totals {
		font-size: 16px;
		line-height: 30px;
	}
}
