/**
 * Supplement Compare — public frontend styles. Minimal; defers to the
 * theme for typography and base colors. Just enough structure that the
 * comparison table is readable on phone and desktop.
 */

.supcomp-app {
	margin: 1.5em 0;
	font-size: 16px;
	line-height: 1.4;
}

.supcomp-app .supcomp-loading,
.supcomp-app .supcomp-empty,
.supcomp-app .supcomp-error {
	padding: 1em;
	background: #f6f7f7;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.supcomp-app .supcomp-error {
	background: #fdecea;
	border-color: #d9534f;
}

.supcomp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1em;
	align-items: center;
	margin: 1em 0;
	padding: 0.75em;
	background: #f6f7f7;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
}
.supcomp-filters select,
.supcomp-filters input[type="search"] {
	padding: 0.35em 0.5em;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 14px;
}
.supcomp-filters input.supcomp-search {
	min-width: 12em;
	flex: 1 1 12em;
}
.supcomp-filters label {
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	white-space: nowrap;
}
.supcomp-view-toggle {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1.25em;
	margin: 1em 0 0;
	padding: 0.75em 1em;
	background: #eef2f7;
	border: 1px solid #dbe3ec;
	border-radius: 4px;
	font-size: 14px;
}
.supcomp-view-toggle .supcomp-view-toggle-label {
	font-weight: 600;
}
.supcomp-view-toggle label {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	white-space: nowrap;
	cursor: pointer;
}

.supcomp-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
}
.supcomp-table th,
.supcomp-table td {
	padding: 0.5em 0.75em;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
	vertical-align: top;
}
.supcomp-table th {
	background: #fafafa;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #555;
}
.supcomp-table td.supcomp-num,
.supcomp-table th.supcomp-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.supcomp-table th.supcomp-sortable {
	cursor: pointer;
	user-select: none;
}
.supcomp-table th.supcomp-sortable:hover {
	background: #f0f0f0;
	color: #222;
}
.supcomp-table th.supcomp-sortable:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}
.supcomp-table th.supcomp-sorted {
	color: #222;
}
.supcomp-table .supcomp-sort-arrow {
	display: inline-block;
	margin-left: 0.25em;
	font-size: 11px;
	color: #2271b1;
}

.supcomp-list tbody tr:hover {
	background: #f6fbff;
}
.supcomp-canon-link {
	font-weight: 600;
	text-decoration: none;
}
.supcomp-canon-link:hover {
	text-decoration: underline;
}
.supcomp-compare-btn {
	white-space: nowrap;
}

.supcomp-detail .supcomp-stale {
	opacity: 0.65;
}
.supcomp-stale-note {
	color: #856404;
	font-size: 12px;
}

.supcomp-meta {
	color: #666;
	font-size: 13px;
}

.supcomp-was {
	text-decoration: line-through;
	color: #888;
	font-size: 12px;
}

.supcomp-coupon {
	display: inline-block;
	padding: 2px 6px;
	background: #f6f7f7;
	border: 1px dashed #999;
	border-radius: 2px;
	font-size: 13px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	color: #333;
	cursor: pointer;
	line-height: 1.2;
	margin: 0;
}
button.supcomp-coupon {
	-webkit-appearance: none;
	appearance: none;
}
.supcomp-coupon:hover {
	background: #ebeef0;
	border-color: #555;
}
.supcomp-coupon:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}
.supcomp-coupon.supcomp-coupon-copied {
	background: #e6f4ea;
	border-style: solid;
	border-color: #2e7d32;
	color: #1b5e20;
}

.supcomp-buy {
	display: inline-block;
	padding: 0.35em 0.75em;
	background: #2271b1;
	color: #fff;
	border-radius: 3px;
	text-decoration: none;
	font-size: 14px;
	white-space: nowrap;
}
.supcomp-buy:hover {
	background: #135e96;
}

.supcomp-badge {
	display: inline-block;
	padding: 1px 5px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: #eee;
	color: #555;
	border-radius: 2px;
	vertical-align: middle;
}
.supcomp-badge-3pt {
	background: #d4edda;
	color: #155724;
}
.supcomp-badge-coa {
	background: #cce5ff;
	color: #004085;
}

.supcomp-back {
	display: inline-block;
	margin-bottom: 0.5em;
	font-size: 14px;
	text-decoration: none;
}

.supcomp-title {
	margin: 0.25em 0 0.25em;
}

.supcomp-footer {
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #e5e5e5;
	font-size: 13px;
}
.supcomp-disclosure {
	color: #555;
	margin: 0 0 0.5em;
}

/* Mobile: stack filters; let the table scroll horizontally rather than
   cramping. */
@media (max-width: 720px) {
	.supcomp-filters {
		flex-direction: column;
		align-items: stretch;
	}
	.supcomp-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}
