/**
 * Admin CSS for FreshRank AI
 * Complete version with priority details functionality
 * FIXED: Added backward compatibility for old wsau- class names
 */

/* Dashboard Layout - Support both freshrank- and wsau- prefixes */
.freshrank-dashboard-layout,
.wsau-dashboard-layout {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.freshrank-main-content,
.wsau-main-content {
    flex: 1;
    min-width: 0;
}

.freshrank-sidebar,
.wsau-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* Sidebar Statistics */
.freshrank-stats-sidebar,
.wsau-stats-sidebar {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    position: sticky;
    top: 32px;
}

.freshrank-sidebar-title,
.wsau-sidebar-title {
    margin: 0;
    padding: 20px 20px 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #f0f0f1;
}

.freshrank-stat-item,
.wsau-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f1;
    transition: background-color 0.2s ease;
}

.freshrank-stat-item:last-child,
.wsau-stat-item:last-child {
    border-bottom: none;
}

.freshrank-stat-item:hover,
.wsau-stat-item:hover {
    background-color: #f6f7f7;
}

.freshrank-stat-clickable,
.wsau-stat-clickable {
    cursor: pointer;
}

.freshrank-stat-clickable:hover,
.wsau-stat-clickable:hover {
    background-color: #f0f6fc;
}

.freshrank-stat-value,
.wsau-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1;
}

.freshrank-stat-label,
.wsau-stat-label {
    font-size: 13px;
    color: #646970;
    font-weight: 500;
}

/* OLD Statistics Container (deprecated) */
.freshrank-stats-container,
.wsau-stats-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.freshrank-stat-box,
.wsau-stat-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    min-width: 150px;
    flex: 1;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.freshrank-stat-box h3,
.wsau-stat-box h3 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    color: #2271b1;
    font-weight: 600;
}

.freshrank-stat-box p,
.wsau-stat-box p {
    margin: 0;
    color: #646970;
    font-weight: 500;
}

/* Responsive Layout */
@media (max-width: 1200px) {
    .freshrank-dashboard-layout,
.wsau-dashboard-layout {
        flex-direction: column;
    }

    .freshrank-sidebar,
.wsau-sidebar {
        width: 100%;
        position: static;
    }

    .freshrank-stats-sidebar,
.wsau-stats-sidebar {
        position: static;
    }
}

/* Workflow Progress Tracker */
.freshrank-workflow-tracker,
.wsau-workflow-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 25px 0;
    padding: 25px;
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.freshrank-workflow-step,
.wsau-workflow-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 200px;
}

.freshrank-workflow-step.freshrank-step-active,
.wsau-workflow-step.freshrank-step-active,
.wsau-step-active {
    background: #f0f6fc;
    border: 2px solid #2271b1;
}

.freshrank-workflow-step.freshrank-step-complete,
.wsau-workflow-step.freshrank-step-complete,
.wsau-step-complete {
    background: #e7f5e9;
    border: 2px solid #46b450;
}

.freshrank-workflow-step.freshrank-step-disabled,
.wsau-workflow-step.freshrank-step-disabled,
.wsau-step-disabled {
    opacity: 0.5;
    background: #f6f7f7;
}

.freshrank-step-icon,
.wsau-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: 700;
    transition: all 0.3s ease;
}

.freshrank-step-active .freshrank-step-icon,
.wsau-step-active .freshrank-step-icon,
.wsau-step-active .wsau-step-icon {
    background: #2271b1;
    color: white;
}

.freshrank-step-complete .freshrank-step-icon,
.wsau-step-complete .freshrank-step-icon,
.wsau-step-complete .wsau-step-icon {
    background: #46b450;
    color: white;
}

.freshrank-step-disabled .freshrank-step-icon,
.wsau-step-disabled .freshrank-step-icon,
.wsau-step-disabled .wsau-step-icon {
    background: #e0e0e0;
    color: #999;
}

.freshrank-step-icon .dashicons,
.wsau-step-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.freshrank-step-num,
.wsau-step-num {
    font-size: 18px;
    font-weight: 700;
    color: #666;
}

.freshrank-step-active .freshrank-step-num,
.wsau-step-active .freshrank-step-num,
.wsau-step-active .wsau-step-num {
    color: white;
}

.freshrank-step-content,
.wsau-step-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.freshrank-step-title,
.wsau-step-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.freshrank-step-status,
.wsau-step-status {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
}

.freshrank-step-count,
.wsau-step-count {
    font-weight: 700;
    color: #2271b1;
    font-size: 14px;
}

.freshrank-step-complete .freshrank-step-count,
.wsau-step-complete .freshrank-step-count,
.wsau-step-complete .wsau-step-count {
    color: #46b450;
}

.freshrank-step-label,
.wsau-step-label {
    color: #646970;
    font-size: 12px;
}

.freshrank-workflow-connector,
.wsau-workflow-connector {
    width: 60px;
    height: 3px;
    background: #dcdcde;
    position: relative;
    transition: all 0.3s ease;
}

.freshrank-workflow-connector.freshrank-connector-complete,
.wsau-workflow-connector.freshrank-connector-complete,
.wsau-connector-complete {
    background: #46b450;
}

.freshrank-workflow-connector::after,
.wsau-workflow-connector::after {
    content: '→';
    position: absolute;
    right: -8px;
    top: -11px;
    color: #dcdcde;
    font-size: 20px;
    font-weight: bold;
}

.freshrank-workflow-connector.freshrank-connector-complete::after,
.wsau-workflow-connector.freshrank-connector-complete::after,
.wsau-connector-complete::after {
    color: #46b450;
}

/* State Container */
.freshrank-state-container,
.wsau-state-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.freshrank-state-container h2,
.wsau-state-container h2 {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid #c3c4c7;
    background: #f6f7f7;
    border-radius: 4px 4px 0 0;
}

.freshrank-state-info,
.wsau-state-info {
    font-size: 14px;
    font-weight: normal;
    color: #646970;
    margin-left: 10px;
}

/* Actions Bar - Updated for grouped workflow */
.freshrank-actions-bar,
.wsau-actions-bar {
    padding: 20px;
    border-bottom: 1px solid #c3c4c7;
    background: linear-gradient(to bottom, #ffffff, #f6f7f7);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.freshrank-workflow-hint,
.wsau-workflow-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    color: #1d2327;
    font-weight: 500;
    font-size: 14px;
}

.freshrank-workflow-hint .dashicons,
.wsau-workflow-hint .dashicons {
    color: #2271b1;
    flex-shrink: 0;
}

.freshrank-action-group,
.wsau-action-group {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 15px;
    background: white;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.freshrank-action-group-label,
.wsau-action-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
    min-width: 140px;
    padding-top: 6px;
}

.freshrank-step-number,
.wsau-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #2271b1;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.freshrank-action-group-buttons,
.wsau-action-group-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.freshrank-action-group-buttons .button,
.wsau-action-group-buttons .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 14px;
    height: auto;
    line-height: 1.4;
}

.freshrank-action-group-buttons .button .dashicons,
.wsau-action-group-buttons .button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.freshrank-action-separator,
.wsau-action-separator {
    color: #646970;
    margin: 0 5px;
}

/* List Controls */
.freshrank-list-controls,
.wsau-list-controls {
    padding: 10px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
}

.freshrank-list-controls .description,
.wsau-list-controls .description {
    margin: 0;
    font-style: italic;
}

/* Table Container */
.freshrank-table-container,
.wsau-table-container {
    margin: 0;
}

.freshrank-table-container table,
.wsau-table-container table {
    margin: 0;
}

/* Article Table Styles */
#freshrank-articles-table {
    border-collapse: collapse;
    min-width: 1100px;
    table-layout: fixed;
}

#freshrank-articles-table th,
#freshrank-articles-table td {
    padding: 8px 8px;
    vertical-align: top;
}

.freshrank-article-row,
.wsau-article-row {
    cursor: move;
}

.freshrank-article-row:hover,
.wsau-article-row:hover {
    background-color: #f6f7f7;
}

.freshrank-sortable-placeholder,
.wsau-sortable-placeholder {
    height: 60px;
    background: #e1f5fe;
    border: 2px dashed #039be5;
}

/* Priority Scores */
.freshrank-priority-score,
.wsau-priority-score {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    min-width: 40px;
}

.freshrank-priority-high,
.wsau-priority-high {
    background: #d32f2f;
    color: white;
}

.freshrank-priority-medium,
.wsau-priority-medium {
    background: #f57c00;
    color: white;
}

.freshrank-priority-low,
.wsau-priority-low {
    background: #fbc02d;
    color: #333;
}

.freshrank-priority-very-low,
.wsau-priority-very-low {
    background: #ffc107;
    color: #333;
}

/* Ensure text contrast is good on blue background (low severity) */
.freshrank-issue.freshrank-severity-low strong,
.wsau-issue.freshrank-severity-low strong,
.wsau-severity-low strong {
    color: #1d2327; /* Dark text for readability on blue background */
}

.freshrank-issue.freshrank-severity-low .freshrank-issue-recommendation,
.wsau-issue.freshrank-severity-low .freshrank-issue-recommendation,
.wsau-severity-low .freshrank-issue-recommendation,
.wsau-issue.freshrank-severity-low .wsau-issue-recommendation,
.wsau-severity-low .wsau-issue-recommendation {
    color: #3c434a; /* Slightly darker gray for recommendations on blue background */
}

/* Priority Score Details Styles */
.freshrank-priority-toggle-container,
.wsau-priority-toggle-container {
    margin-top: 4px;
}

.freshrank-toggle-priority-details,
.wsau-toggle-priority-details {
    font-size: 11px;
    color: #2271b1;
    text-decoration: none;
    display: block;
}

.freshrank-toggle-priority-details:hover,
.wsau-toggle-priority-details:hover {
    text-decoration: underline;
}

/* Priority Details Expandable Row */
.freshrank-priority-details-row,
.wsau-priority-details-row {
    background: #f6f7f7;
}

.freshrank-priority-details-content,
.wsau-priority-details-content {
    padding: 20px;
    border-top: 1px solid #c3c4c7;
}

.freshrank-detailed-priority-info h4,
.wsau-detailed-priority-info h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
}

.freshrank-priority-section,
.wsau-priority-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.freshrank-priority-summary-section,
.wsau-priority-summary-section,
.freshrank-priority-data-section,
.wsau-priority-data-section {
    flex: 1;
    min-width: 350px;
}

.freshrank-priority-summary-section h5,
.wsau-priority-summary-section h5,
.freshrank-priority-data-section h5,
.wsau-priority-data-section h5 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 14px;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 5px;
}

.freshrank-priority-summary-content,
.wsau-priority-summary-content {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
}

.freshrank-priority-component,
.wsau-priority-component {
    margin-bottom: 20px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #72aee6;
}

.freshrank-priority-total,
.wsau-priority-total {
    background: #f0f6fc;
    padding: 12px;
    border-radius: 4px;
    border-left: 4px solid #72aee6;
}

.freshrank-component-label,
.wsau-component-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.freshrank-component-label strong,
.wsau-component-label strong {
    color: #1d2327;
    font-size: 14px;
}

.freshrank-component-weight,
.wsau-component-weight {
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

.freshrank-component-value,
.wsau-component-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.freshrank-score-value,
.wsau-score-value {
    font-size: 18px;
    font-weight: 600;
    color: #2271b1;
    min-width: 40px;
}

.freshrank-score-total,
.wsau-score-total {
    font-size: 24px;
    color: #00a32a;
}

.freshrank-score-explanation,
.wsau-score-explanation {
    font-size: 13px;
    color: #646970;
    line-height: 1.4;
    flex: 1;
}

/* GSC Data Styles */
.freshrank-gsc-data-content,
.wsau-gsc-data-content {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
}

.freshrank-gsc-period,
.wsau-gsc-period {
    margin-bottom: 20px;
}

.freshrank-gsc-period:last-child,
.wsau-gsc-period:last-child {
    margin-bottom: 0;
}

.freshrank-gsc-period h6,
.wsau-gsc-period h6 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    background: #f6f7f7;
    border-radius: 3px;
}

.freshrank-gsc-metrics,
.wsau-gsc-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 0 5px;
}

.freshrank-gsc-metric,
.wsau-gsc-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 3px;
    font-size: 13px;
}

.freshrank-metric-label,
.wsau-metric-label {
    color: #646970;
    font-weight: 500;
}

.freshrank-metric-value,
.wsau-metric-value {
    color: #1d2327;
    font-weight: 600;
}

/* Status Badges - IMPROVED with gradients and animations */
.freshrank-status,
.wsau-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.freshrank-status:hover,
.wsau-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.freshrank-status-pending,
.wsau-status-pending {
    background: linear-gradient(135deg, #f6f7f7 0%, #e8e9ea 100%);
    color: #646970;
}

.freshrank-status-analyzing,
.wsau-status-analyzing {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    color: #0d47a1;
    animation: pulse-analyzing 2s ease-in-out infinite;
}

.freshrank-status-analyzing::before,
.wsau-status-analyzing::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes pulse-analyzing {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.freshrank-status-creating,
.wsau-status-creating {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%);
    color: #e65100;
    animation: pulse-creating 2s ease-in-out infinite;
}

.freshrank-status-creating::before,
.wsau-status-creating::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes pulse-creating {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.freshrank-status-completed,
.wsau-status-completed {
    background: linear-gradient(135deg, #d4edda 0%, #a5d6a7 100%);
    color: #1b5e20;
}

.freshrank-status-completed::before,
.wsau-status-completed::before {
    content: '\2713';
    font-weight: bold;
}

.freshrank-status-error,
.wsau-status-error {
    background: linear-gradient(135deg, #ffebee 0%, #ef9a9a 100%);
    color: #b71c1c;
}

.freshrank-status-error::before,
.wsau-status-error::before {
    content: '\26A0';
}

.freshrank-status-draft,
.wsau-status-draft {
    background: linear-gradient(135deg, #e7f3ff 0%, #90caf9 100%);
    color: #01579b;
}

.freshrank-status-draft::before,
.wsau-status-draft::before {
    content: '\270E';
}

/* Issues Count */
.freshrank-issues-count,
.wsau-issues-count {
    font-weight: 600;
    color: #d32f2f;
}

.freshrank-no-issues,
.wsau-no-issues {
    color: #2e7d32;
    font-style: italic;
}

.freshrank-view-issues,
.wsau-view-issues {
    margin-left: 8px;
    color: #2271b1;
    text-decoration: none;
    font-size: 12px;
}

.freshrank-view-issues:hover,
.wsau-view-issues:hover {
    text-decoration: underline;
}

/* Actions Column */
.freshrank-actions,
.wsau-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    min-height: 60px;
}

.freshrank-actions .button,
.wsau-actions .button {
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.freshrank-actions .button .dashicons,
.wsau-actions .button .dashicons {
    margin: 0;
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Approve/Reject button styling */
.freshrank-approve-revision,
.freshrank-approve-draft {
    background: #00a32a;
    border-color: #00a32a;
    color: #fff;
}

.freshrank-approve-revision:hover,
.freshrank-approve-draft:hover {
    background: #008a20;
    border-color: #008a20;
}

.freshrank-reject-revision,
.freshrank-reject-draft {
    color: #d63638;
    border-color: #d63638;
}

.freshrank-reject-revision:hover,
.freshrank-reject-draft:hover {
    color: #b32d2e;
    border-color: #b32d2e;
}

.freshrank-analyzing,
.wsau-analyzing,
.freshrank-no-actions,
.wsau-no-actions {
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

.freshrank-error-indicator,
.wsau-error-indicator {
    color: #c62828;
    font-size: 12px;
    cursor: help;
}

/* Changes Count */
.freshrank-changes-count,
.wsau-changes-count {
    font-weight: 600;
    color: #2271b1;
}

.freshrank-update-summary,
.wsau-update-summary {
    font-size: 11px;
    color: #646970;
    margin-top: 3px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

/* No Data Indicators */
.freshrank-no-data,
.wsau-no-data {
    color: #646970;
    font-style: italic;
    font-size: 12px;
}

/* Progress Dialog */
#freshrank-progress-dialog {
    text-align: center;
}

#freshrank-progress-container {
    padding: 20px;
}

.freshrank-progress-bar-container {
    background: #f0f0f1;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 15px;
    overflow: hidden;
}

#freshrank-progress-bar {
    width: 0%;
    height: 100%;
    background: #2271b1;
    transition: width 0.3s ease;
}

#freshrank-progress-text {
    font-weight: 500;
    color: #646970;
}

/* Settings Page */
.freshrank-setup-instructions,
.wsau-setup-instructions {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-top: 15px;
}

.freshrank-setup-instructions ol,
.wsau-setup-instructions ol {
    margin-left: 20px;
}

.freshrank-setup-instructions li,
.wsau-setup-instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.freshrank-api-guidelines,
.wsau-api-guidelines {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.freshrank-api-guidelines ul,
.wsau-api-guidelines ul {
    margin-left: 20px;
}

.freshrank-api-guidelines li,
.wsau-api-guidelines li {
    margin-bottom: 5px;
}

.freshrank-system-info table,
.wsau-system-info table {
    margin-top: 15px;
}

.freshrank-system-info td:first-child,
.wsau-system-info td:first-child {
    font-weight: 600;
    width: 200px;
}

/* Connection Status */
.freshrank-status-connected,
.wsau-status-connected {
    color: #2e7d32;
    font-weight: 600;
}

.freshrank-status-disconnected,
.wsau-status-disconnected {
    color: #c62828;
    font-weight: 600;
}

/* Analysis Results Styles */
.freshrank-issues-column,
.wsau-issues-column {
    max-width: 300px;
}

.freshrank-issues-summary,
.wsau-issues-summary {
    font-size: 12px;
    line-height: 1.3;
}

.freshrank-issues-count,
.wsau-issues-count {
    display: block;
    margin-bottom: 3px;
    color: #d63638;
}

.freshrank-issues-breakdown,
.wsau-issues-breakdown {
    font-size: 11px;
    color: #646970;
    margin-bottom: 3px;
    line-height: 1.3;
}

.freshrank-overall-score,
.wsau-overall-score {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    display: inline-block;
}

.freshrank-issues-details,
.wsau-issues-details {
    font-size: 11px;
    color: #646970;
    margin-bottom: 3px;
    line-height: 1.3;
}

.freshrank-score-good,
.wsau-score-good {
    background: #00a32a;
    color: white;
}

.freshrank-score-average,
.wsau-score-average {
    background: #f56e28;
    color: white;
}

.freshrank-score-poor,
.wsau-score-poor {
    background: #d63638;
    color: white;
}

.freshrank-no-issues-found,
.wsau-no-issues-found {
    color: #00a32a;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.3;
}

.freshrank-analysis-error,
.wsau-analysis-error {
    color: #d63638;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.3;
}

.freshrank-not-analyzed,
.wsau-not-analyzed {
    color: #646970;
    font-style: italic;
    font-size: 11px;
}

.freshrank-analyzing-feedback,
.wsau-analyzing-feedback {
    font-size: 11px;
    line-height: 1.4;
}

.freshrank-analyzing-feedback,
.wsau-analyzing-feedback small {
    font-size: 10px;
    line-height: 1.3;
}

.freshrank-toggle-issues,
.wsau-toggle-issues {
    font-size: 11px;
    color: #2271b1;
    text-decoration: none;
    display: block;
    margin-top: 4px;
}

.freshrank-toggle-issues:hover,
.wsau-toggle-issues:hover {
    text-decoration: underline;
}

/* Detailed Analysis Styles */
.freshrank-analysis-details-row,
.wsau-analysis-details-row {
    background: #f6f7f7;
}

.freshrank-analysis-details-content,
.wsau-analysis-details-content {
    padding: 20px;
    border-top: 1px solid #c3c4c7;
}

.freshrank-detailed-analysis h4,
.wsau-detailed-analysis h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
}

.freshrank-analysis-section,
.wsau-analysis-section {
    margin-bottom: 20px;
}

.freshrank-analysis-section h5,
.wsau-analysis-section h5 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 14px;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 5px;
}

.freshrank-issues-list,
.wsau-issues-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.freshrank-issue,
.wsau-issue {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-left: 4px solid #72aee6;
    border-radius: 0 4px 4px 0;
}

.freshrank-issue.freshrank-severity-high,
.wsau-issue.freshrank-severity-high,
.wsau-severity-high {
    border-left-color: #d63638; /* Red - matches high priority (60+) */
}

.freshrank-issue.freshrank-severity-medium,
.wsau-issue.freshrank-severity-medium,
.wsau-severity-medium {
    border-left-color: #f57c00; /* Orange - matches medium priority (40-59) */
}

.freshrank-issue.freshrank-severity-low,
.wsau-issue.freshrank-severity-low,
.wsau-severity-low {
    border-left-color: #0073aa; /* Blue - matches low priority (20-39) */
    background: #f0f6fc; /* Light blue background for consistency */
}

/* Ensure WCAG AA compliance for text on blue backgrounds */
.freshrank-issue.freshrank-severity-low,
.wsau-issue.freshrank-severity-low,
.wsau-severity-low {
    color: #1d2327; /* Dark text for readability */
}

.freshrank-issue.freshrank-severity-low .freshrank-issue-recommendation,
.wsau-issue.freshrank-severity-low .freshrank-issue-recommendation,
.wsau-severity-low .freshrank-issue-recommendation,
.wsau-issue.freshrank-severity-low .wsau-issue-recommendation,
.wsau-severity-low .wsau-issue-recommendation {
    color: #2c3338; /* Darker gray for recommendations */
}

.freshrank-issue strong,
.wsau-issue strong {
    display: block;
    margin-bottom: 5px;
    color: #1d2327;
}

.freshrank-issue-recommendation,
.wsau-issue-recommendation {
    font-size: 13px;
    color: #646970;
    line-height: 1.4;
}

/* Draft Information Styles - Updated for expandable interface */
.freshrank-has-draft,
.wsau-has-draft {
    background-color: #f0f6fc;
}

.freshrank-draft-toggle-container,
.wsau-draft-toggle-container {
    margin-top: 4px;
}

.freshrank-toggle-draft-details,
.wsau-toggle-draft-details {
    font-size: 11px;
    color: #2271b1;
    text-decoration: none;
    display: block;
    margin-top: 4px;
}

.freshrank-toggle-draft-details:hover,
.wsau-toggle-draft-details:hover {
    text-decoration: underline;
}

/* Draft Details Expandable Row */
.freshrank-draft-details-row,
.wsau-draft-details-row {
    background: #f6f7f7;
}

.freshrank-draft-details-content,
.wsau-draft-details-content {
    padding: 20px;
    border-top: 1px solid #c3c4c7;
}

.freshrank-detailed-draft-info h4,
.wsau-detailed-draft-info h4 {
    margin: 0 0 15px 0;
    color: #1d2327;
}

.freshrank-draft-section,
.wsau-draft-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.freshrank-draft-summary-section,
.wsau-draft-summary-section,
.freshrank-draft-actions-section,
.wsau-draft-actions-section {
    flex: 1;
    min-width: 250px;
}

.freshrank-draft-summary-section h5,
.wsau-draft-summary-section h5,
.freshrank-draft-actions-section h5,
.wsau-draft-actions-section h5 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 14px;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 5px;
}

.freshrank-draft-summary-content,
.wsau-draft-summary-content {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
}

.freshrank-draft-stat,
.wsau-draft-stat {
    margin-bottom: 8px;
    font-size: 14px;
    color: #646970;
}

.freshrank-draft-stat strong,
.wsau-draft-stat strong {
    color: #2271b1;
}

.freshrank-draft-description,
.wsau-draft-description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
    font-size: 13px;
    line-height: 1.4;
}

.freshrank-draft-description strong,
.wsau-draft-description strong {
    display: block;
    margin-bottom: 5px;
    color: #1d2327;
}

.freshrank-draft-action-buttons,
.wsau-draft-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.freshrank-draft-action-buttons .button,
.wsau-draft-action-buttons .button {
    text-align: center;
    justify-content: center;
}

/* Remove old draft info styles that are no longer used */
.freshrank-draft-info,
.wsau-draft-info {
    display: none; /* Hide the old blue box completely */
}

.freshrank-draft-indicator,
.wsau-draft-indicator,
.freshrank-draft-summary,
.wsau-draft-summary,
.freshrank-draft-update-summary,
.wsau-draft-update-summary,
.freshrank-draft-links,
.wsau-draft-links,
.freshrank-draft-link,
.wsau-draft-link {
    display: none; /* Hide all old draft styling */
}

/* Analyzing State */
.freshrank-analyzing-row,
.wsau-analyzing-row {
    background-color: #fff3cd;
    opacity: 0.8;
}

.freshrank-analyzing-row td,
.wsau-analyzing-row td {
    position: relative;
}

/* Responsive Design */
@media (max-width: 782px) {
    .freshrank-stats-container,
.wsau-stats-container {
        flex-direction: column;
    }
    
    .freshrank-stat-box,
.wsau-stat-box {
        min-width: auto;
    }
    
    .freshrank-actions-bar,
.wsau-actions-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .freshrank-actions,
    .wsau-actions {
        flex-direction: column;
        width: 100%;
    }

    .freshrank-actions .button,
    .wsau-actions .button {
        width: 100%;
        text-align: center;
        margin: 2px 0;
    }
    
    .freshrank-table-container,
.wsau-table-container {
        overflow-x: auto;
    }
    
    .freshrank-update-summary,
.wsau-update-summary {
        max-width: 150px;
    }
    
    /* Priority details responsive */
    .freshrank-priority-section,
.wsau-priority-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .freshrank-priority-summary-section,
.wsau-priority-summary-section,
    .freshrank-priority-data-section,
.wsau-priority-data-section {
        min-width: auto;
    }
    
    .freshrank-gsc-metrics,
.wsau-gsc-metrics {
        grid-template-columns: 1fr;
    }
    
    .freshrank-component-value,
.wsau-component-value {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .freshrank-score-value,
.wsau-score-value {
        font-size: 16px;
    }
    
    .freshrank-score-total,
.wsau-score-total {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .freshrank-stat-box h3,
    .wsau-stat-box h3 {
        font-size: 2em;
    }

    #freshrank-articles-table th,
    #freshrank-articles-table td {
        padding: 8px 4px;
        font-size: 12px;
    }

    .freshrank-priority-score,
    .wsau-priority-score,
    .freshrank-status,
    .wsau-status {
        font-size: 10px;
        padding: 3px 6px;
    }

    .freshrank-actions .button,
    .wsau-actions .button {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Loading States */
.freshrank-loading,
.wsau-loading {
    opacity: 0.6;
    pointer-events: none;
}

.freshrank-loading::after,
.wsau-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: freshrank-spin 1s linear infinite;
}

@keyframes freshrank-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.freshrank-sr-only,
.wsau-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.freshrank-article-row:focus,
.wsau-article-row:focus,
.freshrank-actions .button:focus,
.wsau-actions .button:focus,
.freshrank-priority-score:focus,
.wsau-priority-score:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .freshrank-priority-high,
.wsau-priority-high,
    .freshrank-priority-medium,
.wsau-priority-medium,
    .freshrank-priority-low,
.wsau-priority-low,
    .freshrank-priority-very-low,
.wsau-priority-very-low {
        border: 2px solid currentColor;
    }
    
    .freshrank-status,
.wsau-status {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .freshrank-sortable-placeholder,
.wsau-sortable-placeholder,
    #freshrank-progress-bar {
        transition: none;
    }
    
    @keyframes freshrank-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(0deg); }
    }
}

/* Print Styles */
@media print {
    .freshrank-actions-bar,
    .wsau-actions-bar,
    .freshrank-actions,
    .wsau-actions,
    .button {
        display: none;
    }

    .freshrank-stats-container,
    .wsau-stats-container {
        flex-direction: row;
        page-break-inside: avoid;
    }

    .freshrank-table-container,
    .wsau-table-container {
        overflow: visible;
    }

    .freshrank-article-row,
    .wsau-article-row {
        cursor: default;
    }

    /* Show priority details when printing */
    .freshrank-priority-details-row,
    .wsau-priority-details-row,
    .freshrank-analysis-details-row,
    .wsau-analysis-details-row {
        display: table-row !important;
    }

    .freshrank-priority-section,
    .wsau-priority-section {
        flex-direction: column;
        page-break-inside: avoid;
    }
}
/* ========================================
   ACCESSIBILITY & MOBILE IMPROVEMENTS
   ======================================== */

/* Loading State for Buttons */
.freshrank-button-loading,
.wsau-button-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.freshrank-button-loading::after,
.wsau-button-loading::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: freshrank-spin 1s linear infinite;
}

@keyframes freshrank-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Improved Button Focus States */
.button-link:focus,
button:focus,
.button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

.button-link {
    color: #2271b1;
    text-decoration: none;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
}

.button-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.button-link:active {
    color: #0a4b78;
}

/* Empty State Styling */
.freshrank-empty-state,
.wsau-empty-state {
    background: #f6f7f7;
}

.freshrank-empty-state-content,
.wsau-empty-state-content {
    padding: 40px 20px;
    text-align: center;
}

.freshrank-empty-state-content > .dashicons,
.wsau-empty-state-content > .dashicons {
    font-size: 64px;
    color: #c3c4c7;
    width: 64px;
    height: 64px;
}

.freshrank-empty-state-content h3,
.wsau-empty-state-content h3 {
    margin: 20px 0 10px;
    color: #1d2327;
    font-size: 18px;
}

.freshrank-empty-state-content p,
.wsau-empty-state-content p {
    color: #646970;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Empty Analysis State - Enhanced */
.freshrank-empty-analysis-state,
.wsau-empty-analysis-state {
    background: linear-gradient(135deg, #f0f6fc 0%, #e7f3ff 100%);
    border: 2px solid #2271b1;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.1);
}

.freshrank-empty-analysis-content,
.wsau-empty-analysis-content {
    padding: 50px 40px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.freshrank-empty-analysis-icon,
.wsau-empty-analysis-icon {
    margin-bottom: 20px;
}

.freshrank-empty-analysis-icon .dashicons,
.wsau-empty-analysis-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #2271b1;
    background: white;
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.freshrank-empty-analysis-content h3,
.wsau-empty-analysis-content h3 {
    margin: 0 0 15px;
    color: #1d2327;
    font-size: 26px;
    font-weight: 600;
}

.freshrank-empty-subtitle,
.wsau-empty-subtitle {
    color: #3c434a;
    margin: 0 0 30px;
    font-size: 15px;
    line-height: 1.6;
}

.freshrank-empty-features,
.wsau-empty-features {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.freshrank-empty-feature,
.wsau-empty-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.freshrank-empty-feature .dashicons,
.wsau-empty-feature .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #2271b1;
}

.freshrank-empty-feature span:last-child,
.wsau-empty-feature span:last-child {
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
}

.freshrank-empty-analysis-content .button-hero,
.wsau-empty-analysis-content .button-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    padding: 12px 32px;
    height: auto;
    margin: 20px 0;
}

.freshrank-empty-analysis-content .button-hero .dashicons,
.wsau-empty-analysis-content .button-hero .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.freshrank-empty-details,
.wsau-empty-details {
    margin-top: 30px;
    text-align: left;
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
}

.freshrank-empty-details summary,
.wsau-empty-details summary {
    padding: 15px 20px;
    font-weight: 600;
    color: #2271b1;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.freshrank-empty-details summary::-webkit-details-marker,
.wsau-empty-details summary::-webkit-details-marker {
    display: none;
}

.freshrank-empty-details summary::after,
.wsau-empty-details summary::after {
    content: '\f140';
    font-family: dashicons;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.freshrank-empty-details[open] summary::after,
.wsau-empty-details[open] summary::after {
    transform: rotate(180deg);
}

.freshrank-empty-details-content,
.wsau-empty-details-content {
    padding: 0 20px 20px;
    border-top: 1px solid #f0f0f1;
}

.freshrank-empty-details-content ul,
.wsau-empty-details-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.freshrank-empty-details-content li,
.wsau-empty-details-content li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #3c434a;
}

.freshrank-empty-details-content strong,
.wsau-empty-details-content strong {
    color: #1d2327;
}

/* Info Box Styling */
.freshrank-info-box,
.wsau-info-box {
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.freshrank-info-box .dashicons,
.wsau-info-box .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #2271b1;
    flex-shrink: 0;
    margin-top: 2px;
}

.freshrank-info-box strong,
.wsau-info-box strong {
    color: #1d2327;
    display: block;
    margin-bottom: 5px;
}

.freshrank-info-box p,
.wsau-info-box p {
    color: #1d2327;
    margin: 0;
    font-size: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 782px) {
    /* Settings grid - stack cards */
    .freshrank-settings-grid,
.wsau-settings-grid {
        grid-template-columns: 1fr !important;
    }

    .freshrank-card,
.wsau-card {
        padding: 15px;
    }

    .freshrank-card,
.wsau-card h3 {
        font-size: 16px;
    }

    /* Workflow Tracker - Stack on mobile */
    .freshrank-workflow-tracker,
.wsau-workflow-tracker {
        flex-direction: column;
        padding: 20px;
    }

    .freshrank-workflow-step,
.wsau-workflow-step {
        width: 100%;
        min-width: auto;
    }

    .freshrank-workflow-connector,
.wsau-workflow-connector {
        width: 3px;
        height: 40px;
        transform: rotate(0);
    }

    .freshrank-workflow-connector,
.wsau-workflow-connector::after {
        content: '↓';
        right: auto;
        top: auto;
        left: -8px;
        bottom: -20px;
    }

    /* Action Groups - Stack on mobile */
    .freshrank-action-group,
.wsau-action-group {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .freshrank-action-group-label,
.wsau-action-group-label {
        min-width: auto;
        padding-top: 0;
    }

    .freshrank-action-group-buttons,
.wsau-action-group-buttons {
        flex-direction: column;
    }

    .freshrank-action-group-buttons .button,
    .wsau-action-group-buttons .button {
        width: 100%;
        justify-content: center;
    }

    /* Actions bar - stack buttons */
    .freshrank-actions-bar,
.wsau-actions-bar {
        padding: 15px;
    }

    .freshrank-workflow-hint,
.wsau-workflow-hint {
        font-size: 13px;
        padding: 8px 12px;
    }

    /* Empty Analysis State */
    .freshrank-empty-analysis-content,
.wsau-empty-analysis-content {
        padding: 30px 20px;
    }

    .freshrank-empty-analysis-icon .dashicons,
    .wsau-empty-analysis-icon .dashicons {
        font-size: 60px;
        width: 60px;
        height: 60px;
    }

    .freshrank-empty-features,
.wsau-empty-features {
        flex-direction: column;
        gap: 10px;
    }

    .freshrank-empty-feature,
.wsau-empty-feature {
        min-width: auto;
    }

    /* Card-based layout for articles table on mobile */
    #freshrank-articles-table thead {
        display: none;
    }

    #freshrank-articles-table,
    #freshrank-articles-table tbody,
    #freshrank-articles-table tr,
    #freshrank-articles-table td {
        display: block;
        width: 100%;
    }

    #freshrank-articles-table tr {
        margin-bottom: 20px;
        border: 1px solid #c3c4c7;
        border-radius: 4px;
        padding: 15px;
        background: white;
        position: relative;
    }

    #freshrank-articles-table td {
        text-align: left;
        padding: 8px 0;
        border: none;
    }

    #freshrank-articles-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        color: #1d2327;
    }

    #freshrank-articles-table td.check-column {
        position: absolute;
        top: 15px;
        right: 15px;
        padding: 0;
    }

    #freshrank-articles-table td.check-column:before {
        display: none;
    }

    /* Stack action buttons in table */
    .freshrank-actions,
    .wsau-actions {
        flex-direction: column;
        width: 100%;
    }

    .freshrank-actions .button,
    .wsau-actions .button {
        width: 100%;
        text-align: center;
        margin-bottom: 4px;
    }

    /* Stat boxes - full width on mobile */
    .freshrank-stat-box,
.wsau-stat-box {
        min-width: 100%;
        flex: 1 1 100%;
    }

    /* GSC metrics - single column */
    .freshrank-gsc-metrics,
.wsau-gsc-metrics {
        grid-template-columns: 1fr !important;
    }

    /* Severity options - more padding */
    .freshrank-severity-option,
.wsau-severity-option {
        padding: 15px 12px;
    }

    /* Expandable rows - adjust for mobile */
    .freshrank-priority-details-row,
.wsau-priority-details-row td,
    .freshrank-analysis-details-row,
.wsau-analysis-details-row td,
    .freshrank-draft-details-row,
.wsau-draft-details-row td {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    /* Very small screens - further optimizations */
    .freshrank-card,
    .wsau-card {
        padding: 12px;
    }

    .freshrank-stat-box h3,
    .wsau-stat-box h3 {
        font-size: 2em;
    }

    /* Shorter button labels */
    #freshrank-analyze-all-articles {
        font-size: 0;
    }

    #freshrank-analyze-all-articles::before {
        content: 'Analyze All';
        font-size: 14px;
    }
}

/* Skip Link for Accessibility */
.freshrank-skip-link,
.wsau-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2271b1;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.freshrank-skip-link:focus,
.wsau-skip-link:focus {
    top: 0;
}

/* Screen Reader Only */
.freshrank-sr-only,
.wsau-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* Tooltip System */
.freshrank-tooltip,
.wsau-tooltip {
    position: absolute;
    background: #1d2327;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    max-width: 250px;
    z-index: 10000;
    pointer-events: none;
}

.freshrank-tooltip::after,
.wsau-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1d2327 transparent transparent transparent;
}

/* Quick Preset Active State */
.freshrank-quick-presets .button.active,
.wsau-quick-presets .button.active {
    background: #2271b1;
    color: white;
    border-color: #135e96;
}

.freshrank-quick-presets .button.active::before,
.wsau-quick-presets .button.active::before {
    content: '✓ ';
    margin-right: 4px;
}

/* Table Column Widths - Optimized for consolidated layout */
#freshrank-articles-table .check-column {
    width: 3%;
}

#freshrank-articles-table .column-title-enhanced {
    width: 30%;
}

#freshrank-articles-table .column-priority {
    width: 10%;
    vertical-align: middle;
}

#freshrank-articles-table .column-priority .button-link {
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

#freshrank-articles-table .column-analysis-status {
    width: 30%;
    vertical-align: middle;
}

#freshrank-articles-table .column-status {
    width: 12%;
    vertical-align: middle;
}

.column-status .wsau-status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.column-status .freshrank-badge-draft {
    margin: 0;
}

.column-status .button-link {
    margin: 0;
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1.3;
}

/* Draft and Analysis modal dialogs */
.freshrank-draft-modal .ui-dialog-titlebar {
    background: #fff;
    color: #1d2327;
    border-bottom: 1px solid #dcdcde;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.freshrank-draft-modal .ui-dialog-title {
    font-size: 16px;
    font-weight: 600;
    padding-right: 50px;
    color: #1d2327;
}

.freshrank-draft-modal .ui-dialog-titlebar-close {
    background: #2271b1 !important;
    border: none !important;
    color: #fff !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 4px !important;
    opacity: 1 !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close {
    background: transparent !important;
    border: none !important;
    color: #646970 !important;
    width: 32px !important;
    height: 32px !important;
}

.freshrank-draft-modal .ui-dialog-titlebar-close:hover {
    background: #135e96 !important;
    color: #fff !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close:hover {
    background: #f0f0f1 !important;
    color: #000 !important;
}

.freshrank-draft-modal .ui-dialog-titlebar-close .ui-icon,
.freshrank-analysis-modal .ui-dialog-titlebar-close .ui-icon {
    display: none;
}

.freshrank-draft-modal .ui-dialog-titlebar-close:before {
    content: '×';
    font-size: 28px;
    display: block;
    text-align: center;
    color: #fff;
    font-weight: 700;
    line-height: 36px;
    width: 36px;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close:before {
    content: '×';
    font-size: 24px;
    display: block;
    text-align: center;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    width: 32px;
}

#freshrank-articles-table .column-actions {
    width: 15%;
}

/* Enhanced Article Header */
.freshrank-article-header,
.wsau-article-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.freshrank-article-title,
.wsau-article-title {
    flex: 1;
}

.freshrank-article-title a,
.wsau-article-title a {
    font-size: 14px;
    font-weight: 600;
    color: #2271b1;
    text-decoration: none;
}

.freshrank-article-title a:hover,
.wsau-article-title a:hover {
    color: #135e96;
}

/* Priority Badge */
.freshrank-priority-badge,
.wsau-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.freshrank-priority-badge:hover,
.wsau-priority-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) !important;
}

.freshrank-priority-badge.freshrank-priority-high,
.wsau-priority-badge.freshrank-priority-high,
.wsau-priority-high {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
}

.freshrank-priority-badge.freshrank-priority-medium,
.wsau-priority-badge.freshrank-priority-medium,
.wsau-priority-medium {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 124, 0, 0.3);
}

.freshrank-priority-badge.freshrank-priority-low,
.wsau-priority-badge.freshrank-priority-low,
.wsau-priority-low {
    background: linear-gradient(135deg, #fbc02d 0%, #f9a825 100%);
    color: #1d2327;
    box-shadow: 0 2px 4px rgba(251, 192, 45, 0.3);
}

.freshrank-priority-badge.freshrank-priority-very-low,
.wsau-priority-badge.freshrank-priority-very-low,
.wsau-priority-very-low {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #1d2327;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* Article Metadata */
.freshrank-article-meta,
.wsau-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #646970;
    margin-bottom: 4px;
    line-height: 1.3;
}

.freshrank-meta-item,
.wsau-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.freshrank-meta-item .dashicons,
.wsau-meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #999;
}

.freshrank-meta-label,
.wsau-meta-label {
    font-weight: 500;
}

.freshrank-meta-separator,
.wsau-meta-separator {
    color: #dcdcde;
}

/* Status Container in Analysis Column */
.freshrank-status-container,
.wsau-status-container {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f1;
}

/* Validation Feedback */
.validation-feedback {
    color: #d63638;
    margin-top: 4px;
    font-size: 13px;
}

input.error,
select.error,
textarea.error {
    border-color: #d63638;
}

input.success,
select.success,
textarea.success {
    border-color: #00a32a;
}

/* GEO Score Indicators */
.geo-score-indicator {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.geo-score-excellent {
    background: #00a32a;
    color: white;
}

.geo-score-good {
    background: #72aee6;
    color: white;
}

.geo-score-fair {
    background: #f0c33c;
    color: #1d2327;
}

.geo-score-poor {
    background: #d63638;
    color: white;
}

/* Platform-Specific Icons */
.geo-platform-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

/* GEO Analysis Section */
.geo-analysis-section {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin: 15px 0;
}

.geo-analysis-section h4 {
    margin-top: 0;
    color: #2271b1;
}

.geo-metric {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.geo-metric:last-child {
    border-bottom: none;
}

.geo-metric-label {
    font-weight: 600;
    color: #1d2327;
}

.geo-metric-value {
    color: #646970;
}

/* Spinning icon animation for analyzing status */
.dashicons.spin {
    animation: dashicon-spin 1s linear infinite;
}

@keyframes dashicon-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Highlight row when creating draft in background */
.freshrank-creating-draft-row,
.wsau-creating-draft-row {
    background-color: #fff8e5 !important;
    border-left: 4px solid #f0b849 !important;
}

.freshrank-creating-draft-row:hover,
.wsau-creating-draft-row:hover {
    background-color: #fff3cc !important;
}

/* Hover effect for usage stat box */
.freshrank-stat-box-usage:hover,
.wsau-stat-box-usage:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 4px rgba(0,115,170,0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Pagination Styles */
.freshrank-pagination,
.wsau-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-pages {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-pages a,
.pagination-pages .current-page {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    text-decoration: none;
    color: #0073aa;
    border-radius: 3px;
    min-width: 32px;
    text-align: center;
}

.pagination-pages .current-page {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
    font-weight: bold;
}

.pagination-pages a:hover {
    background: #f0f0f0;
}

.pagination-ellipsis {
    padding: 5px;
    color: #666;
}

.pagination-controls .button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-per-page label {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.pagination-per-page select {
    padding: 4px 24px 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-position: right 4px center;
}

/* Modal Dialog Styling */
.freshrank-analysis-modal .ui-dialog-titlebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.freshrank-analysis-modal .ui-dialog-title {
    font-size: 16px;
    font-weight: 600;
    padding-right: 40px;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close {
    background: rgba(255,255,255,0.15) !important;
    border: none !important;
    border-radius: 6px !important;
    width: 32px !important;
    height: 32px !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    cursor: pointer !important;
    line-height: 32px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-50%) scale(1.08) !important;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close:focus {
    outline: 2px solid rgba(255,255,255,0.6) !important;
    outline-offset: 2px !important;
    background: rgba(255,255,255,0.25) !important;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close span {
    display: inline-block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    background: none !important;
    position: relative !important;
    line-height: 32px !important;
    vertical-align: middle !important;
}

.freshrank-analysis-modal .ui-dialog-titlebar-close span:before {
    content: '\f335' !important;
    font-family: dashicons !important;
    font-size: 18px !important;
    color: #fff !important;
    display: inline-block !important;
    line-height: 32px !important;
    vertical-align: middle !important;
    text-indent: 0 !important;
    width: 100% !important;
    height: 100% !important;
    text-align: center !important;
}

.freshrank-analysis-modal .ui-dialog-content {
    padding: 24px !important;
    max-height: calc(80vh - 100px) !important;
    overflow-y: auto;
}

/* Common modal button styling */
.freshrank-analysis-modal .ui-dialog-buttonpane,
.freshrank-diff-modal .ui-dialog-buttonpane,
.freshrank-draft-modal .ui-dialog-buttonpane {
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
    padding: 16px 24px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.freshrank-analysis-modal .ui-dialog-buttonset,
.freshrank-diff-modal .ui-dialog-buttonset,
.freshrank-draft-modal .ui-dialog-buttonset {
    display: flex;
    align-items: center;
    gap: 8px;
}

.freshrank-analysis-modal .ui-dialog-buttonset button,
.freshrank-diff-modal .ui-dialog-buttonset button,
.freshrank-draft-modal .ui-dialog-buttonset button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

.freshrank-analysis-modal .ui-dialog-buttonset button:hover,
.freshrank-diff-modal .ui-dialog-buttonset button:hover,
.freshrank-draft-modal .ui-dialog-buttonset button:hover {
    background: #135e96;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.freshrank-analysis-modal .ui-dialog-buttonset button:active,
.freshrank-diff-modal .ui-dialog-buttonset button:active,
.freshrank-draft-modal .ui-dialog-buttonset button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.freshrank-draft-modal {
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

#freshrank-draft-dialog {
    padding: 20px !important;
    font-size: 14px;
    line-height: 1.6;
}

#freshrank-draft-dialog .wsau-detailed-draft-info {
    margin: 0;
}

#freshrank-draft-dialog .wsau-detailed-draft-info h4 {
    margin-top: 0;
}

.freshrank-analysis-modal {
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Make the modal content look better */
#freshrank-analysis-dialog .wsau-detailed-analysis {
    margin: 0;
}

#freshrank-analysis-dialog .wsau-severity-section {
    margin-bottom: 24px;
}

#freshrank-analysis-dialog .wsau-section-header {
    padding: 12px 16px;
    margin: 0 0 12px 0;
}

#freshrank-analysis-dialog .wsau-issue-item {
    padding: 12px;
    margin-bottom: 8px;
}

/* Diff Modal Styling */
.freshrank-diff-modal .ui-dialog-titlebar {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    border: none;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.freshrank-diff-modal .ui-dialog-title {
    font-size: 16px;
    font-weight: 600;
    padding-right: 40px;
}

.freshrank-diff-modal .ui-dialog-titlebar-close {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    border-radius: 4px !important;
    width: 28px !important;
    height: 28px !important;
    right: 16px !important;
    top: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    cursor: pointer !important;
    line-height: 28px !important;
    text-align: center !important;
}

.freshrank-diff-modal .ui-dialog-titlebar-close:hover {
    background: rgba(255,255,255,0.35) !important;
}

.freshrank-diff-modal .ui-dialog-titlebar-close span {
    display: inline-block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    background: none !important;
    position: relative !important;
    line-height: 28px !important;
    vertical-align: middle !important;
}

.freshrank-diff-modal .ui-dialog-titlebar-close span:before {
    content: '\f335' !important;
    font-family: dashicons !important;
    font-size: 16px !important;
    color: #fff !important;
    display: inline-block !important;
    line-height: 28px !important;
    vertical-align: middle !important;
    text-indent: 0 !important;
    width: 100% !important;
    height: 100% !important;
    text-align: center !important;
}

.freshrank-diff-modal .ui-dialog-content {
    padding: 0 !important;
    overflow: hidden !important;
}

.freshrank-diff-container {
    display: flex;
    height: 100%;
    gap: 1px;
    background: #ddd;
}

.freshrank-diff-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.freshrank-diff-pane h3 {
    margin: 0;
    padding: 16px 20px;
    background: #f6f7f7;
    border-bottom: 2px solid #ddd;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.freshrank-diff-original h3 {
    border-bottom-color: #b32d2e;
}

.freshrank-diff-draft h3 {
    border-bottom-color: #00a32a;
}

.freshrank-diff-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
}

.freshrank-diff-formatted {
    max-width: 100%;
}

.freshrank-diff-formatted p {
    margin-bottom: 1em;
}

.freshrank-diff-formatted h1,
.freshrank-diff-formatted h2,
.freshrank-diff-formatted h3,
.freshrank-diff-formatted h4,
.freshrank-diff-formatted h5,
.freshrank-diff-formatted h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.freshrank-diff-formatted ul,
.freshrank-diff-formatted ol {
    margin-left: 2em;
    margin-bottom: 1em;
}

.freshrank-diff-formatted img {
    max-width: 100%;
    height: auto;
}

.freshrank-diff-formatted blockquote {
    border-left: 4px solid #ddd;
    padding-left: 16px;
    margin: 1em 0;
    color: #666;
}

/* Sortable column headers */
#freshrank-articles-table th.sortable a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    display: inline-block;
    transition: color 0.2s ease;
}

#freshrank-articles-table th.sortable a:hover {
    color: #2271b1;
}

#freshrank-articles-table th.sortable a:active {
    color: #135e96;
}



/* Dashboard Filters */
.freshrank-filters {
    background: #fff;
    padding: 15px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin-bottom: 15px;
}

.freshrank-filters form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.freshrank-filters .filter-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.freshrank-filters .filter-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.freshrank-filters label {
    font-weight: 600;
    margin-right: 5px;
}

.freshrank-filters select,
.freshrank-filters input[type="search"] {
    min-width: 150px;
    padding: 5px 8px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
}

.freshrank-filters input[type="search"] {
    min-width: 200px;
}

/* Active filters */
.freshrank-active-filters {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.freshrank-active-filters strong {
    margin-right: 10px;
}

.freshrank-active-filters a {
    margin-left: 15px;
    text-decoration: underline;
}

/* Results count */
.freshrank-results-count {
    margin-bottom: 10px;
    font-size: 14px;
    color: #646970;
}

/* Responsive filters */
@media (max-width: 782px) {
    .freshrank-filters form {
        flex-direction: column;
        align-items: stretch;
    }

    .freshrank-filters .filter-left,
    .freshrank-filters .filter-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-left: 0;
    }

    .freshrank-filters select,
    .freshrank-filters input[type="search"] {
        width: 100%;
    }
}

/* ==================================================================
   Analysis Item Management - Visual Indicators & Dismiss System
   ================================================================== */

/* Analysis Header with Controls */
.freshrank-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

.freshrank-analysis-header h4 {
    margin: 0;
    font-size: 16px;
}

.freshrank-analysis-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* View Toggle Dropdown */
.freshrank-view-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.freshrank-view-toggle label {
    font-weight: 600;
    margin: 0;
}

.freshrank-view-selector {
    min-width: 180px;
    padding: 4px 8px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
}

/* Actionable Badges */
.freshrank-actionable-badge {
    display: flex;
    gap: 8px;
    align-items: center;
}

.freshrank-actionable-badge .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-actionable {
    background: #d7f4dd;
    color: #1e4620;
    border: 1px solid #a7e1b4;
}

.badge-secondary {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
}

.badge-info {
    background: #e5f5fa;
    color: #135e96;
    border: 1px solid #b8dae4;
}

/* Filter Info Text */
.freshrank-filter-info {
    margin: -10px 0 15px 0;
    padding: 8px 12px;
    background: #f0f6fc;
    border-left: 3px solid #0073aa;
    border-radius: 3px;
}

.freshrank-filter-info small {
    color: #646970;
    font-size: 13px;
}

.freshrank-filter-info a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

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

/* Category Count in Headers */
.category-count {
    font-weight: normal;
    font-size: 13px;
    color: #646970;
    margin-left: 6px;
}

/* Issue Header with Indicator and Buttons */
.freshrank-issue-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.freshrank-issue-indicator {
    flex-shrink: 0;
    margin-top: 2px;
}

.freshrank-issue-indicator .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.freshrank-issue-content {
    flex: 1;
}

/* Dismiss/Restore Buttons */
.freshrank-dismiss-item,
.freshrank-restore-item {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    color: #646970;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
}

.freshrank-dismiss-item {
    font-family: Arial, sans-serif;
}

.freshrank-dismiss-item:hover {
    color: #d63638;
    background: #fcf0f1;
}

.freshrank-restore-item {
    color: #2271b1;
}

.freshrank-restore-item:hover {
    color: #135e96;
    background: #f0f6fc;
}

.freshrank-restore-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Issue Status Classes */
.freshrank-issue-status-dismissed {
    opacity: 0.6;
    background: #f6f7f7;
    border-left: 3px solid #d63638 !important;
}

.freshrank-issue-status-actionable {
    /* Don't override border color - let severity classes (high/medium/low) control the color */
}

.freshrank-issue-status-category_disabled,
.freshrank-issue-status-severity_filtered {
    opacity: 0.5;
    background: #f9f9f9;
    border-left: 3px solid #8c8f94 !important;
}

/* Disable buttons for non-actionable items */
.freshrank-issue-status-category_disabled button,
.freshrank-issue-status-severity_filtered button {
    cursor: not-allowed !important;
} 

/* Hide non-actionable issues by default when in "actionable" view */
.wsau-detailed-analysis[data-view="actionable"] .freshrank-issue-status-dismissed,
.wsau-detailed-analysis[data-view="actionable"] .freshrank-issue-status-category_disabled,
.wsau-detailed-analysis[data-view="actionable"] .freshrank-issue-status-severity_filtered {
    display: none;
}

/* Show only dismissed items when in "dismissed" view */
.wsau-detailed-analysis[data-view="dismissed"] .freshrank-issue-status-actionable,
.wsau-detailed-analysis[data-view="dismissed"] .freshrank-issue-status-category_disabled,
.wsau-detailed-analysis[data-view="dismissed"] .freshrank-issue-status-severity_filtered {
    display: none;
}

/* Show all items when in "all" view - no hiding */

/* Fade Animation for Dismiss/Restore */
@keyframes fadeOut {
    from { opacity: 1; max-height: 1000px; }
    to { opacity: 0; max-height: 0; padding: 0; margin: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.freshrank-issue-fading-out {
    animation: fadeOut 0.3s ease-out forwards;
    overflow: hidden;
}

.freshrank-issue-fading-in {
    animation: fadeIn 0.3s ease-in forwards;
}

/* Loading State */
.freshrank-dismiss-item.loading,
.freshrank-restore-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 782px) {
    .freshrank-analysis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .freshrank-analysis-controls {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .freshrank-view-selector {
        width: 100%;
    }

    .freshrank-actionable-badge {
        flex-wrap: wrap;
        width: 100%;
    }

    .freshrank-issue-header {
        flex-direction: column;
        gap: 8px;
    }

.freshrank-dismiss-item,
.freshrank-restore-item {
    align-self: flex-start;
}
}

/* OpenRouter model selector */
.freshrank-model-selector {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 640px;
    flex-wrap: wrap;
}

.freshrank-model-selector .freshrank-model-search,
.freshrank-model-selector select {
    flex: 1 1 48%;
    min-width: 220px;
    box-sizing: border-box;
}

.freshrank-model-selector .freshrank-model-search {
    padding: 4px 8px;
}

.freshrank-model-selector select.freshrank-model-open {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.25);
    overflow-y: auto;
    padding-right: 4px;
    background-color: #fff;
}

.freshrank-model-selector select.freshrank-model-open option {
    padding: 6px 8px;
    background-color: #fff;
}

.freshrank-model-selector select.freshrank-model-open option:checked,
.freshrank-model-selector select.freshrank-model-open option:hover {
    background-color: #e6f2fb;
}

.freshrank-cost-disclaimer {
    margin-top: -6px;
    color: #646970;
    font-style: italic;
}

@media (max-width: 782px) {
    .freshrank-model-selector {
        flex-direction: column;
        max-width: 100%;
    }

    .freshrank-model-selector .freshrank-model-search,
    .freshrank-model-selector select {
        min-width: 100%;
        width: 100%;
        flex-basis: 100%;
    }
}

.freshrank-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 1400px) {
    .freshrank-settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 900px) {
    .freshrank-settings-grid {
        grid-template-columns: 1fr;
    }
}
.freshrank-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.freshrank-card h3 {
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.freshrank-card h3 .dashicons {
    color: #2271b1;
}
.freshrank-card-body {
    padding: 15px;
}
.freshrank-field {
    margin-bottom: 20px;
}
.freshrank-field:last-child {
    margin-bottom: 0;
}
.freshrank-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
.freshrank-field .description {
    margin-top: 8px;
    color: #646970;
    font-size: 13px;
}
.freshrank-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}
.freshrank-status-badge.connected {
    background: #00a32a;
    color: #fff;
}
.freshrank-status-badge.disconnected {
    background: #dba617;
    color: #fff;
}
.freshrank-severity-option {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 8px;
    background: #f6f7f7;
    border-radius: 4px;
    transition: background 0.2s;
}
.freshrank-severity-option:hover {
    background: #f0f0f1;
}
.freshrank-severity-option input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
}
.freshrank-severity-label {
    flex: 1;
}
.freshrank-severity-title {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}
.freshrank-severity-desc {
    font-size: 12px;
    color: #646970;
}

/* FreshRank Agent Hover Popover */
.freshrank-agent-label {
    position: relative;
}
.freshrank-agent-label .dashicons-info-outline:hover::after {
    content: "Managed service with no API keys. $1 per update, 3 free/month. Processing takes ~30 minutes. Coming soon.";
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
    background: #1d2327;
    color: #fff;
    padding: 12px 14px;
    border-radius: 4px;
    border: none;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-weight: normal;
    opacity: 1;
}
.freshrank-agent-label .dashicons-info-outline {
    transition: color 0.2s;
}
.freshrank-agent-label .dashicons-info-outline:hover {
    color: #2271b1 !important;
}