/* Reset & Base Styles Scoped to the Plugin Container */
.wp-embed-context * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-header: #1e293b80;
    --border-color: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-blue: #3b82f6;
    --color-blue-hover: #2563eb;
    --color-blue-bg: rgba(59, 130, 246, 0.15);
    
    --color-green: #10b981;
    --color-green-bg: rgba(16, 185, 129, 0.15);
    
    --color-amber: #f59e0b;
    --color-amber-bg: rgba(245, 158, 11, 0.15);
    
    --color-red: #ef4444;
    --color-red-bg: rgba(239, 68, 68, 0.15);
    
    --font-family: 'Inter', sans-serif;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --transition-speed: 0.25s;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.wp-embed-context {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

body.wp-embed-context {
    overflow: auto !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
}

.app-header {
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-logo {
    height: 32px;
    object-fit: contain;
}

.logo-pdha {
    height: 48px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.logo-fluoridealert {
    height: 24px;
}

.header-title-container {
    display: flex;
    flex-direction: column;
}

.header-title-container h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(to right, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title-container .sub-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: underline;
    transition: color var(--transition-speed);
}

.header-title-container .sub-title:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

.last-updated-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Main Layout Grid */
.dashboard-layout {
    display: flex;
    flex: 1;
    padding: 2rem;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar Filters */
.sidebar-filters {
    width: 280px;
    flex-shrink: 0;
}

.filter-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow);
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-header i {
    color: var(--color-blue);
}

.filter-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Search input */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.75rem 0.6rem 2.25rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color var(--transition-speed);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-blue);
}

/* Checkbox lists */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
}

.checkbox-list.scrollable {
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.checkbox-list::-webkit-scrollbar {
    width: 4px;
}

.checkbox-list::-webkit-scrollbar-track {
    background: transparent;
}

.checkbox-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.checkbox-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.checkbox-item input {
    accent-color: var(--color-blue);
    cursor: pointer;
}

.btn-clear {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}

.btn-clear:hover {
    background-color: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-red);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Stats Summary Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bg-blue-tint {
    background-color: var(--color-blue-bg);
    color: var(--color-blue);
}

.bg-green-tint {
    background-color: var(--color-green-bg);
    color: var(--color-green);
}

.bg-amber-tint {
    background-color: var(--color-amber-bg);
    color: var(--color-amber);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Table Card styling */
.table-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.table-wrapper,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8125rem;
}

.data-table th, .data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.data-table th.sortable {
    cursor: pointer;
    transition: color var(--transition-speed), background-color var(--transition-speed);
}

.data-table th.sortable:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
}

.data-table th.sorted-asc i, .data-table th.sorted-desc i {
    color: var(--color-blue);
}

.data-table tbody tr {
    transition: background-color var(--transition-speed);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-enacted {
    background-color: var(--color-green-bg);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-committee {
    background-color: var(--color-amber-bg);
    color: var(--color-amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-introduced {
    background-color: var(--color-blue-bg);
    color: var(--color-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-dead {
    background-color: var(--color-red-bg);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Links & helpers */
.bill-link {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
}

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

.btn-details {
    background-color: var(--border-color);
    color: var(--text-primary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-details:hover {
    background-color: var(--color-blue);
    transform: scale(1.08);
}

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

.text-muted {
    color: var(--text-muted);
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

/* Loading Spinner */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--color-blue);
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.loading-placeholder-small {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer Section */
.app-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.app-footer .attribution {
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-main);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .dashboard-layout {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar-filters {
        width: 100%;
    }
    
    .filter-card {
        position: static;
    }
    
    .checkbox-list {
        max-height: 150px;
    }
}

.hidden {
    display: none;
}

/* Sponsors List Styling */
.sponsors-box {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.sponsors-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.sponsors-label i {
    color: var(--color-blue);
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.sponsor-badge-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.sponsor-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sponsor-party {
    font-size: 0.75rem;
    font-weight: 700;
}

.sponsor-party.democrat {
    color: #60a5fa; /* Soft Blue */
}

.sponsor-party.republican {
    color: #f87171; /* Soft Red */
}

.sponsor-party.independent {
    color: #a78bfa; /* Soft Purple */
}

.sponsor-actions {
    display: flex;
    gap: 0.35rem;
}

.sponsor-actions a {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.sponsor-actions a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sponsor-actions a.action-btn-email:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--color-blue);
}

.sponsor-actions a.action-btn-phone:hover {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--color-green);
}

.btn-email-all-sponsors {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--color-blue);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.btn-email-all-sponsors:hover {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: var(--color-blue);
}

@media (max-width: 640px) {
    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 1rem;
    }
    
    .app-footer {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    /* Make stats grids show 3 columns side-by-side on mobile */
    .wp-embed-context .stats-grid,
    .wp-embed-context .stats-row {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.25rem !important;
    }

    /* Make stats cards compact and vertically stacked on mobile */
    .wp-embed-context .stat-card {
        padding: 0.35rem 0.15rem !important;
        gap: 0.25rem !important;
        flex-direction: column !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .wp-embed-context .stat-icon {
        width: 26px !important;
        height: 26px !important;
        margin: 0 auto !important;
        border-radius: 4px !important;
    }

    .wp-embed-context .stat-icon i {
        font-size: 0.75rem !important;
    }

    .wp-embed-context .stat-label {
        font-size: 0.55rem !important;
        line-height: 1.1 !important;
    }

    .wp-embed-context .stat-value {
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
    }

    /* Tighter table cell padding and text-overflow ellipsis on mobile */
    .wp-embed-context .legislation-table {
        width: 100% !important;
        table-layout: fixed !important;
    }

    .wp-embed-context .data-table th, 
    .wp-embed-context .data-table td {
        padding: 0.35rem 0.15rem !important;
        font-size: 0.65rem !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    .wp-embed-context .btn-row-toggle {
        padding: 2px 4px !important;
    }

    /* Fixed table column widths for exactly 310px total table width on mobile */
    .wp-embed-context .legislation-table th:nth-child(1),
    .wp-embed-context .legislation-table td:nth-child(1) {
        width: 25px !important;
        min-width: 25px !important;
    }
    .wp-embed-context .legislation-table th:nth-child(2),
    .wp-embed-context .legislation-table td:nth-child(2) {
        width: 30px !important;
        min-width: 30px !important;
    }
    .wp-embed-context .legislation-table th:nth-child(3),
    .wp-embed-context .legislation-table td:nth-child(3) {
        width: 55px !important;
        min-width: 55px !important;
    }
    .wp-embed-context .legislation-table th:nth-child(4),
    .wp-embed-context .legislation-table td:nth-child(4),
    .wp-embed-context .bill-title-cell {
        width: 60px !important;
        max-width: 60px !important;
    }
    .wp-embed-context .legislation-table th:nth-child(5),
    .wp-embed-context .legislation-table td:nth-child(5),
    .wp-embed-context .status-cell {
        width: 60px !important;
        min-width: 60px !important;
    }
    .wp-embed-context .legislation-table th:nth-child(6),
    .wp-embed-context .legislation-table td:nth-child(6),
    .wp-embed-context .date-cell {
        width: 55px !important;
        min-width: 55px !important;
    }
    .wp-embed-context .legislation-table th:nth-child(7),
    .wp-embed-context .legislation-table td:nth-child(7) {
        width: 25px !important;
        min-width: 25px !important;
    }

    /* Shrink status badge dimensions on mobile */
    .wp-embed-context .badge {
        font-size: 0.55rem !important;
        padding: 0.1rem 0.25rem !important;
        text-align: center !important;
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Small details action button */
    .wp-embed-context .btn-details {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.55rem !important;
    }
}

/* Communities Map Card Styles */
.map-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.map-card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.map-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    height: 480px;
    min-height: 0;
    overflow: hidden;
}

.map-container-frame {
    height: 100%;
    min-height: 0;
    border-right: 1px solid var(--border-color);
    overflow: hidden;
}

.map-container-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.communities-list-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.05);
}

.communities-list-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.communities-list-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.communities-list-header input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
}

.communities-list-header input:focus {
    outline: none;
    border-color: var(--color-blue);
}

.communities-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Custom Scrollbar for Communities List */
.communities-list::-webkit-scrollbar {
    width: 4px;
}

.communities-list::-webkit-scrollbar-track {
    background: transparent;
}

.communities-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.community-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.community-list-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: var(--text-secondary);
}

.community-name-container {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.community-title {
    font-weight: 600;
    color: var(--text-primary);
}

.community-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.community-pop-badge {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-blue);
    border: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .map-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .map-container-frame {
        height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .communities-list-container {
        height: 350px;
    }
}

.map-fallback-link {
    color: var(--color-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: var(--color-blue-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}

.map-fallback-link:hover {
    background-color: var(--color-blue);
    color: var(--text-primary);
    border-color: var(--color-blue);
}

.community-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed);
}

.community-link:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

.community-title-no-link {
    font-weight: 600;
    color: var(--text-primary);
}

/* Legislative Row Expand / Dropdown Styles */
.btn-row-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.btn-row-toggle:hover {
    color: var(--color-blue);
}

tr.expanded .btn-row-toggle {
    color: var(--color-blue);
}

/* Detail Sub-Row */
.detail-row {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.detail-row-content {
    padding: 1rem 1.5rem 1rem 3.5rem; /* Indented under the columns */
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.snippet-box {
    border-left: 3px solid var(--color-blue);
    background-color: rgba(255, 255, 255, 0.01);
    padding: 0.75rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.snippet-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.snippet-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* Highlighted Keyword Mark */
mark.highlight {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-bottom: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.05rem 0.2rem;
    border-radius: 2px;
    font-weight: 600;
}

.snippet-fallback-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.snippet-fallback-note a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
}

.snippet-fallback-note a:hover {
    text-decoration: underline;
}

/* Dashboard Tab Navigation */
.dashboard-nav {
    display: flex;
    gap: 0.75rem;
    margin: 0.5rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.nav-tab {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    transition: color var(--transition-speed), background-color var(--transition-speed), border-color var(--transition-speed);
}

.nav-tab:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

.nav-tab.active {
    color: var(--color-blue);
    background-color: var(--color-blue-bg);
    border-color: rgba(59, 130, 246, 0.25);
}

/* Communities Single Page Layout */
.dashboard-layout-single {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 2rem 2rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Make icons for communities stats stand out */
.icon-blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-blue);
}

.icon-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
}

.icon-amber {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-amber);
}

.stat-icon i {
    font-size: 1.25rem;
}

/* Subscription Card Styling */
.subscription-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.subscription-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.select-box select {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.select-box select:focus {
    border-color: var(--color-blue);
}

.btn-subscribe {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--color-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-subscribe:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-subscribe:active {
    transform: translateY(0);
}

.subscription-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.subscription-message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.subscription-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.hidden {
    display: none;
}

/* Custom Table Column Constraints */
.wp-embed-context .bill-title-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-embed-context .status-cell {
    width: 150px;
    min-width: 140px;
}

.wp-embed-context .date-cell {
    width: 110px;
    min-width: 110px;
    white-space: nowrap !important;
}

.wp-embed-context .desc-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Select option compatibility resets */
.wp-embed-context select {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}

.wp-embed-context select option {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

/* Dashboard Category Tabs */
.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.tab-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--color-blue);
    background-color: var(--color-blue-bg);
    border-color: rgba(59, 130, 246, 0.25);
}

/* User Design Style Overrides */
.wp-embed-context .filter-header h2,
.wp-embed-context .table-card-header h2,
.wp-embed-context .table-header h2 {
    color: #ffffff !important;
}

.wp-embed-context .stat-value {
    color: #ffffff !important;
}

.wp-embed-context .data-table {
    font-size: 0.7rem !important; /* Even smaller columns text */
}

.wp-embed-context .data-table td,
.wp-embed-context .data-table th {
    font-size: 0.7rem !important;
}

.wp-embed-context .badge {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.5rem !important;
}

/* Status-colored link styling for bill numbers */
.wp-embed-context .bill-link.link-badge-introduced {
    color: #3b82f6 !important; /* introduced blue */
}
.wp-embed-context .bill-link.link-badge-committee {
    color: #f59e0b !important; /* committee amber */
}
.wp-embed-context .bill-link.link-badge-enacted {
    color: #10b981 !important; /* enacted green */
}
.wp-embed-context .bill-link.link-badge-dead {
    color: #ef4444 !important; /* dead/vetoed red */
}
.wp-embed-context .bill-link:hover {
    text-decoration: underline !important;
    opacity: 0.85;
}

