/* Basic styling for the admin interface */
.wp-list-table .topic-actions {
    white-space: nowrap;
}

.wp-list-table .status-select {
    margin-right: 5px;
    vertical-align: middle;
}

.wp-list-table .update-status {
    vertical-align: middle;
}

/* Test connection button styling */
.test-connection, .test-ai-connection {
    margin-left: 10px;
    vertical-align: middle;
}

.test-connection:disabled, .test-ai-connection:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Connection result styling */
.connection-result {
    margin-top: 10px;
}

.connection-result .notice {
    margin: 5px 0;
    padding: 8px 12px;
}

/* Enhanced error display styling */
.connection-result .notice-error {
    border-left-color: #dc3232;
    background-color: #fef7f7;
}

.connection-result .notice-error p {
    margin: 5px 0;
    line-height: 1.4;
}

.connection-result .notice-error strong {
    color: #dc3232;
}

.connection-result .notice-error .error-code {
    background: #dc3232;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.connection-result .notice-error .http-code {
    background: #f0f0f1;
    color: #50575e;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.connection-result .notice-error .suggestion {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 8px;
    color: #856404;
}

.connection-result .notice-error .suggestion strong {
    color: #856404;
}

.connection-result img {
    display: block;
    margin-top: 8px;
    border-radius: 4px;
}

/* Test all results styling */
#test-all-results {
    margin: 15px 0;
}

.test-results-summary {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 15px 0;
}

.test-results-summary h3 {
    margin-top: 0;
    color: #1d2327;
    border-bottom: 1px solid #c3c4c7;
    padding-bottom: 10px;
}

.test-results-summary p {
    margin: 8px 0;
    line-height: 1.5;
}

/* Sample content results styling */
.sample-content-results {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 15px 0;
}

.sample-content-results h3 {
    margin-top: 0;
    color: #1d2327;
    border-bottom: 1px solid #c3c4c7;
    padding-bottom: 10px;
}

.sample-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.sample-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0073aa;
}

/* Button highlighting */
.button-primary-highlighted {
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
    0% { background-color: #0073aa; }
    50% { background-color: #005a87; }
    100% { background-color: #0073aa; }
}

/* API key input styling */
.form-table input[type="password"] {
    width: 300px;
}

/* Responsive design for smaller screens */
@media screen and (max-width: 782px) {
    .form-table input[type="password"] {
        width: 100%;
        max-width: 300px;
    }
    
    .test-connection, .test-ai-connection {
        margin-left: 0;
        margin-top: 5px;
        display: block;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: " ⟳";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success/error indicators */
.api-status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.api-status-indicator.success {
    background-color: #46b450;
}

.api-status-indicator.error {
    background-color: #dc3232;
}

.api-status-indicator.unknown {
    background-color: #999;
}

/* Enhanced notice styling */
.notice.inline {
    margin: 5px 0;
    padding: 8px 12px;
}

.notice.inline p {
    margin: 0;
}

/* Image preview styling */
.connection-result img, .sample-content-results img {
    max-width: 200px;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.connection-result img:hover, .sample-content-results img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Settings section improvements */
.form-table th {
    width: 200px;
}

.form-table td {
    padding: 15px 10px;
}

.description {
    color: #666;
    font-style: italic;
}

/* Topic queue table enhancements */
.wp-list-table.topics {
    margin-top: 20px;
}

.wp-list-table.topics th,
.wp-list-table.topics td {
    padding: 12px;
}

.topic-status {
    font-weight: 600;
    text-transform: capitalize;
}

.status-queued { color: #0073aa; }
.status-written { color: #46b450; }
.status-skipped { color: #dc3232; }

/* Add to admin.css */
.provider-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.provider-result {
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.provider-result.success {
    background-color: #f0fff0;
    border-color: #46b450;
}

.provider-result.error {
    background-color: #fff0f0;
    border-color: #dc3232;
}

.provider-result h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.provider-result p {
    margin-bottom: 0;
}

.abn-setting-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 20px 18px 16px 18px;
    margin-bottom: 18px;
    max-width: 600px;
}
.abn-setting-card label, .abn-setting-card h4 {
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 6px;
    display: block;
}
.abn-setting-card .description {
    color: #666;
    font-style: italic;
    margin-top: 6px;
}
@media (max-width: 700px) {
    .abn-setting-card { max-width: 100%; padding: 14px 8px; }
}

.abn-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 24px;
    gap: 0;
}
.abn-tab {
    padding: 12px 28px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
    font-weight: 600;
    color: #0073aa;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    position: relative;
    top: 2px;
}
.abn-tab.active {
    background: #fff;
    color: #23282d;
    border-bottom: 2px solid #fff;
    z-index: 2;
}
.abn-tab-content,
.abn-topic-queue-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0 0 8px 8px;
    padding: 32px 24px 24px 24px;
    margin-bottom: 32px;
    width: 100%;
    box-sizing: border-box;
    border-top: none;
    margin-top: -16px;
}
.abn-tab-content { display: none; }
.abn-tab-content.active { display: block; }
@media (max-width: 700px) {
    .abn-tabs { flex-direction: column; }
    .abn-tab { border-radius: 8px 8px 0 0; margin-bottom: 2px; }
    .abn-tab-content { padding: 18px 6px; }
}

.abn-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}
.abn-table-responsive table {
    min-width: 700px;
    width: 100%;
}
@media (max-width: 700px) {
    .abn-table-responsive table {
        min-width: 500px;
    }
}

/* Quick Takeaway Styling for Frontend */
.quick-takeaway {
    background: #f8f9fa !important;
    border-left: 4px solid #007cba !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.quick-takeaway h3 {
    margin: 0 0 15px 0 !important;
    color: #333 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.quick-takeaway p {
    margin: 0 !important;
    color: #555 !important;
    line-height: 1.6 !important;
    font-size: 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* Responsive Quick Takeaway */
@media (max-width: 768px) {
    .quick-takeaway {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .quick-takeaway h3 {
        font-size: 16px !important;
    }
    
    .quick-takeaway p {
        font-size: 15px !important;
    }
}