/* =============================================================================
   Legislation Tracker — Styles
   Matches: legislation.html design
   File: astra-child/inc/legislation-tracker.css
   ============================================================================= */

:root {
    --teal-dark:   #0F6E56;
    --teal-mid:    #1D9E75;
    --teal-light:  #E1F5EE;
    --teal-accent: #5DCAA5;
    --navy:        #042C53;
    --warm-off:    #F8F5EF;
    --text-dark:   #1a1a1a;
    --text-muted:  #5a5a54;
}


/* -----------------------------------------------------------------------------
   Tracker Meta Bar
   ----------------------------------------------------------------------------- */

.tracker-meta {
    background: white;
    padding: 20px 40px;
    border-bottom: 1px solid #e0ede8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-label {
    font-size: 13px;
    color: var(--text-muted);
}

.meta-label strong {
    color: var(--text-dark);
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tracker-meta .filter-row .filter-btn {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid #d0ddd8;
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    line-height: normal;
    box-shadow: none;
    width: auto;
    display: inline-block;
}

.tracker-meta .filter-row .filter-btn.active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.tracker-meta .filter-row .filter-btn:hover:not(.active) {
    background: var(--teal-light);
    border-color: var(--teal-mid);
    color: var(--teal-dark);
    box-shadow: none;
}

/* -----------------------------------------------------------------------------
   Tracker Body
   ----------------------------------------------------------------------------- */

.tracker-body {
    padding: 40px;
}

.tracker-section {
    margin-bottom: 48px;
}

.tracker-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0ede8;
}

.tracker-section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
}


/* -----------------------------------------------------------------------------
   Level Badges
   ----------------------------------------------------------------------------- */

.level-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 100px;
    font-weight: 500;
}

.lb-state            { background: #E6F1FB; color: #0C447C; }
.lb-county           { background: #EEEDFE; color: #3C3489; }
.lb-municipal        { background: #E1F5EE; color: #085041; }

/* Slug-based fallbacks */
.lb-state-legislature { background: #E6F1FB; color: #0C447C; }
.lb-county-level      { background: #EEEDFE; color: #3C3489; }
.lb-municipal-level   { background: #E1F5EE; color: #085041; }


/* -----------------------------------------------------------------------------
   Bill Cards
   ----------------------------------------------------------------------------- */

.bill-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0ede8;
    padding: 24px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: start;
    transition: box-shadow 0.2s;
}

.bill-card:hover {
    box-shadow: 0 4px 16px rgba(4, 44, 83, 0.06);
}

.bill-id {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
}

.bill-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 6px;
}

.bill-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.bill-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bill-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--warm-off);
    color: var(--text-muted);
    border: 1px solid #e0ede8;
    line-height: 100%;
}


/* -----------------------------------------------------------------------------
   Status Column
   ----------------------------------------------------------------------------- */

.bill-status-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 140px;
}

.status-pill {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 100px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 100%;
}

.sp-active    { background: #E1F5EE; color: #085041; }
.sp-committee { background: #FAEEDA; color: #633806; }
.sp-passed    { background: #E6F1FB; color: #0C447C; }
.sp-watch     { background: #FAECE7; color: #712B13; }
.sp-win       { background: #EAF3DE; color: #27500A; }

.our-position {
    font-size: 11px;
    font-weight: 500;
}

.pos-support, .pos-supported { color: var(--teal-dark); }
.pos-oppose                  { color: #993C1D; }
.pos-neutral                 { color: var(--text-muted); }

.tracker-body .bill-card .bill-action-btn {
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 6px;
    background: var(--teal-mid);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
    line-height:100%;
}

.bill-action-btn:hover {
    background: var(--teal-dark);
    color: white;
    text-decoration: none;
}


/* -----------------------------------------------------------------------------
   No Bills Placeholder
   ----------------------------------------------------------------------------- */

.tracker-no-bills {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: var(--warm-off);
    border: 1px dashed #c8ddd5;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

.tracker-no-bills-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.tracker-no-bills p {
    margin: 0;
}

/* Hidden cards via JS filter */
.bill-card.is-hidden,
.tracker-section.is-hidden {
    display: none;
}


/* -----------------------------------------------------------------------------
   Wins Section
   ----------------------------------------------------------------------------- */

.wins-section {
    padding: 56px 40px;
    background: var(--teal-light);
}

.section-tag {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-mid);
    font-weight: 500;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 12px;
}

.wins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.win-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #c8e8d8;
}

.win-year {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal-mid);
    font-weight: 500;
    margin-bottom: 8px;
}

.win-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.4;
}

.win-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}


/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .tracker-meta,
    .tracker-body,
    .wins-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .bill-card {
        grid-template-columns: 1fr;
    }

    .bill-status-col {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .wins-grid {
        grid-template-columns: 1fr;
    }

    .tracker-section-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .filter-row {
        gap: 6px;
    }

    .bill-action-btn {
        width: 100%;
        text-align: center;
    }
}