/* Bills View Styling */

.content-container {
	position: relative;
	width: 92%;
	font-family: 'Open Sans', sans-serif;
	padding: 0 0 300px 0;
	margin: 90px auto 0 auto;
}

@media (min-width: 1304px) {
	.content-container {
		width: 1200px;
		margin: 90px auto 0 auto;
	}
}

.bills-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 20px;
}

.bills-header h1.page-title {
	color: #333;
	font-family: 'Open Sans';
	font-size: 18px;
	font-weight: 900;
	margin-bottom: 2em;
}

.session-picker {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f8f9fa;
	padding: 6px 12px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

.session-picker label {
	font-weight: 600;
	font-size: 13px;
	color: #4a5568;
}

.session-picker select {
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 14px;
	font-weight: 600;
	background: #ffffff;
	color: #1e293b;
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s ease;
}

.session-picker select:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Filter Toolbar */
.bills-toolbar {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.toolbar-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.toolbar-row + .toolbar-row {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
}

.search-box {
	position: relative;
	flex: 1 1 260px;
	min-width: 200px;
}

.search-box input {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px 9px 36px;
	font-size: 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	outline: none;
	transition: all 0.15s ease;
}

.search-box input:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 16px;
	pointer-events: none;
}

.clear-search-btn {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #94a3b8;
	font-size: 16px;
	cursor: pointer;
	padding: 4px;
	display: none;
}

.clear-search-btn:hover {
	color: #475569;
}

/* Chamber segmented control */
.chamber-segmented {
	display: inline-flex;
	background: #f1f5f9;
	border-radius: 8px;
	padding: 3px;
	user-select: none;
}

.chamber-segmented button {
	background: transparent;
	border: none;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.chamber-segmented button.active {
	background: #ffffff;
	color: #1e293b;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chamber-segmented button:hover:not(.active) {
	color: #1e293b;
}

/* Filter dropdowns */
.filter-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 2 1 400px;
}

.filter-select {
	flex: 1 1 140px;
	min-width: 130px;
	position: relative;
}

.filter-select select {
	width: 100%;
	padding: 8px 10px;
	font-size: 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background-color: #ffffff;
	color: #334155;
	outline: none;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.filter-select select:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.reset-filters-btn {
	background: transparent;
	border: 1px solid #e2e8f0;
	color: #64748b;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.reset-filters-btn:hover {
	background: #f8f9fa;
	color: #ef4444;
	border-color: #fca5a5;
}

/* Summary stats & tags */
.bills-summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 14px;
	padding: 0 4px;
}

.results-count {
	font-size: 14px;
	font-weight: 600;
	color: #475569;
}

.active-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #e0f2fe;
	color: #0369a1;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}

.filter-pill .remove-pill {
	cursor: pointer;
	color: #0284c7;
	font-weight: bold;
	font-size: 14px;
	line-height: 1;
}

.filter-pill .remove-pill:hover {
	color: #0c4a6e;
}

/* Responsive Table */
.table-wrapper {
	overflow-x: auto;
	max-width: 100%;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	container-type: inline-size;
}

table.bills-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 13px;
	text-align: left;
}

table.bills-table thead {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

table.bills-table th {
	padding: 12px 16px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	border-bottom: 1px solid #e2e8f0;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition: color 0.15s ease;
}

table.bills-table th:hover {
	color: #1e293b;
}

table.bills-table th.sortable::after {
	content: " ↕";
	font-size: 11px;
	color: #cbd5e1;
}

table.bills-table th.sort-asc::after {
	content: " ↑";
	color: #3b82f6;
}

table.bills-table th.sort-desc::after {
	content: " ↓";
	color: #3b82f6;
}

table.bills-table tbody tr {
	cursor: pointer;
	transition: background-color 0.15s ease;
}

table.bills-table tbody tr:hover {
	background-color: #f1f5f9;
}

table.bills-table tbody tr:not(:last-child) td {
	border-bottom: 1px solid #f1f5f9;
}

table.bills-table td {
	padding: 14px 16px;
	vertical-align: middle;
	color: #334155;
	line-height: 1.4;
}

.bill-number-cell {
	white-space: nowrap;
}

.bill-number-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 13px;
	background: #e2e8f0;
	color: #1e293b;
}

.bill-number-badge.bill-senate {
	background: #64748b;
	color: #ffffff;
}

.bill-number-badge.bill-house {
	background: #e2e8f0;
	color: #1e293b;
}

.bill-sub-tag {
	display: inline-block;
	margin-left: 6px;
	background: #fef3c7;
	color: #92400e;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
}

.ch-col-header {
	width: 48px;
	text-align: center;
}

.chamber-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: #e2e8f0;
	color: #1e293b;
}

.chamber-badge.chamber-senate,
.chamber-badge.chamber-house {
	background: #e2e8f0;
	color: #1e293b;
}

.bill-title-link,
a.bill-title-link:link,
a.bill-title-link:visited {
	font-weight: 600;
	color: #1e293b;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bill-title-link:hover,
a.bill-title-link:hover {
	color: #1e293b;
	text-decoration: underline;
}

.sponsor-link,
a.sponsor-link:link,
a.sponsor-link:visited {
	color: #1e293b;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.sponsor-link:hover,
a.sponsor-link:hover {
	color: #1e293b;
	text-decoration: underline;
}

td[data-label="Sponsor"] > span:not(.sponsor-party) {
	color: #1e293b;
}

.sponsor-bubble {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 6px;
	white-space: nowrap;
}

.sponsor-bubble-r {
	background: #ffe4e6;
}

.sponsor-bubble-d {
	background: #dbeafe;
}

.sponsor-bubble-other {
	background: #e2e8f0;
}

.sponsor-party {
	font-size: 11px;
	font-weight: 600;
	margin-left: 4px;
}

.party-R {
	color: #dc2626;
}

.party-D {
	color: #2563eb;
}

.status-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	max-width: 150px;
	text-overflow: ellipsis;
	overflow: hidden;
}

.status-passed, .status-signed, .status-enacted {
	background: #dcfce7;
	color: #15803d;
}

.status-failed {
	background: #fee2e2;
	color: #b91c1c;
}

.status-pending, .status-filed {
	background: #f1f5f9;
	color: #475569;
}

.subject-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	max-width: 240px;
}

.subject-tag {
	display: inline-block;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #475569;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 11px;
	white-space: nowrap;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.subject-more {
	font-size: 11px;
	color: #94a3b8;
	font-weight: 600;
	align-self: center;
}

/* Empty State */
.bills-empty {
	text-align: center;
	padding: 60px 20px;
	color: #64748b;
}

.bills-empty-icon {
	font-size: 48px;
	color: #cbd5e1;
	margin-bottom: 12px;
}

.bills-empty h3 {
	font-size: 18px;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.bills-empty p {
	font-size: 14px;
	margin: 0 0 16px 0;
}

/* Container query for mobile stacked view */
@container (max-width: 760px) {
	table.bills-table,
	table.bills-table thead,
	table.bills-table tbody,
	table.bills-table tr,
	table.bills-table td {
		display: block;
	}

	table.bills-table thead {
		display: none;
	}

	table.bills-table tbody tr {
		margin-bottom: 14px;
		border: 1px solid #e2e8f0;
		border-radius: 10px;
		padding: 14px;
		background: #ffffff;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
	}

	table.bills-table td {
		padding: 6px 0;
		border: none !important;
	}

	table.bills-table td:first-child {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-bottom: 8px;
		border-bottom: 1px solid #f1f5f9 !important;
		margin-bottom: 8px;
	}

	table.bills-table td[data-label]::before {
		content: attr(data-label) ": ";
		font-weight: 700;
		color: #64748b;
		display: inline-block;
		min-width: 90px;
	}
}


/* Logged-in Watch & Rating Controls in Bills Table */
.watch-col-header {
	width: 78px;
	text-align: center;
}

.watch-cell {
	width: 78px;
	white-space: nowrap;
}

.watch-cell-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.row-watch-btn {
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #94a3b8;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
	padding: 0;
}

.row-watch-btn:hover {
	border-color: var(--green);
	color: var(--green);
	background: #f0fdf4;
}

.row-watch-btn.is-watching {
	background: var(--green);
	border-color: var(--green);
	color: #ffffff;
}

.row-rating-pill {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.row-rating-pill.pos {
	background: #dcfce7;
	color: #166534;
}

.row-rating-pill.neg {
	background: #fee2e2;
	color: #991b1b;
}

.row-rating-pill.zero {
	background: #e2e8f0;
	color: #334155;
}


/* Popular Toggle & Watchers Column */
.popular-toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #334155;
	font-family: 'Open Sans', sans-serif;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.popular-toggle-btn:hover {
	border-color: #f59e0b;
	background: #fffbeb;
	color: #b45309;
}

.popular-toggle-btn.active {
	background: #f59e0b;
	border-color: #d97706;
	color: #ffffff;
}

.watchers-col-header {
	width: 88px;
	text-align: center;
}

.watchers-cell {
	text-align: center;
	white-space: nowrap;
}

.watch-count-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #fef3c7;
	color: #92400e;
	font-size: 12px;
	font-weight: 700;
}

.watch-count-zero {
	color: #cbd5e1;
	font-size: 12px;
}


/* Priority Select & Amazon-style Combined Watchers Column */
.row-priority-select {
	padding: 3px 6px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #64748b;
	font-family: 'Open Sans', sans-serif;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	min-width: 48px;
}

.row-priority-select:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.35);
}

.watchers-combo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.watcher-count-text {
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}


.bills-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.public-lists-link {
	display: inline-flex;
	align-items: center;
	padding: 7px 13px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #1e293b !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.15s ease;
}

.public-lists-link:hover {
	border-color: var(--green);
	color: var(--green) !important;
	text-decoration: none;
}


.bill-number-badge.bill-file-unknown {
	background: #f1f5f9;
	color: #475569;
	border: 1px dashed #94a3b8;
}

.status-badge.status-file {
	background: #f1f5f9;
	color: #475569;
}
