/* GPS Contact Directory — Dark Theme */

/* Reset & Base */
.gps-cd-page {
    margin: 0;
    padding: 0;
    background: #0a0a0f;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.gps-cd-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

/* Breadcrumb */
.gps-cd-breadcrumb {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 24px;
}
.gps-cd-breadcrumb a {
    color: #aaa;
    text-decoration: none;
}
.gps-cd-breadcrumb a:hover {
    color: #dc2626;
}

/* Page Header */
.gps-cd-page-header {
    margin-bottom: 32px;
}
.gps-cd-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.gps-cd-subtitle {
    color: #999;
    font-size: 1rem;
    margin: 0;
}

/* Section Title */
.gps-cd-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1a1a2e;
}
.gps-cd-count {
    font-weight: 400;
    color: #666;
    font-size: 0.9em;
}

/* Buttons */
.gps-cd-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.gps-cd-btn-primary {
    background: #dc2626;
    color: #fff;
}
.gps-cd-btn-primary:hover {
    background: #b91c1c;
    color: #fff;
}
.gps-cd-btn-secondary {
    background: #1a1a2e;
    color: #e0e0e0;
    border: 1px solid #2a2a3e;
}
.gps-cd-btn-secondary:hover {
    background: #252540;
    color: #fff;
}
.gps-cd-btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    background: #1a1a2e;
    color: #ccc;
    border: 1px solid #2a2a3e;
    border-radius: 4px;
}
.gps-cd-btn-sm:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* Inputs & Selects */
.gps-cd-input, .gps-cd-select {
    background: #111;
    border: 1px solid #2a2a3e;
    color: #e0e0e0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}
.gps-cd-input:focus, .gps-cd-select:focus {
    border-color: #dc2626;
}
.gps-cd-input::placeholder {
    color: #555;
}
.gps-cd-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ZIP Lookup */
.gps-cd-lookup {
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
}
.gps-cd-lookup-form {
    margin-top: 12px;
}
.gps-cd-zip-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.gps-cd-zip-label {
    color: #bbb;
    font-size: 0.9rem;
    margin-right: 4px;
}
.gps-cd-zip-input {
    background: #111;
    border: 1px solid #2a2a3e;
    color: #e0e0e0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 1.1rem;
    width: 120px;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
}
.gps-cd-zip-input:focus {
    border-color: #dc2626;
}
.gps-cd-address-toggle {
    margin: 12px 0 0;
    font-size: 0.85rem;
}
.gps-cd-address-toggle a {
    color: #dc2626;
    text-decoration: none;
}
.gps-cd-address-toggle a:hover {
    text-decoration: underline;
}
.gps-cd-address-form {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.gps-cd-address-form .gps-cd-input {
    flex: 1;
    min-width: 180px;
}
.gps-cd-lookup-results {
    margin-top: 24px;
}

/* Lookup Result Cards */
.gps-cd-result-header {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.gps-cd-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.gps-cd-result-card {
    background: #111;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.gps-cd-result-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a2e;
}
.gps-cd-result-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gps-cd-result-info {
    flex: 1;
    min-width: 0;
}
.gps-cd-result-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}
.gps-cd-result-title {
    color: #888;
    font-size: 0.8rem;
    margin: 2px 0;
}
.gps-cd-result-grade {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px;
}
.gps-cd-result-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.gps-cd-result-actions a {
    font-size: 0.78rem;
    color: #dc2626;
    text-decoration: none;
}
.gps-cd-result-actions a:hover {
    text-decoration: underline;
}
.gps-cd-result-officials {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #1a1a2e;
}
.gps-cd-result-officials h4 {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 8px;
}

/* Category Grid */
.gps-cd-categories {
    margin-bottom: 32px;
}
.gps-cd-cat-grid, .gps-cd-committee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gps-cd-cat-card {
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    padding: 24px 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.15s ease;
}
.gps-cd-cat-card:hover {
    border-color: #dc2626;
    background: #12121f;
    transform: translateY(-2px);
}
.gps-cd-cat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.gps-cd-cat-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}
.gps-cd-cat-count {
    color: #888;
    font-size: 0.8rem;
}

/* Filters */
.gps-cd-filters {
    margin-bottom: 24px;
}
.gps-cd-filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.gps-cd-filter-row .gps-cd-select,
.gps-cd-filter-row .gps-cd-input {
    min-width: 140px;
}
.gps-cd-filter-row .gps-cd-input {
    flex: 1;
}

/* Legislator Grid */
.gps-cd-leg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.gps-cd-leg-card {
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s ease;
    display: block;
}
.gps-cd-leg-card:hover {
    border-color: #dc2626;
    transform: translateY(-2px);
}
.gps-cd-leg-photo {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}
.gps-cd-leg-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.gps-cd-leg-photo-placeholder,
.gps-cd-profile-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #555;
    font-weight: 700;
}
.gps-cd-leg-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gps-cd-leg-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}
.gps-cd-leg-meta {
    color: #888;
    font-size: 0.78rem;
}

/* Grade Badges */
.gps-cd-grade-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid #0a0a0f;
}
.gps-cd-grade-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
}
.grade-a { background: #16a34a; color: #fff; }
.grade-b { background: #65a30d; color: #fff; }
.grade-c { background: #ca8a04; color: #fff; }
.grade-d { background: #ea580c; color: #fff; }
.grade-f { background: #dc2626; color: #fff; }

/* Profile Page */
.gps-cd-profile-header {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 28px;
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 12px;
}
.gps-cd-profile-photo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #1a1a2e;
}
.gps-cd-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gps-cd-profile-info {
    flex: 1;
}
.gps-cd-profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}
.gps-cd-profile-title {
    color: #bbb;
    font-size: 1.1rem;
    margin: 0 0 2px;
}
.gps-cd-profile-party {
    color: #888;
    font-size: 0.9rem;
    margin: 0 0 16px;
}
.gps-cd-profile-grade {
    display: flex;
    align-items: center;
    gap: 14px;
}
.gps-cd-grade-label {
    color: #999;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gps-cd-scorecard-link {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.8rem;
}
.gps-cd-scorecard-link:hover {
    text-decoration: underline;
}

/* Profile Sections */
.gps-cd-profile-section {
    margin-bottom: 28px;
}

/* Contact Grid (profile page) */
.gps-cd-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.gps-cd-contact-item {
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    padding: 14px 18px;
}
.gps-cd-contact-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.gps-cd-contact-value {
    color: #e0e0e0;
    font-size: 0.9rem;
    text-decoration: none;
}
a.gps-cd-contact-value:hover {
    color: #dc2626;
}

/* Committee List (profile page) */
.gps-cd-committee-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gps-cd-committee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.15s;
}
.gps-cd-committee-item:hover {
    border-color: #dc2626;
}
.gps-cd-committee-name {
    color: #e0e0e0;
    font-weight: 500;
}
.gps-cd-committee-role {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Facility List */
.gps-cd-death-count {
    color: #dc2626;
    font-size: 0.9rem;
    margin: 0 0 12px;
    font-weight: 500;
}
.gps-cd-facility-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gps-cd-facility-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 6px;
}
.gps-cd-facility-name {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}
.gps-cd-facility-meta {
    color: #666;
    font-size: 0.8rem;
}

/* Profile Actions */
.gps-cd-profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 32px 0;
}

/* Contact Cards (media/officials) */
.gps-cd-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gps-cd-contact-card {
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    padding: 18px 22px;
    transition: border-color 0.15s;
}
.gps-cd-contact-card:hover {
    border-color: #2a2a3e;
}
.gps-cd-contact-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.gps-cd-contact-card-name {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.gps-cd-tag {
    background: #1a1a2e;
    color: #999;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.gps-cd-contact-card-title {
    color: #999;
    font-size: 0.85rem;
    margin: 4px 0 0;
}
.gps-cd-contact-card-location {
    color: #666;
    font-size: 0.8rem;
    margin: 2px 0 0;
}
.gps-cd-contact-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Global Search */
.gps-cd-global-search {
    margin-bottom: 32px;
}
.gps-cd-search-row {
    margin-top: 8px;
}
.gps-cd-search-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 14px 18px;
}
.gps-cd-search-results {
    margin-top: 16px;
}
.gps-cd-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: border-color 0.15s;
}
.gps-cd-search-item:hover {
    border-color: #dc2626;
}
.gps-cd-search-item-name {
    color: #fff;
    font-weight: 500;
}
.gps-cd-search-item-meta {
    color: #666;
    font-size: 0.8rem;
}

/* Help */
.gps-cd-help {
    background: #0f0f18;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 32px;
}
.gps-cd-help h3 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 8px;
}
.gps-cd-help p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}
.gps-cd-help a {
    color: #dc2626;
    text-decoration: none;
}
.gps-cd-help a:hover {
    text-decoration: underline;
}

/* Empty States */
.gps-cd-empty {
    text-align: center;
    padding: 48px 20px;
    color: #666;
}
.gps-cd-empty a {
    color: #dc2626;
    text-decoration: none;
}

/* Footer */
.gps-cd-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1a1a2e;
    text-align: center;
    font-size: 0.85rem;
}
.gps-cd-footer a {
    color: #999;
    text-decoration: none;
}
.gps-cd-footer a:hover {
    color: #dc2626;
}

/* Loading Spinner */
.gps-cd-loading {
    text-align: center;
    padding: 20px;
    color: #888;
}
.gps-cd-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: gps-cd-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes gps-cd-spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.gps-cd-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    border: 1px solid #2a2a3e;
}
.gps-cd-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .gps-cd-container {
        padding: 16px 16px 48px;
    }
    .gps-cd-title {
        font-size: 1.5rem;
    }
    .gps-cd-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .gps-cd-profile-grade {
        justify-content: center;
    }
    .gps-cd-grade-label {
        align-items: center;
    }
    .gps-cd-zip-row {
        flex-direction: column;
        align-items: stretch;
    }
    .gps-cd-zip-input {
        width: 100%;
    }
    .gps-cd-filter-row {
        flex-direction: column;
    }
    .gps-cd-filter-row .gps-cd-select,
    .gps-cd-filter-row .gps-cd-input {
        width: 100%;
        min-width: unset;
    }
    .gps-cd-leg-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .gps-cd-cat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .gps-cd-contact-grid {
        grid-template-columns: 1fr;
    }
    .gps-cd-profile-actions {
        flex-direction: column;
    }
    .gps-cd-profile-actions .gps-cd-btn {
        text-align: center;
    }
    .gps-cd-result-grid {
        grid-template-columns: 1fr;
    }
    .gps-cd-contact-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .gps-cd-cat-grid {
        grid-template-columns: 1fr;
    }
    .gps-cd-leg-grid {
        grid-template-columns: 1fr 1fr;
    }
}
