/* Hosting Benchmark Styles */

.divewp-hosting-benchmark {
    margin-top: 40px;
}

.benchmark-description {
    margin-bottom: 30px;
}

.benchmark-description p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Hero - initial page only */
.benchmark-hero {
    background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 18px;
}

.benchmark-hero .hero-content {
    text-align: center;
}

.benchmark-hero .hero-title {
    margin: 0 0 14px 0;
    font-family: 'Literata', serif;
    font-size: 18px;
    color: #1e293b;
}

.benchmark-hero .hero-controls {
    justify-content: center;
}

.benchmark-hero .hero-hint {
    margin-top: 10px;
    font-size: 13px;
    color: #475569;
}

/* Score legend */
.benchmark-score-legend {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.benchmark-score-legend h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1e293b;
}

.score-legend-desc { margin: 0 0 10px 0; color: #64748b; font-size: 13px; }

.score-legend-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.score-legend-list li { display: flex; align-items: center; gap: 10px; }
.score-range { color: #475569; font-size: 12px; }

.score-pill { color: #fff; font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 9999px; }
.score-pill.excellent { background: #10b981; }
.score-pill.good { background: #3b82f6; }
.score-pill.fair { background: #f59e0b; }
.score-pill.poor { background: #ef4444; }
.score-pill.critical { background: #dc2626; }

/* Benchmark Container */
.benchmark-container {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

/* Benchmark Controls */
.benchmark-controls {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.benchmark-control-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.benchmark-launch-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.benchmark-launch-btn {
    font-size: 16px;
    padding: 12px 24px;
    min-height: auto;
    display: inline-flex;
    align-items: center;
    background: #48bb78; /* Use DiveWP primary green to match global */
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.benchmark-settings-toggle {
    display: inline-flex;
    align-items: center;
}

/* Force override WP core button styles when present */
.benchmark-launch-btn.divewp-button,
.benchmark-settings-toggle.divewp-button,
.settings-actions .divewp-button {
    background: #48bb78 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
}

.benchmark-settings-toggle.divewp-button {
    background: #f0f6fc !important;
    color: #2271b1 !important;
    border: 1px solid #c3d4e3 !important;
}

.benchmark-settings-toggle.divewp-button:hover {
    background: #e1e9f1 !important;
}

.benchmark-launch-btn:hover {
    background: #38a169; /* Hover shade from global green button */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16,185,129,0.25);
}

.benchmark-settings-toggle button {
    display: flex;
    align-items: center;
    gap: 5px;
}

.benchmark-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.ready {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-indicator.running {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-indicator.completed {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-indicator.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Settings Panel */
.benchmark-settings {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 15px;
    overflow: hidden;
}

/* Settings Header */
.settings-header {
    background: linear-gradient(135deg, #667eea 0%, #38a169 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.settings-header h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
}

.settings-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.settings-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Settings Content */
.settings-content {
    padding: 30px;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-section:last-child {
    margin-bottom: 20px;
}

/* Section Headers */
.section-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 15px;
}

.section-header h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header .dashicons {
    color: #667eea;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.section-description {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Test Categories Grid */
.test-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* Test Category Cards */
.test-category-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.test-category-card.available {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.test-category-card.unavailable {
    border-color: #e5e7eb;
    opacity: 0.7;
}

.test-category-card:hover.available {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

/* Category Card Header */
.category-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #667eea;
}

.category-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.category-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.status-available {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-coming_soon {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Custom Toggle Switch */
.category-toggle-wrapper {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.category-toggle-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #10b981;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

input:disabled + .toggle-slider {
    background-color: #e5e7eb;
    cursor: not-allowed;
}

/* Category Description */
.category-description {
    padding: 15px 20px;
}

.category-description p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Category Tests */
.category-tests {
    padding: 0 20px 20px;
}

.tests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.tests-count {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.toggle-tests-detail {
    background: none;
    border: 1px solid #e1e5e9;
    color: #667eea;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.toggle-tests-detail:hover {
    background: #667eea;
    color: white;
}

.toggle-tests-detail .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.toggle-tests-detail.expanded .dashicons {
    transform: rotate(180deg);
}

/* Tests Detail */
.tests-detail {
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background: #f8f9fa;
}

.test-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.test-item:last-child {
    border-bottom: none;
}

.test-item:hover {
    background: #f0f0f0;
}

.test-item input[type="checkbox"] {
    margin-top: 2px;
}

.test-info {
    flex: 1;
}

.test-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 2px;
}

.test-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Tests Preview (for unavailable categories) */
.tests-preview {
    color: #999;
    font-size: 12px;
    font-style: italic;
    line-height: 1.4;
}

/* Advanced Settings Grid */
.advanced-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Setting Cards */
.setting-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.setting-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.setting-card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-card-header .dashicons {
    color: #667eea;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.setting-card-header label {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.setting-card-body {
    padding: 20px;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.input-group input[type="number"] {
    width: 70px;
    padding: 6px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
}

.input-group input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-suffix {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.setting-description {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.radio-option input[type="radio"] {
    margin-top: 2px;
}

.radio-label {
    flex: 1;
}

.radio-label strong {
    display: block;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.radio-label small {
    color: #666;
    font-size: 12px;
    line-height: 1.3;
}

/* Settings Actions */
.settings-actions {
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.settings-actions .button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.settings-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.settings-actions .button-primary, .settings-actions .divewp-button {
    background: #48bb78; /* Align with global DiveWP green */
    border: none;
    color: #fff !important;
}

.settings-actions .button-primary:hover, .settings-actions .divewp-button:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .test-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-content {
        padding: 20px;
    }
    
    .settings-header {
        padding: 20px;
    }
    
    .category-card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .category-header-left {
        align-self: stretch;
    }
    
    .settings-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .settings-actions .button {
        justify-content: center;
    }
}

/* Results Container */
.benchmark-results {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 25px;
    margin-top: 20px;
}

.benchmark-results h5 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 18px;
}

.results-placeholder {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.results-placeholder p {
    margin: 0;
}

/* Test Categories Styles */
.test-categories {
    margin-top: 15px;
}

.test-category {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.test-category h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #2c3e50;
}

.test-category h4 label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.test-category h4 input[type="checkbox"] {
    margin-right: 8px;
}

.sub-tests {
    margin-left: 20px;
}

.sub-test-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    cursor: pointer;
}

.sub-test-label input[type="checkbox"] {
    margin-right: 8px;
}

.test-status {
    font-size: 11px;
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #666;
}

.test-status.pending {
    background: #f3f4f6;
    color: #6b7280;
}

.test-status.running {
    background: #fef3c7;
    color: #92400e;
}

.test-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.test-status.error,
.test-status.killed {
    background: #fee2e2;
    color: #991b1b;
}

/* Results Display */
.benchmark-category-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.overall-score {
    background: #48bb78; /* DiveWP green */
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.overall-score h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

/* =========================================================================
   Preloader popup for hosting benchmark
   ========================================================================= */
.divewp-benchmark-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.divewp-benchmark-preloader {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding-bottom: 117px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-width: 720px;
    width: 92%;
    max-height: 85vh;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preloader-video-container {
    width: 100%;
    height: 200px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

.preloader-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.preloader-content {
    padding: 22px 24px;
    text-align: left;
    background: #fff;
}

.preloader-title {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}

.preloader-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    color: #475569;
    font-size: 13px;
}

.preloader-meta .stopwatch {
    font-weight: 600;
    color: #111827;
}

.duration-hint {
    color: #6b7280;
}

.progress-group {
    margin-bottom: 12px;
}

.progress-bar-container {
    background: #f3f4f6;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.benchmark-progress-indeterminate {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981, #3b82f6);
    background-size: 200% 100%;
    animation: indeterminate-progress 2s linear infinite;
}

@keyframes indeterminate-progress {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.benchmark-progress-text {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.benchmark-queue-summary {
    margin-top: 4px;
    color: #6b7280;
    font-size: 13px;
}

.benchmark-tests-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 24px;
}

.benchmark-test-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 4px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
}

.benchmark-test-item:last-child { border-bottom: none; }

.benchmark-test-item .test-label { color: #1f2937; }

.benchmark-test-item.pending .status-icon { color: #9ca3af; }
.benchmark-test-item.running .status-icon { color: #2563eb; }
.benchmark-test-item.completed .status-icon { color: #10b981; }
.benchmark-test-item.error .status-icon { color: #ef4444; }

.spinner-icon { animation: divewp-spin 1.2s linear infinite; }


/* Responsive Design */
@media (max-width: 768px) {
    .benchmark-control-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .benchmark-launch-area {
        justify-content: center;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .benchmark-container {
        padding: 15px;
    }
    
    .sub-tests {
        grid-template-columns: 1fr;
    }
    
    .benchmark-category-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .benchmark-launch-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Test Progress */
.test-progress {
    margin: 20px 0;
}

.test-progress-bar {
    background: #f0f0f0;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.test-progress-fill {
    background: linear-gradient(90deg, #0073aa, #005a87);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.test-status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.test-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.test-status-item:last-child {
    border-bottom: none;
}

.test-status-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.test-status-badge.pending {
    background: #f3f4f6;
    color: #6b7280;
}

.test-status-badge.running {
    background: #fef3c7;
    color: #92400e;
}

.test-status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.test-status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Saved Benchmarks Section */
.saved-benchmarks-section {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.saved-benchmarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.saved-benchmarks-actions { display: flex; gap: 8px; }

/* Match Email Logs buttons styling */
#divewp-refresh-benchmarks,
#divewp-delete-all-benchmarks {
    background-color: #4299e1;
    color: #fff;
    border-color: #4299e1;
    border-radius: 6px;
    padding: 4px 12px 4px 8px;
    height: auto;
    min-height: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#divewp-delete-all-benchmarks {
    background-color: #D92D20;
    border-color: #D92D20;
}

#divewp-refresh-benchmarks::before,
#divewp-delete-all-benchmarks::before {
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

#divewp-refresh-benchmarks::before { content: "\f463"; }
#divewp-delete-all-benchmarks::before { content: "\f182"; }

/* Hide static icons when loading to prevent double icons */
#divewp-refresh-benchmarks.loading::before,
#divewp-delete-all-benchmarks.loading::before {
    display: none;
}

#divewp-refresh-benchmarks:hover { background-color: #3182ce; border-color: #3182ce; }
#divewp-delete-all-benchmarks:hover { background-color: #b91c1c; border-color: #b91c1c; }

/* Spinner now centralized in divewp-global.css */

.saved-benchmarks-header h5 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.loading-saved-benchmarks {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.loading-saved-benchmarks .dashicons {
    margin-right: 8px;
}

/* Saved Benchmarks List Table */
.saved-benchmarks-list-table {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.benchmarks-table-header {
    display: grid;
    grid-template-columns: 200px 150px 1fr 160px;
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
    padding: 12px 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benchmarks-table-body {
    display: block;
}

.benchmark-table-row {
    display: grid;
    grid-template-columns: 200px 150px 1fr 160px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    align-items: center;
}

.benchmark-table-row:hover {
    background-color: #f8f9fa;
}

.benchmark-table-row:last-child {
    border-bottom: none;
}

/* Date Column */
.col-date .benchmark-date-primary {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.col-date .benchmark-time-secondary {
    font-size: 12px;
    color: #666;
}

/* Score Column */
.col-score .benchmark-overall-score {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.col-score .benchmark-rating {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Breakdown Column */
.score-breakdown-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.score-breakdown-list .score-item {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

/* Actions Column */
.col-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.col-actions .button {
    font-size: 11px;
    padding: 6px 10px;
    height: auto;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.col-actions .button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

.delete-benchmark-btn {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.delete-benchmark-btn:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .benchmarks-table-header,
    .benchmark-table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .benchmarks-table-header {
        display: none; /* Hide header on mobile */
    }
    
    .benchmark-table-row {
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        margin-bottom: 10px;
        background: white;
    }
    
    .col-date::before { content: "Date: "; font-weight: 600; }
    .col-score::before { content: "Score: "; font-weight: 600; }
    .col-breakdown::before { content: "Breakdown: "; font-weight: 600; }
    .col-actions::before { content: "Actions: "; font-weight: 600; }
}

.no-saved-benchmarks, .error-loading-benchmarks {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.error-loading-benchmarks {
    color: #dc3545;
}

/* Loading and Error Indicators */
.loading-indicator, .error-indicator {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-indicator.prominent {
    padding: 28px 24px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.loading-indicator .loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 8px;
}

.error-indicator {
    color: #dc3545;
}

/* Animation */
@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

/* ============================================================================
   Individual Sub-test Performance Enhancement (Simplified)
   ============================================================================ */

.sub-test-performance-interpretation {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e5e9;
}

.performance-rating-simple {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ops-per-sec {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.ops-per-sec-pill {
    font-size: 11px !important;
    padding: 3px 8px !important;
    font-weight: 500;
}

/* Fix pill sizing - make both pills same size */
.hosting-evaluation-card .performance-rating-simple .status-pill {
    font-size: 11px !important;
    padding: 6px 10px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    color: #ffffff !important; /* Ensure white text on colored backgrounds */
}


.hosting-evaluation-card .ops-per-sec-pill {
    font-size: 11px !important;
    padding: 6px 10px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
}

.performance-explanation-brief {
    font-size: 13px;
    color: #475569;
    margin: 6px 0;
    line-height: 1.4;
}

.hosting-quality-brief {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.hosting-quality-brief strong {
    color: #374151;
}

.sub-test-item {
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #ffffff;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Higher specificity to override hosting-evaluation.css */
.hosting-evaluation-card .sub-test-item {
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #ffffff;
    margin-bottom: 12px;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.sub-test-item:last-child {
    margin-bottom: 0;
}

/* Top Section: Header with name and description */
.sub-test-header {
    padding-bottom: 12px;
}

.sub-test-name {
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 4px;
}

.sub-test-description {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

/* Bottom Section: Operations (left) and Time (right) */
.sub-test-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e1e5e9;
}

.sub-test-operations-left {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    text-align: left;
}

.sub-test-time-right {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-align: right;
}

/* Higher specificity overrides for proper alignment */
.hosting-evaluation-card .sub-test-header {
    padding-bottom: 12px;
    text-align: left !important;
}

.hosting-evaluation-card .sub-test-name {
    font-weight: 600;
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 4px;
    text-align: left !important;
}

.hosting-evaluation-card .sub-test-description {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
    text-align: left !important;
}

.hosting-evaluation-card .sub-test-bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-top: 12px;
    border-top: 1px solid #e1e5e9;
}

.hosting-evaluation-card .sub-test-operations-left {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    text-align: left !important;
}

.hosting-evaluation-card .sub-test-time-right {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-align: right !important;
    margin-top: 8px;
} 

/* ============================================================================
   Score Breakdown Content (inside performance-summary container)
   ============================================================================ */

/* .score-breakdown-content wrapper intentionally has no extra styling */

.score-breakdown-content h4 {
    margin: 0 0 12px 0;
    font-family: 'Literata', serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.breakdown-intro {
    font-size: 14px;
    color: #475569;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.contributions-grid {
    margin-bottom: 16px;
}

.contribution-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.contribution-row:last-child {
    margin-bottom: 0;
}

.test-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.test-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.test-weight {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.test-result {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-icon {
    font-size: 16px;
}

.result-points {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
}

.calculation-total {
    background: rgba(236, 253, 245, 0.8);
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    color: #047857;
    text-align: center;
    margin-top: 12px;
}

.calculation-total strong {
    color: #065f46;
} 