/* ReGifted Butiksfilter – ändra färgerna här om ni vill */
.rgbf {
	--rgbf-accent: #1e56e9;
	--rgbf-accent-text: #ffffff;
	--rgbf-green: #0ca387;
	--rgbf-chip-bg: #f6f6f9;
	--rgbf-muted: #6b7280;
	--rgbf-border: rgba(0, 0, 0, 0.08);
	--rgbf-radius: 18px;
	margin: 0 0 3rem;
}

.rgbf .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* Sök */
.rgbf-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.rgbf-search {
	flex: 1; display: flex; align-items: center; gap: 10px;
	padding: 0 16px; border: 1px solid var(--rgbf-border); border-radius: 999px;
	background: #fff; color: var(--rgbf-muted);
}
.rgbf-search:focus-within { border-color: var(--rgbf-accent); box-shadow: 0 0 0 3px rgba(30, 86, 233, .15); }
.rgbf-search input {
	flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important;
	padding: 14px 0 !important; font-size: 16px; color: inherit; box-shadow: none !important;
}
.rgbf-search input { color: #111; }

.rgbf-toggle {
	display: none; align-items: center; gap: 8px; min-height: 48px;
	border: 1px solid var(--rgbf-border); background: #fff; color: #111;
	border-radius: 999px; padding: 0 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
/* Utan egen sökruta behövs raden bara för Filter-knappen på mobil */
.rgbf--no-search .rgbf-bar { display: none; }

/* Filtergrupper */
.rgbf-filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.rgbf-group { display: flex; align-items: baseline; gap: 14px; }
.rgbf-group-title {
	flex: 0 0 130px; font-size: 13px; font-weight: 700; text-transform: uppercase;
	letter-spacing: .04em; color: var(--rgbf-muted);
}
.rgbf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rgbf-chip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
	padding: 6px 14px; border: 1px solid transparent; border-radius: 999px;
	background: var(--rgbf-chip-bg); color: #1f2937; font-size: 14px; line-height: 1.2;
	cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.rgbf-chip:hover:not(:disabled) { border-color: var(--rgbf-accent); }
.rgbf-chip:focus-visible { outline: 2px solid var(--rgbf-accent); outline-offset: 2px; }
.rgbf-chip[aria-pressed="true"] { background: var(--rgbf-accent); color: var(--rgbf-accent-text); }
.rgbf-chip:disabled { opacity: .4; cursor: default; }
.rgbf-chip-count { font-size: 12px; opacity: .65; }
.rgbf-chip-count:empty { display: none; }

/* Status */
.rgbf-status {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 0; margin-bottom: 14px; border-top: 1px solid var(--rgbf-border);
}
.rgbf-result { margin: 0; font-size: 14px; color: var(--rgbf-muted); }
.rgbf-reset {
	border: 0; background: none; padding: 4px 0; color: var(--rgbf-accent);
	font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer;
}

/* Kort */
.rgbf-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}
.rgbf-card[hidden] { display: none; }
.rgbf-card a {
	display: flex; flex-direction: column; height: 100%; overflow: hidden;
	background: #fff; border-radius: var(--rgbf-radius); border-bottom: 1px solid rgba(0,0,0,.07);
	box-shadow: 0 5px 20px rgba(0, 0, 0, .05); color: inherit; text-decoration: none;
	transition: transform .15s, box-shadow .15s;
}
.rgbf-card a:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .09); }
.rgbf-card a:focus-visible { outline: 2px solid var(--rgbf-accent); outline-offset: 3px; }
.rgbf-img { position: relative; aspect-ratio: 16 / 10; background: var(--rgbf-chip-bg); }
/* Inlösen-märken ovanpå bilden: "I butik" / "Online" */
.rgbf-redeem { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.rgbf-redeem-item {
	display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
	background: rgba(255, 255, 255, .95); color: #111; font-size: 12px; font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.rgbf-redeem-item svg { color: var(--rgbf-accent); flex: none; }
.rgbf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rgbf-body { padding: 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rgbf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rgbf-tag {
	font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
	background: rgba(12, 163, 135, .12); color: #07705d;
}
.rgbf-title { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.rgbf-excerpt { margin: 0; font-size: 14px; line-height: 1.45; color: var(--rgbf-muted); }
.rgbf-places {
	margin: auto 0 0; padding-top: 4px; display: flex; align-items: center; gap: 5px;
	font-size: 13px; color: var(--rgbf-muted);
}
.rgbf-places svg { color: var(--rgbf-green); flex: none; }

/* Layout: filter i vänsterkolumn */
.rgbf--sidebar .rgbf-layout {
	display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start;
}
.rgbf--sidebar .rgbf-filters {
	position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
	gap: 24px; margin: 0; padding: 22px; border-radius: var(--rgbf-radius);
	background: var(--rgbf-chip-bg);
}
.rgbf--sidebar .rgbf-group { flex-direction: column; align-items: stretch; gap: 10px; }
.rgbf--sidebar .rgbf-group-title { flex: none; }
.rgbf--sidebar .rgbf-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rgbf--sidebar .rgbf-chip { justify-content: space-between; width: 100%; padding: 8px 12px; text-align: left; }
.rgbf--sidebar .rgbf-chip-label { min-width: 0; overflow-wrap: anywhere; }
.rgbf--sidebar .rgbf-status { border-top: 0; padding-top: 0; }
.rgbf--sidebar .rgbf-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.admin-bar .rgbf--sidebar .rgbf-filters { top: 56px; }

/* Tomt läge */
.rgbf-empty {
	text-align: center; padding: 40px 20px; background: var(--rgbf-chip-bg);
	border-radius: var(--rgbf-radius);
}
.rgbf-empty p { margin: 0 0 8px; }
.rgbf-empty a { color: var(--rgbf-accent); }

/* Mobil: filtren fälls ihop bakom en knapp */
@media (max-width: 900px) {
	.rgbf--sidebar .rgbf-layout { display: block; }
	.rgbf--sidebar .rgbf-filters { position: static; max-height: none; margin-bottom: 18px; }
	.rgbf--sidebar .rgbf-chips { display: flex; flex-wrap: wrap; }
	.rgbf--sidebar .rgbf-chip { width: auto; }
	.rgbf--sidebar.is-ready .rgbf-bar { display: flex; }
	.rgbf--sidebar.is-ready .rgbf-toggle { display: inline-flex; }
	.rgbf--sidebar.is-ready .rgbf-filters { display: none; }
	.rgbf--sidebar.is-ready .rgbf-filters.is-open { display: flex; }
}

@media (max-width: 700px) {
	.rgbf.is-ready .rgbf-bar { display: flex; }
	.rgbf.is-ready .rgbf-toggle { display: inline-flex; }
	.rgbf.is-ready .rgbf-filters { display: none; }
	.rgbf.is-ready .rgbf-filters.is-open { display: flex; }
	.rgbf-group { flex-direction: column; gap: 8px; }
	.rgbf-group-title { flex: none; }
	.rgbf-grid { grid-template-columns: 1fr; }
}
