/* Representative Finder Styles */

.tlp-rep-finder-wrapper,
.tlp-contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.tlp-rep-finder-header,
.tlp-contact-header {
    text-align: center;
    margin-bottom: 30px;
}

.tlp-rep-finder-header h2,
.tlp-contact-header h2 {
    color: #1a365d;
    font-size: 28px;
    margin: 0 0 10px 0;
}

.tlp-rep-finder-header p,
.tlp-contact-header p {
    color: #666;
    font-size: 16px;
}

.tlp-rep-finder-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.tlp-finder-input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 80px 100px;
    gap: 10px;
    margin-bottom: 15px;
}

.tlp-finder-input-group input,
.tlp-finder-input-group select {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
}

.tlp-finder-btn {
    width: 100%;
    background: #1a365d;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.tlp-finder-btn:hover {
    background: #2c5282;
}

.tlp-rep-results {
    margin-top: 30px;
}

.tlp-rep-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.tlp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #1a365d;
    border-radius: 50%;
    animation: tlp-spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes tlp-spin {
    to { transform: rotate(360deg); }
}

.tlp-rep-list {
    display: grid;
    gap: 20px;
}

.tlp-rep-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tlp-rep-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.tlp-rep-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tlp-rep-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #a0aec0;
    background: #e2e8f0;
}

.tlp-rep-info {
    flex: 1;
}

.tlp-rep-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 5px 0;
}

.tlp-rep-title {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.tlp-rep-party {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tlp-rep-party.democrat {
    background: #dbeafe;
    color: #1d4ed8;
}

.tlp-rep-party.republican {
    background: #fee2e2;
    color: #dc2626;
}

.tlp-rep-party.independent {
    background: #e5e7eb;
    color: #374151;
}

.tlp-rep-status {
    margin-top: 15px;
}

.tlp-pledged-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d4edda;
    color: #155724;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.tlp-not-pledged {
    color: #c53030;
    font-size: 14px;
}

.tlp-rep-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tlp-rep-action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.tlp-btn-contact {
    background: #c53030;
    color: #fff;
    border: none;
    cursor: pointer;
}

.tlp-btn-contact:hover {
    background: #9b2c2c;
}

.tlp-btn-website {
    background: #fff;
    color: #1a365d;
    border: 1px solid #e2e8f0;
}

.tlp-btn-website:hover {
    border-color: #1a365d;
}

/* No Results */
.tlp-no-results {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.tlp-no-results p {
    margin: 0 0 15px 0;
    color: #666;
}

/* Email Preview */
.tlp-email-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.tlp-email-preview h3 {
    color: #1a365d;
    margin: 0 0 15px 0;
}

.tlp-email-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.tlp-email-body {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.tlp-email-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Contact Form */
.tlp-contact-actions {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.tlp-contact-actions h3 {
    color: #1a365d;
    margin: 0 0 20px 0;
}

.tlp-contact-field {
    margin-bottom: 15px;
}

.tlp-contact-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.tlp-contact-field input,
.tlp-contact-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
}

.tlp-contact-btn {
    background: #c53030;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.tlp-contact-btn:hover {
    background: #9b2c2c;
}

.tlp-contact-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.tlp-contact-message.success {
    background: #d4edda;
    color: #155724;
}

.tlp-contact-message.error {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 600px) {
    .tlp-finder-input-group {
        grid-template-columns: 1fr;
    }

    .tlp-rep-card {
        flex-direction: column;
        text-align: center;
    }

    .tlp-rep-photo {
        margin: 0 auto;
    }

    .tlp-rep-actions {
        justify-content: center;
    }
}
