/* General Body & Typography */
body {
    background-color: #121212; /* Very dark grey */
    color: #e0e0e0; /* Off-white for less harshness */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: "Georgia", "Times New Roman", serif;
    color: #ffffff;
    line-height: 1.2;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; border-bottom: 1px solid #333; padding-bottom: 10px; margin-top: 40px;}
h3 { font-size: 1.5em; }

p {
    margin-bottom: 1em;
}

a {
    color: #8cb4ff; /* A nice, soft blue for links */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #b8d4ff;
}

/* myapp/static/myapp/css/style.css */

/* --- REPLACE your old header styles with this block --- */

/* Header & Navigation */
.header {
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
}

.header-top {
    display: flex;
    justify-content: space-between; /* Pushes logo left, tagline right */
    align-items: baseline;      /* Aligns text along the bottom */
}

.header .logo a {
    font-size: 2.2em; /* Slightly larger logo text */
    font-weight: bold;
    color: #fff;
    font-family: "Georgia", "Times New Roman", serif;
}

.tagline {
    margin: 0;
    padding: 0;
    font-size: 1em;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: normal;
}

.header-nav {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 25px; /* Adds space between nav links */
}

.header-nav a {
    font-size: 1.1em;
}

/* Bill List Styling (Home Page) */
.bill-list {
    list-style-type: none;
    padding: 0;
}

.bill-item {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.2s ease-in-out;
}

.bill-item:hover {
    border-color: #8cb4ff;
}

.bill-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.bill-item p {
    margin: 0;
    font-size: 0.9em;
    color: #aaa;
}

/* Bill Detail Page Styling */
.bill-header h1, .bill-header h2 {
    margin: 0;
    padding: 0;
    border: none;
}
.bill-header h2 {
    font-size: 1.2em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #bbb;
    margin-top: 5px;
    font-weight: normal;
}

.summary-box {
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #8cb4ff;
    padding: 1px 25px;
    margin-top: 30px;
    white-space: pre-wrap; /* Preserves line breaks from the AI */
}

.official-link {
    display: inline-block;
    background-color: #8cb4ff;
    color: #121212;
    padding: 12px 20px;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 30px;
    transition: background-color 0.2s ease-in-out;
}

.official-link:hover {
    background-color: #b8d4ff;
    color: #121212;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    font-size: 0.9em;
    color: #777;
    border-top: 1px solid #333;
}

/* myapp/static/myapp/css/style.css */

/* ... (add this to the end of your existing CSS) ... */

/* Sponsorship Tag Styling */
.sponsorship-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    color: #fff;
}

.sponsorship-tag.democrat {
    background-color: #3a77d2;
}

.sponsorship-tag.republican {
    background-color: #d23a3a;
}

.sponsorship-tag.bi-partisan {
    background-color: #843ad2;
}

.sponsorship-tag.unknown {
    background-color: #666;
}

.official-title {
    font-size: 0.9em;
    color: #999; /* Lighter grey to de-emphasize */
    margin: 5px 0 0 0 !important; /* Ensure it's positioned correctly */
    padding: 0 !important;
}

/* myapp/static/myapp/css/style.css */

/* ... (add this to the end of your existing CSS) ... */

/* Filter Navigation */
.filter-nav {
    margin: 30px 0;
    padding: 10px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center; /* <-- ADD THIS LINE */
}

.filter-nav a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.filter-nav a:hover {
    background-color: #333;
}

.filter-nav a.active {
    background-color: #8cb4ff;
    color: #121212;
    font-weight: bold;
}

/* myapp/static/myapp/css/style.css */

/* ... (add this to the end of your existing CSS) ... */

/* Tooltip Container */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help; /* Change cursor to show it's interactive */
}

/* Tooltip Text Box */
.tooltip::after {
    content: attr(data-tooltip); /* Use the data-tooltip attribute as content */
    position: absolute;
    bottom: 125%; /* Position above the element */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    line-height: 1.4;
    white-space: pre-wrap; /* Allow multi-line tooltips */
    width: 250px; /* Set a max width */
    z-index: 10;
    
    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
}

/* Tooltip Arrow */
.tooltip::before {
    content: '';
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(20px); /* Position below the box */
    border: 8px solid transparent;
    border-top-color: #333;
    z-index: 11;

    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
}

/* Show tooltip on hover */
.tooltip:hover::after,
.tooltip:hover::before {
    visibility: visible;
    opacity: 1;
}

/* myapp/static/myapp/css/style.css */

/* ... (add this to the end of your existing CSS) ... */

/* Session Selector Form */
#session-form {
    margin-bottom: 20px;
}

#session-form label {
    font-weight: bold;
    margin-right: 10px;
}

#session-form select {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333;
    padding: 8px;
    border-radius: 5px;
    font-size: 1em;
}

/* Styling for "How a Bill Becomes Law" Page */

.subtitle {
    font-size: 1.1em;
    color: #bbb;
    margin-top: -15px;
}

.flowchart-placeholder {
    background-color: #1e1e1e;
    border: 2px dashed #333;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 40px 0;
    color: #777;
    font-weight: bold;
}

.process-container {
    margin-top: 40px;
}

.process-step {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 25px;
}

.process-step h2 {
    border-bottom: none;
    margin-top: 0;
    font-size: 1.8em;
}

.process-step h2 span {
    color: #8cb4ff; /* Accent blue color */
    margin-right: 10px;
}

/* myapp/static/myapp/css/style.css */

/* ... (add this to the end of your existing CSS) ... */

/* Spacing for the new Impact Analysis header */
.impact-header {
    margin-top: 40px; /* Add space above the new section */
}

/* /static/css/style.css */

/* ... (add this to the end of your existing CSS) ... */

/* Bill Status Badge Styling */
.bill-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    color: #121212; /* Dark text for light backgrounds */
    margin-top: 15px; /* Space it out from the title */
    letter-spacing: 0.5px;
}

/* Status for successful bills (Passed, Became Law) */
.status-passed {
    background-color: #4CAF50; /* A clear, positive green */
    color: #fff;
}

/* Status for failed bills (Failed, Vetoed) */
.status-failed {
    background-color: #f44336; /* A standard, clear red */
    color: #fff;
}

/* Status for bills in-progress */
.status-inprogress {
    background-color: #8cb4ff; /* Use your existing accent blue */
}

/* --- NEW STYLES FOR IMPACT ANALYSIS --- */
.impact-analysis-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.impact-box {
    flex: 1; /* Each box takes up equal space */
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1px 25px 10px 25px;
    border-radius: 8px;
}

.impact-box h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.impact-box.benefit {
    border-left: 4px solid #4CAF50; /* Green for benefit */
}

.impact-box.suffer {
    border-left: 4px solid #f44336; /* Red for suffer */
}