/* Locals On Location - print button and picker. */

:root {
	--lonl-accent: #2E7D3A;
	--lonl-accent-alt: #F0A818;
	--lonl-ink: #1E2B36;
	--lonl-paper: #FFFFFF;
	--lonl-line: #DCDBD3;
	--lonl-muted: #6B7A84;
}

/* ---------- button on the tile ---------- */

.lonl-print-btn {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 5;
	margin: 0;
	padding: 7px 12px;
	border: 0;
	border-radius: 2px;
	background: var(--lonl-accent-alt);
	color: #22323F;
	font: 700 12.5px/1.2 system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	letter-spacing: .03em;
	cursor: pointer;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .18s ease, transform .18s ease;
}

[data-lonl]:hover .lonl-print-btn,
[data-lonl]:focus-within .lonl-print-btn,
.lonl-print-btn:focus-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (hover: none) {
	.lonl-print-btn {
		opacity: 1;
		transform: none;
	}
}

.lonl-print-btn:hover {
	background: #D2921C;
}

/* ---------- modal ---------- */

body.lonl-modal-open {
	overflow: hidden;
}

.lonl-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.lonl-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 26, 32, .72);
}

.lonl-panel {
	position: relative;
	width: min(760px, 100%);
	max-height: 88vh;
	overflow-y: auto;
	background: var(--lonl-paper);
	color: var(--lonl-ink);
	border-radius: 4px;
	box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
	font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.lonl-close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 34px;
	height: 34px;
	border: 0;
	background: none;
	color: var(--lonl-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	border-radius: 2px;
}

.lonl-close:hover {
	color: var(--lonl-ink);
}

.lonl-body {
	padding: 24px;
}

.lonl-busy {
	text-align: center;
	color: var(--lonl-muted);
	padding: 56px 24px;
}

.lonl-head {
	display: flex;
	gap: 18px;
	align-items: center;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--lonl-line);
}

.lonl-preview {
	flex: 0 0 132px;
	background: #F1F0EA;
	padding: 8px;
	border-radius: 2px;
}

.lonl-preview img {
	display: block;
	width: 100%;
	height: 96px;
	object-fit: cover;
	border-radius: 1px;
}

.lonl-title {
	margin: 0;
	font-size: 21px;
	line-height: 1.15;
	font-weight: 800;
	color: var(--lonl-ink);
}

.lonl-dims {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--lonl-muted);
	font-variant-numeric: tabular-nums;
}

.lonl-empty {
	padding: 32px 0;
	text-align: center;
	color: var(--lonl-muted);
}

/* ---------- product rows ---------- */

.lonl-products {
	display: grid;
	gap: 0;
}

.lonl-product {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--lonl-line);
}

.lonl-product:last-child {
	border-bottom: 0;
}

.lonl-product.is-blocked {
	opacity: .55;
}

.lonl-product.is-added {
	background: rgba(46, 125, 58, .06);
}

.lonl-product-thumb {
	width: 72px;
	height: 72px;
	background: #F1F0EA;
	border-radius: 2px;
	overflow: hidden;
}

.lonl-product-thumb.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
	background-size: 220% 100%;
	animation: lonl-shimmer 1.1s linear infinite;
}

.lonl-product-thumb {
	position: relative;
}

.lonl-product-thumb.is-mockup {
	background: #FFFFFF;
}

.lonl-product-thumb.is-mockup img {
	object-fit: contain;
}

@keyframes lonl-shimmer {
	from { background-position: 140% 0; }
	to   { background-position: -40% 0; }
}

.lonl-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lonl-product-name {
	margin: 0;
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.2;
}

.lonl-product-blurb,
.lonl-product-price {
	margin: 4px 0 0;
	font-size: 13.5px;
	color: var(--lonl-muted);
}

.lonl-product-price {
	color: var(--lonl-ink);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.lonl-error {
	margin: 6px 0 0;
	font-size: 13px;
	color: #B32D2E;
}

.lonl-product-action {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 7px;
	min-width: 168px;
}

.lonl-variation {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--lonl-line);
	border-radius: 2px;
	background: #fff;
	color: var(--lonl-ink);
	font-size: 14px;
}

.lonl-variation.lonl-needed {
	border-color: var(--lonl-accent-alt);
	box-shadow: 0 0 0 2px rgba(240, 168, 24, .3);
}

.lonl-add {
	padding: 10px 16px;
	border: 0;
	border-radius: 2px;
	background: var(--lonl-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.lonl-add:hover:not(:disabled) {
	background: #22622D;
}

.lonl-add:disabled {
	background: #C6CBC8;
	color: #5C6B75;
	cursor: not-allowed;
}

.lonl-why {
	margin: 0;
	font-size: 12px;
	color: var(--lonl-muted);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------- added bar ---------- */

.lonl-addedbar {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 24px;
	background: var(--lonl-accent);
	color: #fff;
	font-weight: 600;
}

.lonl-cartlink,
.lonl-keep {
	margin-left: auto;
	padding: 9px 15px;
	border: 0;
	border-radius: 2px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.lonl-cartlink {
	background: var(--lonl-accent-alt);
	color: #22323F;
}

.lonl-keep {
	margin-left: 0;
	background: rgba(255, 255, 255, .16);
	color: #fff;
}

/* ---------- cart ---------- */

.lonl-cart-note {
	color: #6B7A84;
}

@media (max-width: 620px) {
	.lonl-product {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.lonl-product-action {
		grid-column: 1 / -1;
		min-width: 0;
	}

	.lonl-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.lonl-preview {
		flex: none;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lonl-print-btn {
		transition: none;
	}
}
