/* California YIMBY Endorsement Lookup Styles */

.ca-yimby-endorsement-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ca-yimby-endorsement-container h3 {
    margin-top: 0;
    color: #1d4e89;
    font-size: 24px;
}

.ca-yimby-endorsement-container p {
    color: #666;
    margin-bottom: 20px;
}

.ca-yimby-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #1d4e89;
    box-shadow: 0 0 0 2px rgba(29, 78, 137, 0.1);
}

.ca-yimby-button {
    background: #1d4e89;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.ca-yimby-button:hover {
    background: #153a6b;
}

.ca-yimby-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ca-loading {
    text-align: center;
    padding: 20px;
    color: #1d4e89;
    font-style: italic;
}

.ca-error {
    background: #fee;
    border-left: 4px solid #c33;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #c33;
}

.ca-results {
    margin-top: 30px;
}

.ca-results h4 {
    color: #1d4e89;
    margin-bottom: 20px;
    font-size: 20px;
}

.legislator-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legislator-card:last-child {
    margin-bottom: 0;
}

.legislator-header {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.endorsement-photo {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 20px;
}

.legislator-title {
    flex: 1;
}

.legislator-title h5 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #333;
    font-weight: 700;
}

.legislator-title h5 a {
    color: #1d4e89;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legislator-title h5 a:hover {
    color: #153a6b;
    text-decoration: underline;
}

.legislator-title .office-title {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.legislator-party {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e8e8e8;
    color: #333;
}

.legislator-party.democratic {
    background: #d4e6f1;
    color: #1d4e89;
}

.legislator-party.republican {
    background: #fadbd8;
    color: #c0392b;
}

.legislator-info {
    margin-top: 15px;
}

.info-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.info-item strong {
    min-width: 80px;
    color: #666;
    font-weight: 600;
}

.info-item a {
    color: #1d4e89;
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

.legislator-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.legislator-links a {
    display: inline-block;
    margin-right: 15px;
    color: #1d4e89;
    text-decoration: none;
    font-size: 14px;
}

.legislator-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .ca-legislator-lookup-container {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .legislator-header {
        flex-direction: column;
        text-align: center;
    }
    
    .legislator-photo,
    .legislator-photo-placeholder {
        margin: 0 auto 15px auto;
    }
}
