/* Best Trash Can: Finder, list pages and product summary. Brand colors with fallbacks. */

.bt-finder,
.bt-list,
.bt-summary {
	--bt-green: var(--wp--preset--color--green, #1e6b47);
	--bt-deep: var(--wp--preset--color--deep-green, #14523a);
	--bt-charcoal: var(--wp--preset--color--charcoal, #1f2933);
	--bt-slate: var(--wp--preset--color--slate, #6b7280);
	--bt-mint: var(--wp--preset--color--mint, #e8f3ec);
	--bt-amber: var(--wp--preset--color--amber, #f2a93b);
	--bt-border: var(--wp--preset--color--border, #e5e7eb);
}

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

/* Focus states */
.bt-finder :focus-visible,
.bt-list :focus-visible,
.bt-summary :focus-visible,
.bt-compare__dialog :focus-visible {
	outline: 3px solid var(--bt-amber, #f2a93b);
	outline-offset: 2px;
}

/* Badges: amber with charcoal text */
.bt-badge {
	display: inline-block;
	background: var(--bt-amber, #f2a93b);
	color: var(--bt-charcoal, #1f2933);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	text-decoration: none;
}

a.bt-badge:hover,
a.bt-badge:focus {
	color: var(--bt-charcoal, #1f2933);
	text-decoration: underline;
}

.bt-badge--chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0.5rem 0.5rem 0;
}

.bt-chip-remove {
	background: none;
	border: 0;
	padding: 0 0.15rem;
	font-size: 1.1rem;
	line-height: 1;
	color: var(--bt-charcoal, #1f2933);
	cursor: pointer;
	text-decoration: none;
}

/* Score */
.bt-score {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.4rem 0;
}

.bt-score__value {
	font-weight: 800;
	font-size: 1.25rem;
	color: var(--bt-charcoal, #1f2933);
}

.bt-score__max {
	font-weight: 500;
	font-size: 0.8em;
	color: var(--bt-slate, #6b7280);
}

.bt-score__bar {
	flex: 1 1 6rem;
	max-width: 10rem;
	height: 0.5rem;
	background: var(--bt-border, #e5e7eb);
	border-radius: 999px;
	overflow: hidden;
}

.bt-score__bar > span {
	display: block;
	height: 100%;
	background: var(--bt-green, #1e6b47);
	border-radius: 999px;
}

.bt-score__note {
	font-size: 0.8125rem;
	color: var(--bt-slate, #6b7280);
	font-style: italic;
}

.bt-score--large .bt-score__value {
	font-size: 2rem;
}

.bt-score--large .bt-score__bar {
	max-width: 16rem;
	height: 0.65rem;
}

/* Finder layout */
.bt-finder__picks {
	border: 0;
	padding: 0;
	margin: 0 0 1rem;
}

.bt-finder__picks legend,
.bt-filter summary,
.bt-filter legend {
	font-weight: 700;
	font-size: 1rem;
}

.bt-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.bt-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.bt-chip span {
	display: inline-block;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--bt-green, #1e6b47);
	border-radius: 999px;
	color: var(--bt-green, #1e6b47);
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	background: #fff;
}

.bt-chip input:checked + span {
	background: var(--bt-green, #1e6b47);
	color: #fff;
}

.bt-chip input:focus-visible + span {
	outline: 3px solid var(--bt-amber, #f2a93b);
	outline-offset: 2px;
}

.bt-finder__layout {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 900px) {
	.bt-finder__layout {
		grid-template-columns: 17rem 1fr;
		align-items: start;
	}
}

/* Mint filter panel */
.bt-finder__panel {
	background: var(--bt-mint, #e8f3ec);
	border-radius: 12px;
	padding: 1rem 1.1rem;
	font-size: 0.9375rem;
}

.bt-finder__filters > summary {
	font-weight: 800;
	font-size: 1.125rem;
	cursor: pointer;
}

@media (min-width: 900px) {
	.bt-finder__filters > summary {
		pointer-events: none;
		list-style: none;
	}

	.bt-finder__filters > summary::-webkit-details-marker {
		display: none;
	}
}

.bt-filter {
	border: 0;
	border-top: 1px solid rgba(31, 41, 51, 0.12);
	padding: 0.65rem 0;
	margin: 0;
	min-width: 0;
}

fieldset.bt-filter > legend {
	float: left;
	width: 100%;
	padding: 0;
	margin-bottom: 0.35rem;
}

fieldset.bt-filter > legend + * {
	clear: both;
}

.bt-filter__max input {
	background: #fff;
}

.bt-filter summary {
	cursor: pointer;
}

.bt-filter fieldset {
	border: 0;
	padding: 0.4rem 0 0;
	margin: 0;
}

.bt-filter label {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	padding: 0.2rem 0;
	cursor: pointer;
}

.bt-filter input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.2rem;
	accent-color: var(--bt-green, #1e6b47);
	flex: none;
}

.bt-filter__shortcut {
	font-weight: 600;
}

.bt-filter--instock {
	border: 0;
	border-top: 1px solid rgba(31, 41, 51, 0.12);
	font-weight: 600;
}

.bt-filter__max {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
}

.bt-filter__max label {
	min-width: 0;
	flex-direction: column;
	gap: 0.2rem;
	font-size: 0.8125rem;
}

.bt-filter__max input {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding: 0.35rem;
	border: 1px solid var(--bt-border, #e5e7eb);
	border-radius: 6px;
	font: inherit;
}

.bt-filter__note {
	font-size: 0.8125rem;
	color: var(--bt-slate, #6b7280);
	margin: 0.4rem 0 0;
}

.bt-finder__buttons {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 0.75rem;
}

.bt-js .bt-finder__apply {
	display: none;
}

/* Results */
.bt-finder__bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.bt-finder__count {
	font-weight: 700;
	margin: 0;
}

.bt-finder__sort select {
	font: inherit;
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--bt-border, #e5e7eb);
	border-radius: 6px;
}

.bt-finder__list {
	display: grid;
	gap: 1rem;
}

@media (min-width: 640px) {
	.bt-finder__list {
		grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	}
}

.bt-finder__soon,
.bt-finder__none {
	padding: 1.5rem;
	background: var(--bt-mint, #e8f3ec);
	border-radius: 12px;
	font-weight: 600;
}

/* Cards */
.bt-card {
	display: flex;
	gap: 0.75rem;
	border: 1px solid var(--bt-border, #e5e7eb);
	border-radius: 12px;
	padding: 1rem;
	background: #fff;
}

.bt-card--draft {
	border-style: dashed;
}

.bt-card__body {
	flex: 1;
	min-width: 0;
}

.bt-card__rank {
	flex: none;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--bt-charcoal, #1f2933);
	color: #fff;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bt-card__title {
	font-size: 1.0625rem;
	line-height: 1.3;
	margin: 0.25rem 0;
}

.bt-card__title a {
	color: var(--bt-charcoal, #1f2933);
	text-decoration: none;
}

.bt-card__title a:hover,
.bt-card__title a:focus {
	text-decoration: underline;
}

.bt-card__specs {
	list-style: none;
	margin: 0.4rem 0;
	padding: 0;
	font-size: 0.9375rem;
	color: var(--bt-slate, #6b7280);
}

.bt-card__bestfor {
	font-size: 0.9375rem;
	margin: 0.4rem 0;
}

.bt-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	margin-top: 0.6rem;
	font-size: 0.9375rem;
}

.bt-card__compare {
	display: none;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
}

.bt-js .bt-card__compare {
	display: inline-flex;
}

.bt-card__compare input {
	accent-color: var(--bt-green, #1e6b47);
	width: 1.05rem;
	height: 1.05rem;
}

/* Compare */
.bt-compare__bar {
	position: sticky;
	bottom: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	margin-top: 1rem;
	background: var(--bt-charcoal, #1f2933);
	color: #fff;
	border-radius: 12px 12px 0 0;
	z-index: 10;
}

.bt-compare__clear {
	background: none;
	border: 0;
	color: #fff;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

.bt-compare__open:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.bt-compare__dialog {
	width: min(60rem, 96vw);
	max-height: 90vh;
	border: 0;
	border-radius: 12px;
	padding: 1rem 1.25rem;
}

.bt-compare__dialog::backdrop {
	background: rgba(31, 41, 51, 0.55);
}

.bt-compare__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.bt-compare__close {
	background: none;
	border: 0;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.bt-compare__table {
	overflow-x: auto;
}

.bt-compare__table th[scope="col"] {
	vertical-align: bottom;
	min-width: 10rem;
}

/* List pages */
.bt-list__title {
	margin-bottom: 0.5rem;
}

.bt-list__intro {
	font-size: 1.125rem;
}

.bt-list__items {
	list-style: none;
	margin: 1.5rem 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.bt-list__items .bt-card__title {
	font-size: 1.25rem;
}

.bt-list__few {
	background: var(--bt-mint, #e8f3ec);
	border-radius: 12px;
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
}

.bt-list__updated {
	font-size: 0.875rem;
	color: var(--bt-slate, #6b7280);
}

/* Product summary */
.bt-summary {
	margin: 1.5rem 0;
}

.bt-summary__parts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
	gap: 0.5rem 1rem;
	margin: 0.75rem 0;
}

.bt-summary__parts div {
	background: var(--bt-mint, #e8f3ec);
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
}

.bt-summary__parts dt {
	font-size: 0.8125rem;
	color: var(--bt-slate, #6b7280);
}

.bt-summary__parts dd {
	margin: 0;
	font-weight: 700;
}

.bt-summary__nodata {
	font-weight: 400;
	font-style: italic;
	color: var(--bt-slate, #6b7280);
}

.bt-summary__note {
	font-size: 0.875rem;
	color: var(--bt-slate, #6b7280);
}

.bt-summary__ranks {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	margin: 0.75rem 0;
}

.bt-summary__proscons {
	display: grid;
	gap: 1rem;
}

@media (min-width: 640px) {
	.bt-summary__proscons {
		grid-template-columns: 1fr 1fr;
	}
}

.bt-summary__proscons h2 {
	font-size: 1.125rem;
	margin: 0 0 0.25rem;
}

/* Visually hidden text. Legends ignore width, so clip them explicitly (a hidden legend could
   otherwise stretch to the fieldset's full width and cause sideways scrolling). */
.bt-finder .screen-reader-text,
.bt-finder legend.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	max-width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
