/**
 * Offer size chooser overlay.
 *
 * Printed on shop archives that carry offer=true (inc/shop-filters.php). Matches
 * the old gentli.com box: a light backdrop the shop shows faintly through, a
 * black rounded panel sized to its content, white sizes in a five-column grid
 * with 24px gaps, the picked one bright and underlined, a small grey confirm.
 */
.oxa-offer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(255, 255, 255, 0.8);
	overflow-y: auto;
}

.oxa-offer__card {
	position: relative;
	width: max-content;
	max-width: 92vw;
	max-height: 90vh;
	overflow-y: auto;
	/* Opacity on the whole card, not an rgba fill: the shop shows through and the
	 * white text reads slightly grey, the way the old box did. */
	background: #000;
	opacity: 0.8;
	border-radius: 8px;
	/* The reference's 40px 112px, but only where there is room for it. */
	padding: 32px 24px;
}

@media (min-width: 768px) {
	.oxa-offer__card {
		padding: 40px 112px;
	}
}

.oxa-offer__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.oxa-offer__close:hover {
	opacity: 0.75;
}

.oxa-offer__title {
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	color: #fff;
}

/* Content-sized, not stretched to the box: five columns of at least 40px with
 * 24px gaps, centred within the panel. */
.oxa-offer__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(36px, max-content));
	column-gap: 24px;
	row-gap: 20px;
	justify-content: center;
	margin: 0;
}

.oxa-offer__size {
	appearance: none;
	border: 0;
	background: transparent;
	color: #e5e5e5;
	padding: 4px 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: color 0.12s;
}

.oxa-offer__size:hover {
	color: #fff;
}

.oxa-offer__size.is-selected {
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: #fff;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

/* Small, centred, fits its text — never the full width of the panel, the same
 * size on every screen, 24px below the grid. */
.oxa-offer__submit {
	appearance: none;
	display: block;
	width: fit-content;
	margin: 20px auto 0;
	border: 0;
	border-radius: 8px;
	padding: 10px 24px;
	background: #555;
	color: #ddd;
	font-size: 15px;
	font-weight: 600;
	cursor: not-allowed;
	transition: background 0.12s, color 0.12s;
}

.oxa-offer__submit:not(:disabled) {
	background: #777;
	color: #fff;
	cursor: pointer;
}

.oxa-offer__submit:not(:disabled):hover {
	background: #888;
}

@media (max-width: 767px) {
	/* A comfortable tap target for the close cross. */
	.oxa-offer__close {
		width: 44px;
		height: 44px;
	}
}
