/* User Profile & Authentication Page Styling */

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

@media (min-width: 1024px) {
	.content-container.profile-page {
		padding: 0 0 300px 0;
	}
}

.is-hidden {
	display: none !important;
}

/* Alerts */
.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 13px;
	line-height: 1.5;
	font-weight: 500;
}

.alert-success {
	background-color: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.alert-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.alert-info {
	background-color: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e40af;
}

.alert-link-btn {
	background: none;
	border: none;
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	font-size: 13px;
	padding: 0;
}

/* Unauthenticated Auth Card */
.auth-shell {
	display: flex;
	justify-content: center;
	padding: 12px 0 24px 0;
}

.auth-card {
	width: 100%;
	max-width: 460px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	padding: 32px 28px;
	box-sizing: border-box;
}

.auth-card-header {
	text-align: center;
	margin-bottom: 22px;
}

.auth-title {
	font-family: 'Open Sans', sans-serif;
	font-size: 20px;
	font-weight: 800;
	color: #222;
	margin: 0 0 6px 0;
	text-transform: uppercase;
}

.auth-subtitle {
	margin: 0;
	font-size: 13px;
	color: #64748b;
	line-height: 1.5;
}

.auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #f1f5f9;
	border-radius: 8px;
	padding: 4px;
	margin-bottom: 22px;
}

.auth-tab {
	border: none;
	background: transparent;
	padding: 10px 12px;
	border-radius: 6px;
	font-family: 'Open Sans', sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s ease;
}

.auth-tab.active {
	background: #ffffff;
	color: var(--green);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Forms */
.form-group {
	margin-bottom: 16px;
}

.form-group label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #475569;
	margin-bottom: 6px;
}

.label-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 6px;
}

.label-row label {
	margin-bottom: 0;
}

.req {
	color: var(--red);
}

.opt {
	font-weight: 400;
	text-transform: none;
	color: #94a3b8;
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	font-family: 'Roboto Flex', sans-serif;
	color: #1e293b;
	background: #ffffff;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--green);
	box-shadow: 0 0 0 3px rgba(79, 155, 39, 0.15);
}

.form-group input:disabled {
	background: #f8fafc;
	color: #64748b;
	cursor: not-allowed;
}

.field-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #64748b;
}

.form-row-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 14px;
}

@media (min-width: 520px) {
	.form-row-2 {
		grid-template-columns: 1fr 1fr;
	}
}

/* Buttons */
.primary-btn,
.secondary-btn,
.outline-danger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 20px;
	border-radius: 6px;
	font-family: 'Open Sans', sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.primary-btn {
	background: var(--green);
	color: #ffffff;
	border: 1px solid var(--green);
}

.primary-btn:hover:not(:disabled) {
	background: var(--med-green);
	border-color: var(--med-green);
	text-decoration: none;
	color: #ffffff;
}

.primary-btn:disabled,
.secondary-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.secondary-btn {
	background: #f8fafc;
	color: #334155;
	border: 1px solid #cbd5e1;
}

.secondary-btn:hover:not(:disabled) {
	background: #f1f5f9;
	border-color: #94a3b8;
	text-decoration: none;
	color: #1e293b;
}

a.secondary-btn:link,
a.secondary-btn:visited {
	color: #334155;
}

.outline-danger-btn {
	background: #ffffff;
	color: var(--red);
	border: 1px solid #fca5a5;
}

.outline-danger-btn:hover {
	background: #fef2f2;
	border-color: var(--red);
}

.btn-sm {
	padding: 7px 13px;
	font-size: 12px;
}

.full-width {
	width: 100%;
}

.text-link-btn {
	background: none;
	border: none;
	padding: 0;
	color: #59409e;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.text-link-btn:hover {
	text-decoration: underline;
}

.auth-footer-link {
	text-align: center;
	margin-top: 16px;
}

.inline-callout {
	margin-top: 16px;
	padding: 14px;
	border-radius: 8px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	text-align: center;
}

.inline-callout p {
	margin: 0 0 10px 0;
	font-size: 13px;
	color: #92400e;
}

/* Pending Email Verification Panel */
.pending-box {
	text-align: center;
	padding: 8px 0;
}

.pending-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px auto;
	border-radius: 50%;
	background: #ecfdf5;
	color: var(--green);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
}

.pending-box h2 {
	margin: 0 0 10px 0;
	font-size: 18px;
	color: #222;
}

.pending-box p {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.5;
}

.pending-sub {
	font-size: 12px !important;
	color: #64748b !important;
}

.pending-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
}

/* Authenticated Dashboard */
.profile-header-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 22px 26px;
	margin-bottom: 24px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.profile-identity {
	display: flex;
	align-items: center;
	gap: 16px;
}

.profile-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #434343;
	color: #ffffff;
	font-family: 'Open Sans', sans-serif;
	font-weight: 800;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.profile-name {
	margin: 0 0 4px 0;
	font-size: 20px;
	font-weight: 800;
	color: #222;
	text-transform: none;
}

.profile-meta-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.profile-email {
	font-size: 13px;
	color: #64748b;
}

.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.badge-verified {
	background: #dcfce7;
	color: #166534;
}

.badge-role {
	background: #ede9fe;
	color: #5b21b6;
}

.profile-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* Dashboard Grid */
.profile-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 22px;
}

@media (min-width: 860px) {
	.profile-grid {
		grid-template-columns: 1fr 1fr;
	}
	.profile-card-wide {
		grid-column: 1 / -1;
	}
}

.profile-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px 26px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
}

.card-header {
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

.card-header-split {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 12px;
}

.card-header h2 {
	margin: 0 0 4px 0;
	font-size: 15px;
	color: #222;
}

.card-header p {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

.account-timestamps {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin: 8px 0 18px 0;
	padding: 10px 12px;
	background: #f8fafc;
	border-radius: 6px;
	font-size: 12px;
	color: #64748b;
}

.lookup-action-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
	margin: -4px 0 18px 0;
	padding: 10px 12px;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
}

.lookup-hint {
	font-size: 12px;
	color: #64748b;
	line-height: 1.4;
}

.field-populated {
	border-color: var(--green) !important;
	background-color: #f0fdf4 !important;
}

.voter-footer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
}

.voter-ext-link {
	font-size: 12px;
	font-weight: 600;
	color: #59409e;
	text-decoration: none;
}

.voter-ext-link:hover {
	text-decoration: underline;
}

/* My Legislators Card */
.legislators-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 720px) {
	.legislators-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.legislator-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fafafa;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legislator-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.legislator-photo {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background-color: #e2e8f0;
	background-size: cover;
	background-position: center top;
	flex-shrink: 0;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.legislator-info {
	flex: 1;
	min-width: 0;
}

.legislator-chamber-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 4px;
}

.legislator-district {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
}

.party-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}

.party-badge.party-r {
	background: #fee2e2;
	color: #991b1b;
}

.party-badge.party-d {
	background: #dbeafe;
	color: #1e40af;
}

.party-badge.party-other {
	background: #f1f5f9;
	color: #475569;
}

.legislator-name {
	margin: 0 0 4px 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 16px;
	font-weight: 800;
	color: #1e293b;
}

.legislator-name a {
	color: inherit;
	text-decoration: none;
}

.legislator-name a:hover {
	color: var(--green);
	text-decoration: underline;
}

.legislator-role {
	font-size: 12px;
	color: #64748b;
	margin-bottom: 6px;
}

.legislator-score-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.score-pill {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.score-pill.conservative {
	background: #fef2f2;
	color: var(--red);
	border: 1px solid #fecaca;
}

.score-pill.liberal {
	background: #eff6ff;
	color: var(--blue);
	border: 1px solid #bfdbfe;
}

.score-pill.unrated {
	background: #f1f5f9;
	color: #64748b;
}

.legislator-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
}

.legislator-links a {
	color: #59409e;
	text-decoration: none;
}

.legislator-links a:hover {
	text-decoration: underline;
}

/* Weights Overview */
.weights-sync-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 16px;
	margin-bottom: 16px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 13px;
	color: #334155;
}

.weights-sync-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.weights-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}

.weight-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fafafa;
}

.weight-org-name {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.weight-pill {
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

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

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

.weight-pill.zero {
	background: #f1f5f9;
	color: #64748b;
}

.weights-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 20px 12px;
	color: #64748b;
	font-size: 13px;
	background: #f8fafc;
	border-radius: 8px;
}

/* Password Form */
.password-form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 16px;
}

@media (min-width: 768px) {
	.password-form-grid {
		grid-template-columns: repeat(3, 1fr);
		align-items: end;
	}
	.form-actions-inline {
		grid-column: 1 / -1;
		margin-top: 4px;
	}
}


/* Watched & Rated Bills Card on Profile */
.user-bills-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.user-bill-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fafafa;
}

.user-bill-main {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	flex: 1;
	min-width: 220px;
}

.user-bill-key {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 6px;
	background: #1e293b;
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	flex-shrink: 0;
}

.user-bill-key:hover {
	background: var(--green);
	text-decoration: none;
}

.user-bill-session {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 5px;
	background: #e0f2fe;
	color: #0369a1;
	flex-shrink: 0;
}

.user-bill-title {
	font-size: 14px;
	font-weight: 600;
	color: #1e293b;
	text-decoration: none;
}

.user-bill-title:hover {
	color: var(--green);
	text-decoration: underline;
}

.user-bill-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.user-bill-watch-btn {
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #64748b;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s ease;
}

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

.user-bill-watch-btn:hover:not(:disabled) {
	opacity: 0.85;
}
