/* GPS Advocacy Engine — Scorecard Styles */
/* GPS dark theme conventions */

.gps-ae-page {
    background: #0a0a0f;
    min-height: 80vh;
}

.gps-ae-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2em 1.5em 4em;
}

/* Header */
.gps-ae-page-header {
    text-align: center;
    margin-bottom: 2em;
    padding-bottom: 1.5em;
    border-bottom: 2px solid #dc2626;
}

.gps-ae-title {
    color: #ffffff;
    font-size: 2em;
    font-weight: 800;
    margin: 0 0 0.3em;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.gps-ae-subtitle {
    color: #888;
    font-size: 1em;
    margin: 0;
    font-style: italic;
}

.gps-ae-back-link {
    color: #f87171;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
    margin-bottom: 1.5em;
}

.gps-ae-back-link:hover {
    color: #dc2626;
}

/* Section titles */
.gps-ae-section-title {
    color: #e0e0e0;
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #2a2a35;
}

/* Zip Lookup */
.gps-ae-lookup {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-zip-label {
    color: #e0e0e0;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5em;
}

.gps-ae-zip-row {
    display: flex;
    gap: 8px;
}

.gps-ae-zip-input {
    flex: 1;
    padding: 10px 14px;
    background: #0a0a0f;
    border: 1px solid #2a2a35;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1em;
}

.gps-ae-zip-input:focus {
    outline: none;
    border-color: #dc2626;
}

.gps-ae-zip-results {
    margin-top: 1em;
}

.gps-ae-zip-result-card {
    background: #1a1a25;
    border: 1px solid #2a2a35;
    border-radius: 8px;
    padding: 1em;
    margin-top: 0.5em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gps-ae-zip-result-card .gps-ae-grade-badge {
    font-size: 1.3em;
}

.gps-ae-zip-result-info {
    flex: 1;
}

.gps-ae-zip-result-info a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 700;
}

.gps-ae-zip-result-info a:hover {
    color: #f87171;
}

.gps-ae-zip-result-info p {
    color: #888;
    margin: 2px 0 0;
    font-size: 0.85em;
}

/* Summary Stats */
.gps-ae-summary {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
}

.gps-ae-stat {
    text-align: center;
}

.gps-ae-stat-value {
    display: block;
    color: #f87171;
    font-size: 1.5em;
    font-weight: 800;
}

.gps-ae-stat-label {
    display: block;
    color: #888;
    font-size: 0.75em;
    margin-top: 4px;
}

/* Grade Distribution */
.gps-ae-distribution {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-grade-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.gps-ae-grade-letter {
    width: 24px;
    text-align: center;
    font-weight: 800;
    font-size: 1em;
}

.gps-ae-bar-track {
    flex: 1;
    height: 24px;
    background: #1a1a25;
    border-radius: 4px;
    overflow: hidden;
}

.gps-ae-bar-fill {
    height: 100%;
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.3s;
}

.gps-ae-bar-count {
    color: #888;
    font-size: 0.85em;
    width: 30px;
    text-align: right;
}

/* Grade colors */
.grade-a, .grade-a .gps-ae-bar-fill { color: #22c55e; background: #22c55e; }
.grade-b, .grade-b .gps-ae-bar-fill { color: #84cc16; background: #84cc16; }
.grade-c, .grade-c .gps-ae-bar-fill { color: #eab308; background: #eab308; }
.grade-d, .grade-d .gps-ae-bar-fill { color: #f97316; background: #f97316; }
.grade-f, .grade-f .gps-ae-bar-fill { color: #ef4444; background: #ef4444; }

/* Grade badge */
.gps-ae-grade-badge {
    display: inline-block;
    font-weight: 800;
    font-size: 0.9em;
    padding: 4px 10px;
    border-radius: 4px;
    background: #1a1a25;
}

.gps-ae-grade-badge.grade-a { background: rgba(34,197,94,0.15); color: #22c55e; }
.gps-ae-grade-badge.grade-b { background: rgba(132,204,22,0.15); color: #84cc16; }
.gps-ae-grade-badge.grade-c { background: rgba(234,179,8,0.15); color: #eab308; }
.gps-ae-grade-badge.grade-d { background: rgba(249,115,22,0.15); color: #f97316; }
.gps-ae-grade-badge.grade-f { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Filters */
.gps-ae-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1em;
}

.gps-ae-select {
    padding: 8px 12px;
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.85em;
}

/* Legislator Table */
.gps-ae-list {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-table-wrap {
    overflow-x: auto;
}

.gps-ae-table {
    width: 100%;
    border-collapse: collapse;
}

.gps-ae-table th {
    color: #888;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #2a2a35;
}

.gps-ae-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a25;
    color: #bbb;
    font-size: 0.9em;
}

.gps-ae-table tr:hover {
    background: #1a1a25;
}

.gps-ae-leg-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
}

.gps-ae-leg-link:hover {
    color: #f87171;
}

.gps-ae-yes { color: #22c55e; }
.gps-ae-no { color: #666; }

/* Legislator Detail Page */
.gps-ae-leg-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 1.5em;
}

.gps-ae-leg-photo img,
.gps-ae-photo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.gps-ae-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 800;
    color: #fff;
}

.gps-ae-photo-placeholder.party-r { background: #7f1d1d; }
.gps-ae-photo-placeholder.party-d { background: #1e3a5f; }
.gps-ae-photo-placeholder:not(.party-r):not(.party-d) { background: #2a2a35; }

.gps-ae-leg-name {
    color: #e0e0e0;
    font-size: 1.5em;
    font-weight: 800;
    margin: 0 0 4px;
}

.gps-ae-leg-detail {
    color: #888;
    margin: 0 0 4px;
    font-size: 0.9em;
}

.gps-ae-leg-committees {
    color: #666;
    font-size: 0.8em;
    margin: 0;
}

/* Grade Card */
.gps-ae-grade-card {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 2em;
    margin-bottom: 1.5em;
    text-align: center;
}

.gps-ae-grade-display {
    display: inline-block;
}

.gps-ae-grade-big {
    display: block;
    font-size: 4em;
    font-weight: 800;
    line-height: 1;
}

.gps-ae-grade-score {
    display: block;
    color: #888;
    font-size: 0.9em;
    margin-top: 4px;
}

.gps-ae-override-note {
    color: #fbbf24;
    font-size: 0.85em;
    font-style: italic;
    margin: 8px 0 0;
}

/* Score Breakdown */
.gps-ae-breakdown {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-dim-row {
    margin-bottom: 1.2em;
}

.gps-ae-dim-label {
    display: flex;
    justify-content: space-between;
    color: #e0e0e0;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.gps-ae-dim-score {
    color: #888;
}

.gps-ae-dim-bar-track {
    height: 8px;
    background: #1a1a25;
    border-radius: 4px;
    overflow: hidden;
}

.gps-ae-dim-bar-fill {
    height: 100%;
    background: #dc2626;
    border-radius: 4px;
    transition: width 0.3s;
}

.gps-ae-dim-detail {
    color: #666;
    font-size: 0.8em;
    margin: 4px 0 0;
}

/* Communications */
.gps-ae-comms,
.gps-ae-district-data,
.gps-ae-responses,
.gps-ae-history,
.gps-ae-take-action,
.gps-ae-no-responses {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-comms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
    text-align: center;
}

.gps-ae-comm-icon {
    font-size: 1.5em;
    display: block;
}

.gps-ae-comm-count {
    display: block;
    color: #e0e0e0;
    font-size: 1.5em;
    font-weight: 800;
}

.gps-ae-comm-label {
    display: block;
    color: #888;
    font-size: 0.75em;
}

/* District data */
.gps-ae-district-stats p {
    color: #bbb;
    margin: 6px 0;
    font-size: 0.9em;
}

.gps-ae-district-stats strong {
    color: #e0e0e0;
}

/* Responses */
.gps-ae-response-item {
    padding: 10px 0;
    border-bottom: 1px solid #1a1a25;
}

.gps-ae-response-date {
    color: #888;
    font-size: 0.8em;
    margin-right: 8px;
}

.gps-ae-response-type {
    color: #22c55e;
    font-weight: 600;
    font-size: 0.85em;
}

.gps-ae-response-summary {
    color: #bbb;
    font-size: 0.85em;
    margin: 4px 0 0;
}

.gps-ae-no-responses p {
    color: #888;
    font-style: italic;
}

.gps-ae-no-responses a {
    color: #f87171;
}

/* Grade History */
.gps-ae-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.gps-ae-history-date {
    color: #888;
    font-size: 0.85em;
    width: 80px;
}

.gps-ae-history-score {
    color: #666;
    font-size: 0.85em;
}

.gps-ae-override-tag {
    color: #fbbf24;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Take Action buttons */
.gps-ae-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Methodology */
.gps-ae-methodology {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.gps-ae-methodology-content p {
    color: #bbb;
    font-size: 0.9em;
    line-height: 1.6;
}

.gps-ae-dim-list {
    margin: 1em 0;
}

.gps-ae-dim {
    margin-bottom: 1em;
}

.gps-ae-dim strong {
    color: #e0e0e0;
    font-size: 0.9em;
}

.gps-ae-dim p {
    color: #888;
    font-size: 0.85em;
    margin: 4px 0 0;
}

.gps-ae-scale {
    color: #e0e0e0 !important;
}

.gps-ae-note {
    color: #666 !important;
    font-size: 0.8em !important;
    font-style: italic;
}

/* CTA */
.gps-ae-cta {
    text-align: center;
    margin: 2em 0;
}

/* Buttons */
.gps-ae-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.gps-ae-btn-primary {
    background: #dc2626;
    color: #ffffff;
}

.gps-ae-btn-primary:hover {
    background: #b91c1c;
    color: #ffffff;
}

.gps-ae-btn-secondary {
    background: #1a1a25;
    color: #e0e0e0;
    border: 1px solid #2a2a35;
}

.gps-ae-btn-secondary:hover {
    border-color: #dc2626;
    color: #f87171;
}

.gps-ae-btn-lg {
    padding: 14px 28px;
    font-size: 1em;
}

/* Compare */
.gps-ae-compare-grid {
    display: grid;
    gap: 1em;
}

.gps-ae-compare-col {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
}

.gps-ae-compare-header {
    text-align: center;
    margin-bottom: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid #2a2a35;
}

.gps-ae-compare-header h3 {
    color: #e0e0e0;
    margin: 8px 0 2px;
    font-size: 1em;
}

.gps-ae-compare-header h3 a {
    color: #e0e0e0;
    text-decoration: none;
}

.gps-ae-compare-header p {
    color: #888;
    font-size: 0.8em;
    margin: 0;
}

.gps-ae-compare-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #bbb;
    font-size: 0.85em;
    border-bottom: 1px solid #1a1a25;
}

.gps-ae-compare-total {
    font-weight: 700;
    color: #e0e0e0;
}

.gps-ae-compare-comms {
    margin-top: 1em;
    text-align: center;
}

.gps-ae-compare-comms p {
    color: #888;
    font-size: 0.8em;
    margin: 4px 0;
}

/* Action Report Form */
.gps-ae-report-form {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-top: 1em;
}

.gps-ae-form-label {
    color: #e0e0e0;
    font-weight: 700;
    margin: 0 0 12px;
}

.gps-ae-radio-label {
    display: block;
    color: #bbb;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: #1a1a25;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.gps-ae-radio-label:hover {
    background: #222230;
}

.gps-ae-radio-label input {
    accent-color: #dc2626;
    margin-right: 8px;
}

.gps-ae-success-msg,
.gps-ae-info-msg {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 2em;
    text-align: center;
}

.gps-ae-success-msg p { color: #22c55e; }
.gps-ae-info-msg p { color: #fbbf24; }
.gps-ae-error-msg { color: #ef4444; }

/* Preferences */
.gps-ae-prefs-form {
    background: #141418;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 1.5em;
    margin-top: 1em;
}

.gps-ae-form-row {
    margin-bottom: 1em;
}

.gps-ae-form-row label {
    color: #e0e0e0;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

.gps-ae-input {
    width: 100%;
    padding: 10px 14px;
    background: #0a0a0f;
    border: 1px solid #2a2a35;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    box-sizing: border-box;
}

.gps-ae-input:focus {
    outline: none;
    border-color: #dc2626;
}

.gps-ae-willingness {
    border: none;
    padding: 0;
    margin: 1em 0;
}

.gps-ae-willingness legend {
    color: #999;
    font-size: 0.85em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.gps-ae-willingness label {
    display: block;
    color: #bbb;
    font-size: 0.85em;
    padding: 6px 0;
    cursor: pointer;
}

.gps-ae-willingness input[type="checkbox"] {
    accent-color: #dc2626;
    margin-right: 8px;
}

.gps-ae-empty {
    color: #888;
    text-align: center;
    padding: 2em;
}

.gps-ae-empty a {
    color: #f87171;
}

/* Responsive */
@media (max-width: 600px) {
    .gps-ae-container {
        padding: 1em 1em 3em;
    }
    .gps-ae-title {
        font-size: 1.5em;
    }
    .gps-ae-stat-grid {
        grid-template-columns: 1fr;
    }
    .gps-ae-comms-grid {
        grid-template-columns: 1fr;
    }
    .gps-ae-leg-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .gps-ae-filters {
        flex-direction: column;
    }
    .gps-ae-action-buttons {
        flex-direction: column;
    }
    .gps-ae-compare-grid {
        grid-template-columns: 1fr !important;
    }
}
