/* Local Market Prices - front-end styles */
.lmp-wrap {
	--lmp-accent: #1f7a4d;
	--lmp-head-bg: #f4f6f3;
	--lmp-text: #1d2320;
	--lmp-muted: #6b736e;
	--lmp-border: #e2e6e1;
	--lmp-radius: 12px;
	color: var(--lmp-text);
	font-size: 15px;
	line-height: 1.45;
}

.lmp-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.lmp-search {
	position: relative;
	flex: 1 1 240px;
}

.lmp-search__icon {
	position: absolute;
	left: 12px;
	top: 50%;
	width: 18px;
	height: 18px;
	transform: translateY(-50%);
	color: var(--lmp-muted);
	pointer-events: none;
}

.lmp-search__input,
.lmp-filter {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border: 1px solid var(--lmp-border);
	border-radius: var(--lmp-radius);
	background: #fff;
	color: inherit;
	font: inherit;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.lmp-search__input {
	padding-left: 40px;
}

.lmp-filter {
	flex: 0 1 220px;
	width: auto;
	min-width: 180px;
}

.lmp-search__input:focus,
.lmp-filter:focus {
	border-color: var(--lmp-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lmp-accent) 18%, transparent);
}

.lmp-spinner {
	position: absolute;
	right: 12px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid var(--lmp-border);
	border-top-color: var(--lmp-accent);
	border-radius: 50%;
	opacity: 0;
	transition: opacity .15s ease;
}

.lmp-spinner.is-active {
	opacity: 1;
	animation: lmp-spin .7s linear infinite;
}

@keyframes lmp-spin {
	to { transform: rotate(360deg); }
}

.lmp-table-scroll {
	overflow-x: auto;
	border: 1px solid var(--lmp-border);
	border-radius: var(--lmp-radius);
	transition: opacity .15s ease;
}

.lmp-table-scroll.is-loading {
	opacity: .55;
}

.lmp-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	background: #fff;
}

.lmp-table th,
.lmp-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--lmp-border);
	vertical-align: middle;
}

.lmp-table thead th {
	background: var(--lmp-head-bg);
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--lmp-muted);
	white-space: nowrap;
}

.lmp-table tbody tr:last-child td {
	border-bottom: 0;
}

.lmp-table tbody tr:hover {
	background: color-mix(in srgb, var(--lmp-accent) 5%, #fff);
}

.lmp-cell--product {
	display: table-cell;
	white-space: nowrap;
}

.lmp-thumb {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	object-fit: cover;
	margin-right: 10px;
	vertical-align: middle;
}

.lmp-product-name {
	color: inherit;
	font-weight: 600;
	text-decoration: none;
}

.lmp-product-name:hover {
	color: var(--lmp-accent);
	text-decoration: underline;
}

.lmp-cell--price {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

.lmp-badge {
	display: inline-block;
	margin: 2px 4px 2px 0;
	padding: 3px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--lmp-accent) 12%, #fff);
	color: var(--lmp-accent);
	font-size: 12px;
	font-weight: 600;
}

.lmp-trend {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.lmp-trend--up { color: #b3261e; }
.lmp-trend--down { color: #1f7a4d; }
.lmp-trend--stable { color: var(--lmp-muted); }

.lmp-empty {
	margin: 0;
	padding: 24px 16px;
	text-align: center;
	color: var(--lmp-muted);
	background: #fff;
}

@media (max-width: 600px) {
	.lmp-table th,
	.lmp-table td { padding: 10px; }
	.lmp-filter { flex: 1 1 100%; width: 100%; }
}
