.sbrd-post-collections {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.sbrd-post-collections__toggle {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 5px 10px;
	border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
	color: var(--text-sec);
	font-size: 0.8125rem;
	font-weight: 650;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.sbrd-post-collections--compact .sbrd-post-collections__toggle {
	min-height: 28px;
	padding: 4px 8px;
	font-size: 0.75rem;
}

.sbrd-post-collections[data-active-count]:not([data-active-count="0"]) .sbrd-post-collections__toggle {
	border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
	background: color-mix(in srgb, var(--accent) 13%, var(--bg-surface));
	color: color-mix(in srgb, var(--accent) 28%, var(--text));
}

.sbrd-post-collections__toggle:hover,
.sbrd-post-collections__toggle:focus-visible,
.sbrd-post-collections.is-open .sbrd-post-collections__toggle {
	border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
	background: color-mix(in srgb, var(--accent) 13%, var(--bg-surface));
	color: var(--text);
	outline: none;
}

.sbrd-post-collections--guest .sbrd-post-collections__toggle {
	border-color: color-mix(in srgb, var(--border) 88%, var(--text-muted));
}

.sbrd-post-collections--guest .sbrd-post-collections__toggle:focus-visible {
	border-style: dashed;
}

.sbrd-post-collections__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 4px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent) 78%, var(--bg-card));
	color: var(--on-emphasis, #1a120c);
	font-size: 0.65rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.sbrd-post-collections__chevron {
	flex-shrink: 0;
	opacity: 0.72;
	transition: transform 0.16s ease;
}

.sbrd-post-collections.is-open .sbrd-post-collections__chevron {
	transform: rotate(180deg);
}

.sbrd-post-collections__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 120;
	display: none;
	flex-direction: column;
	gap: 2px;
	min-width: 196px;
	padding: 6px;
	border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--bg-card) 98%, var(--bg-surface));
	box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.28));
}

.sbrd-post-collections__menu:not([hidden]) {
	display: flex;
}

.sbrd-post-collections__menu.is-portal,
.sbrd-post-collections__guest-panel.is-portal {
	position: fixed;
	top: auto;
	right: auto;
	left: 0;
	z-index: calc(var(--sbrd-header-z, 130) + 80);
	margin: 0;
}

.sbrd-post-collections__menu.is-flip-up {
	top: auto;
	bottom: calc(100% + 6px);
}

.sbrd-post-collections--single .sbrd-post-collections__menu:not(.is-portal) {
	right: 0;
	left: auto;
}

.sbrd-post-collections__guest-panel {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 120;
	display: none;
	flex-direction: column;
	gap: 10px;
	min-width: 240px;
	max-width: min(280px, calc(100vw - 24px));
	padding: 12px 14px;
	border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--bg-card) 98%, var(--bg-surface));
	box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.28));
}

.sbrd-post-collections__guest-panel:not([hidden]) {
	display: flex;
}

.sbrd-post-collections__guest-panel.is-flip-up {
	top: auto;
	bottom: calc(100% + 6px);
}

.sbrd-post-collections__guest-title {
	margin: 0;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
}

.sbrd-post-collections__guest-body {
	margin: 0;
	color: var(--text-sec);
	font-size: 0.8125rem;
	line-height: 1.45;
}

.sbrd-post-collections__guest-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.sbrd-post-collections__login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 6px 14px;
	border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--border));
	border-radius: 8px;
	background: color-mix(in srgb, var(--accent) 18%, var(--bg-surface));
	color: color-mix(in srgb, var(--accent) 24%, var(--text));
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sbrd-post-collections__login:hover,
.sbrd-post-collections__login:focus-visible {
	border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
	background: color-mix(in srgb, var(--accent) 26%, var(--bg-surface));
	color: var(--text);
	outline: none;
}

.sbrd-post-collections__guest-link {
	color: var(--text-sec);
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.16s ease;
}

.sbrd-post-collections__guest-link:hover,
.sbrd-post-collections__guest-link:focus-visible {
	color: var(--accent);
	outline: none;
}

.sbrd-post-collections__menu-title {
	margin: 0;
	padding: 4px 10px 6px;
	color: var(--text-muted);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.sbrd-post-collections__option {
	appearance: none;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	min-height: 0;
	padding: 8px 10px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--text-sec);
	text-align: left;
	cursor: pointer;
	transition: background 0.16s ease, color 0.16s ease;
}

.sbrd-post-collections__option::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	border-radius: 999px;
	background: transparent;
}

.sbrd-post-collections__option {
	position: relative;
}

.sbrd-post-collections__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1rem;
	margin-top: 0.1rem;
	color: var(--accent);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

.sbrd-post-collections__option-body {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.sbrd-post-collections__option-label {
	color: var(--text);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
}

.sbrd-post-collections__option-hint {
	color: var(--text-muted);
	font-size: 0.7rem;
	font-weight: 500;
	line-height: 1.3;
}

.sbrd-post-collections__option:hover,
.sbrd-post-collections__option:focus-visible {
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	color: var(--text);
	outline: none;
}

.sbrd-post-collections__option.is-active {
	background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.sbrd-post-collections__option.is-active::before {
	background: var(--accent);
}

.sbrd-post-collections__option.is-active .sbrd-post-collections__option-label {
	color: color-mix(in srgb, var(--accent) 32%, var(--text));
}

.sbrd-post-collections__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 4px;
	padding: 8px 10px;
	border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
	border-radius: 0 0 6px 6px;
	color: var(--text-sec);
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.16s ease, background 0.16s ease;
}

.sbrd-post-collections__footer:hover,
.sbrd-post-collections__footer:focus-visible {
	background: color-mix(in srgb, var(--accent) 8%, transparent);
	color: var(--accent);
	outline: none;
}

.sbrd-post-collections.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

.sbrd-lenta-page .lp-card-foot,
.sbrd-lenta-page .lp-card-actions {
	align-items: center;
}

.sbrd-saved-page {
	width: min(1120px, calc(100% - clamp(24px, 4.4vw, 44px)));
	margin-inline: auto;
	padding: clamp(6px, 1.2vw, 16px) clamp(12px, 2.2vw, 22px) clamp(24px, 3.5vw, 44px);
	box-sizing: border-box;
}

.sbrd-saved-page__title {
	margin: 0 0 12px;
	color: var(--text-heading, var(--text));
	font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
	font-weight: 700;
}

.sbrd-saved-page .lp-sort-tabs {
	margin-bottom: 16px;
}

.sbrd-saved-page__empty {
	margin: 24px 0 0;
	padding: 16px 18px;
	border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--bg-card) 92%, var(--bg-surface));
	color: var(--text-sec);
	font-size: 0.9rem;
}

.sbrd-saved-page__list {
	display: flex;
	flex-direction: column;
	gap: var(--sbrd-catalog-row-gap, 12px);
}

.sbrd-saved-page__guest {
	margin: 0 0 16px;
	padding: 16px 18px;
	border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
	border-radius: 8px;
	background: color-mix(in srgb, var(--bg-card) 92%, var(--bg-surface));
	color: var(--text-sec);
	font-size: 0.9rem;
}

.sbrd-saved-page__guest a {
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
}

.sbrd-saved-page__guest a:hover,
.sbrd-saved-page__guest a:focus-visible {
	text-decoration: underline;
	outline: none;
}

.sbrd-saved-page__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}

.sbrd-saved-page__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	padding: 6px 10px;
	border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
	border-radius: 6px;
	background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
	color: var(--text-sec);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
}

.sbrd-saved-page__pagination .page-numbers.current {
	border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
	background: color-mix(in srgb, var(--accent) 13%, var(--bg-surface));
	color: var(--text);
}

@media (max-width: 680px) {
	.sbrd-lenta-page .lp-card-foot {
		row-gap: 10px;
	}

	.sbrd-post-collections__menu {
		min-width: 176px;
	}
}
