/* By The People - Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.navbar-brand:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Sections */
.section {
    display: none;
    min-height: 80vh;
    padding: 2rem 0;
}

.section.active {
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.stat-card, .policy-card, .official-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover, .policy-card:hover, .official-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.policy-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    position: relative;
}

.policy-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.policy-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.bill-number-inline {
    font-size: 0.9rem;
    font-weight: 400;
    color: #64748b !important;
    white-space: nowrap;
}

.policy-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.policy-date i {
    opacity: 0.7;
}

.policy-links {
    margin-top: 0.75rem;
}

.bill-text-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.bill-text-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.bill-text-link i {
    font-size: 0.75rem;
}

.full-text-content {
    max-height: 60vh;
    overflow-y: auto;
}

.bill-text {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

/* Status Tracker */
.status-tracker {
    margin: 1rem 0;
}

.status-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0.5rem 0;
}

.status-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.status-step.active .step-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.status-step.current .step-circle {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.step-circle i {
    font-size: 0.75rem;
}

.step-label {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.status-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.status-step.current .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .step-label {
        font-size: 0.65rem;
    }
    
    .step-circle {
        width: 20px;
        height: 20px;
    }
    
    .step-circle i {
        font-size: 0.65rem;
    }
}

/* Policy Key Points */
.policy-key-points {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
}

.key-points-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.key-points-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.key-points-list li {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.key-points-list li:last-child {
    margin-bottom: 0;
}

/* Comments Section */
.comments-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.comments-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.comment-count {
    color: #64748b;
    font-weight: 400;
    margin-left: 0.25rem;
}

.comments-login-prompt {
    text-align: center;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px dashed #cbd5e1;
}

.comment-form {
    margin-bottom: 1rem;
}

.comment-input {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
}

.comment-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.75rem;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    background-color: #fafafa;
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.comment-time {
    font-size: 0.75rem;
}

.comment-content {
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Responsive adjustments for comments */
@media (max-width: 768px) {
    .comment-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comments-list {
        max-height: 300px;
    }
}

.policy-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.policy-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-federal { background-color: #dbeafe; color: #1e40af; }
.badge-state { background-color: #dcfce7; color: #166534; }
.badge-local { background-color: #fef3c7; color: #92400e; }

.badge-healthcare { background-color: #fce7f3; color: #be185d; }
.badge-education { background-color: #e0e7ff; color: #3730a3; }
.badge-economy { background-color: #d1fae5; color: #065f46; }
.badge-environment { background-color: #ecfdf5; color: #047857; }
.badge-infrastructure { background-color: #f3e8ff; color: #6b21a8; }
.badge-defense { background-color: #fef2f2; color: #991b1b; }
.badge-civil_rights { background-color: #fff7ed; color: #9a3412; }
.badge-policy-area { background-color: #fef3c7; color: #d97706; }
.badge-subject { background-color: #f0f9ff; color: #0369a1; }
.badge-comments { background-color: #f1f5f9; color: #475569; }

/* Additional badge colors for unique badge coloring */
.badge-primary { background-color: #dbeafe; color: #1e40af; }
.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef3c7; color: #92400e; }
.badge-danger { background-color: #fef2f2; color: #991b1b; }
.badge-info { background-color: #f0f9ff; color: #0369a1; }
.badge-secondary { background-color: #f1f5f9; color: #475569; }
.badge-dark { background-color: #f9fafb; color: #374151; }
.badge-purple { background-color: #f3e8ff; color: #6b21a8; }
.badge-orange { background-color: #fff7ed; color: #9a3412; }
.badge-teal { background-color: #f0fdfa; color: #0f766e; }
.badge-pink { background-color: #fce7f3; color: #be185d; }
.badge-indigo { background-color: #e0e7ff; color: #3730a3; }

.comment-count-corner {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background-color: #f8fafc;
    color: #64748b;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.policy-summary {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.voting-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.vote-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.vote-btn.btn-for {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.vote-btn.btn-against {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.vote-btn.btn-neutral {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.vote-btn.active {
    border-color: currentColor;
    font-weight: 600;
}

/* Vote button states after voting */
.vote-btn.selected {
    border-color: currentColor;
    border-width: 2px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(-1px);
    position: relative;
}

/* Checkmark for selected vote */
.vote-btn.selected:after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid currentColor;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vote-btn.unselected {
    opacity: 0.4;
    background-color: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

.vote-btn.unselected:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    transition: all 0.2s ease;
    border-color: #94a3b8;
}

.vote-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.vote-counts {
    display: flex;
    gap: 1rem;
}

.comment-count {
    color: #64748b;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background-color: #f8fafc;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

/* Profile Page */
.profile-header-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border-radius: 1rem;
    padding: 0;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.profile-cover {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-info {
    background: white;
    padding: 2rem;
    text-align: center;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.profile-name {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #1e293b;
}

.profile-location {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.profile-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.political-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.political-info .info-item:last-child {
    border-bottom: none;
}

.political-info label {
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0;
}

.party-badge {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ideology-badge {
    background-color: #f3e8ff;
    color: #6b21a8;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.interest-tag {
    background-color: #f1f5f9;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.voting-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vote-type-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.vote-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.vote-icon.for {
    background-color: #dcfce7;
    color: #166534;
}

.vote-icon.against {
    background-color: #fef2f2;
    color: #991b1b;
}

.vote-icon.neutral {
    background-color: #f1f5f9;
    color: #475569;
}

.vote-details {
    display: flex;
    flex-direction: column;
}

.vote-count {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.vote-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .profile-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .profile-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Officials */
.official-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.official-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.official-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.official-position {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.alignment-score {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.alignment-high {
    background-color: #dcfce7;
    color: #166534;
}

.alignment-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.alignment-low {
    background-color: #fef2f2;
    color: #991b1b;
}

.score-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

/* Progress bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .policy-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .vote-buttons {
        flex-direction: column;
    }
    
    .vote-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filters {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filters .form-select {
        width: 100% !important;
    }
}

/* All Policies Section */
.filters-container {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.topic-filter-dropdown select {
    min-height: 120px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px;
    font-size: 0.9rem;
}

.topic-filter-dropdown select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.selected-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
}

.selected-topic-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 0.8rem;
    background: #007bff;
    color: white;
    border-radius: 16px;
    gap: 4px;
}

.selected-topic-badge .remove-topic {
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.selected-topic-badge .remove-topic:hover {
    opacity: 1;
}

.all-policies-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.all-policies-no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .all-policies-filters {
        padding: 15px;
    }
    
    .topic-filter-dropdown select {
        font-size: 0.85rem;
        min-height: 100px;
    }
    
    .selected-topic-badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

/* Loading states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Modal customizations */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Utility classes */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

.cursor-pointer { cursor: pointer; }
.transition-all { transition: all 0.2s ease; }



/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Representatives Section */
.representatives-level {
    margin-bottom: 2rem;
}

.representatives-level h4 {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.representative-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.representative-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.rep-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.rep-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.rep-info h5 {
    margin: 0 0 5px 0;
    color: #212529;
    font-weight: 600;
}

.rep-title {
    color: #6c757d;
    font-size: 0.9em;
    margin: 0;
}

.rep-party {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    margin-top: 8px;
}

.rep-party.democratic {
    background: #cce5ff;
    color: #0056b3;
}

.rep-party.republican {
    background: #ffe6e6;
    color: #dc3545;
}

.rep-party.independent {
    background: #f0f0f0;
    color: #495057;
}

.rep-contact {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    font-size: 0.85em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    text-decoration: none;
}

.contact-btn i {
    font-size: 0.9em;
}

#user-location {
    font-size: 0.9em;
}

#user-location i {
    color: #007bff;
}

.representatives-level .row {
    margin: 0 -10px;
}

.representatives-level .col-md-6 {
    padding: 0 10px;
}

/* Alignment Score Styles */
.alignment-score {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.alignment-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 70px;
    position: relative;
    color: white;
    font-weight: 600;
    text-align: center;
}

.alignment-percentage {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.alignment-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    opacity: 0.9;
}

.alignment-confidence {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    opacity: 0.8;
}

/* Color schemes for different alignment levels */
.alignment-high {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.alignment-medium {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.alignment-low {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.alignment-no-data {
    background: linear-gradient(135deg, #6c757d, #495057);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alignment-badge {
        min-width: 60px;
        padding: 6px 10px;
    }
    
    .alignment-percentage {
        font-size: 14px;
    }
    
    .alignment-label {
        font-size: 9px;
    }
}

/* All Officials Preview Section */
#all-officials-preview {
    border-top: 2px solid #e9ecef;
    padding-top: 2rem;
}

#all-officials-preview h3 {
    color: #495057;
    font-weight: 600;
}

#toggle-all-officials {
    transition: all 0.3s ease;
    border-radius: 20px;
    font-size: 0.875rem;
    padding: 0.375rem 1rem;
}

#toggle-all-officials:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

#officials-filters {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

#officials-filters .form-select,
#officials-filters .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#officials-filters .form-select:focus,
#officials-filters .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#all-officials-list .representative-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

#all-officials-list .representative-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#load-more-officials {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#load-more-officials:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Officials loading state */
#all-officials-loading {
    background: #f8f9fa;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Responsive adjustments for all officials */
@media (max-width: 768px) {
    #officials-filters .row {
        gap: 0.5rem;
    }
    
    #officials-filters .col-md-3 {
        margin-bottom: 0.5rem;
    }
    
    #toggle-all-officials {
        font-size: 0.8rem;
        padding: 0.25rem 0.75rem;
    }
}

/* All Officials Preview Section Styles */
.all-officials-preview {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.toggle-officials-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.toggle-officials-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    color: white;
}

.officials-filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.officials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.official-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.official-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.official-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.official-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.official-position {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.alignment-score {
    text-align: center;
    min-width: 60px;
}

.score-number {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
}

.officials-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.load-more-officials {
    display: block;
    margin: 1rem auto;
    padding: 0.75rem 2rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.load-more-officials:hover {
    background: #5a6268;
}
/* Voting Demographics Styles */
.demographics-overview {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 1rem;
}

.demographics-sections {
    max-height: 60vh;
    overflow-y: auto;
}

.demographic-category {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.demographic-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.demographic-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demographic-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    transition: background-color 0.3s ease;
}

.demographic-item:hover {
    background: #e9ecef;
}

.demographic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 500;
    color: #495057;
}

.total-votes {
    font-size: 0.9rem;
    color: #6c757d;
}

.vote-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vote-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.vote-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.vote-segment.vote-for {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.vote-segment.vote-against {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.vote-segment.vote-neutral {
    background: linear-gradient(90deg, #6c757d, #adb5bd);
}

.vote-percentages {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.for-percent {
    color: #28a745;
}

.against-percent {
    color: #dc3545;
}

.neutral-percent {
    color: #6c757d;
}

/* Demographics Button Styles */
.demographics-btn {
    font-size: 0.75rem;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    white-space: nowrap;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.demographics-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.demographics-btn i {
    font-size: 0.75rem;
}

/* Responsive adjustments for officials preview */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .officials-grid {
        grid-template-columns: 1fr;
    }
    
    .official-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alignment-score {
        margin-top: 0.5rem;
        text-align: left;
    }
    
    .demographic-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .vote-percentages {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .demographics-sections {
        max-height: 50vh;
    }
}

/* ===== CONGRESS BILLS STYLES ===== */

.congress-bill-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.congress-bill-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.congress-bill-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
}

.congress-bill-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #2c3e50;
}

.key-points {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 3px solid #007bff;
}

.bill-meta {
    background-color: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

/* Status Badges */
.badge.bg-proposed {
    background-color: #6c757d !important;
}

.badge.bg-committee {
    background-color: #fd7e14 !important;
}

.badge.bg-voting {
    background-color: #20c997 !important;
}

.badge.bg-passed {
    background-color: #198754 !important;
}

.badge.bg-signed {
    background-color: #0d6efd !important;
}

.badge.bg-failed {
    background-color: #dc3545 !important;
}

/* District Information Styles */
.district-results {
    padding: 1rem;
}

.address-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.districts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.district-level {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

.district-level-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.district-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.district-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.district-card:hover {
    background: #e9ecef;
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.district-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.district-info {
    flex: 1;
}

.district-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.district-type {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.district-id {
    color: #adb5bd;
    font-size: 0.8rem;
}

.data-sources {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .district-cards {
        grid-template-columns: 1fr;
    }
    
    .district-card {
        padding: 0.75rem;
    }
    
    .district-icon {
        width: 35px;
        height: 35px;
        margin-right: 0.75rem;
    }
}
