/**
 * People Leads Integration - Admin Styles
 */

/* General Admin Styling */
.leader-integration-settings {
    max-width: 1200px;
}

/* Cards and Status Indicators */
.leader-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.leader-connection-status {
    margin: 15px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.leader-status {
    padding: 8px 12px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.leader-status .dashicons {
    margin-right: 5px;
}

.leader-status-active {
    background: #f0f6e9;
    color: #46b450;
}

.leader-status-inactive {
    background: #fef1f1;
    color: #dc3232;
}

/* Test Connection */
#leader-test-status {
    font-weight: 500;
    font-size: 13px;
}

/* Form Styling */
.leader-integration-settings .form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
}

.leader-integration-settings .form-table td {
    padding: 20px 10px;
}

.leader-integration-settings .regular-text {
    width: 100%;
    max-width: 400px;
}

.leader-integration-settings .description {
    margin-top: 6px;
    color: #666;
}

/* Source dropdown + refresh button */
#leader_source_id {
    max-width: 300px;
    margin-right: 6px;
}

#leader-refresh-sources {
    vertical-align: middle;
}

/* Tab Navigation */
.leader-tabs {
    margin-top: 20px;
}

.leader-tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-top: none;
}

.leader-tab-content.active {
    display: block;
}

.leader-help-section {
    margin-bottom: 30px;
}

.leader-help-section h3 {
    margin-top: 0;
    color: #23282d;
}

.leader-help-section ol {
    margin-left: 20px;
}

.leader-help-section li {
    margin-bottom: 8px;
}

/* Log Status Badges */
.leader-log-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.leader-log-success {
    background: #f0f6e9;
    color: #46b450;
}

.leader-log-failed {
    background: #fef1f1;
    color: #dc3232;
}

.leader-log-sent {
    background: #f0f0f1;
    color: #50575e;
}

/* Log Table */
.wrap table.widefat code {
    font-size: 11px;
    word-break: break-all;
    background: none;
    padding: 0;
}

/* Pagination */
.leader-pagination {
    margin-top: 16px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.leader-pagination .button {
    min-width: 36px;
    text-align: center;
}

/* Log details */
.leader-log-details pre {
    background: #f8f9f9;
    padding: 10px;
    border: 1px solid #e5e5e5;
    overflow: auto;
    max-height: 300px;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 13px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .leader-integration-settings .form-table th {
        width: 100%;
    }

    .leader-integration-settings .form-table input[type=text],
    .leader-integration-settings .form-table input[type=password] {
        width: 100%;
    }

    .leader-connection-status {
        flex-direction: column;
        align-items: flex-start;
    }
}
