/* Zero-Day Results Page - Master-Detail Layout */

.zeroday-results-container {
    display: grid;
    grid-template-columns: 40% 60%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: #1a1a2e;
}

/* Left Pane */
.left-pane {
    display: flex;
    flex-direction: column;
    border-right: 2px solid rgba(228, 206, 233, 0.2);
    background: #16213e;
    overflow: hidden;
}

/* Filter Sidebar */
.filter-sidebar {
    padding: 1rem;
    border-bottom: 1px solid rgba(228, 206, 233, 0.2);
    max-height: 400px;
    overflow-y: auto;
    background: #0f1620;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-header h5 {
    color: #e4cee9;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-checkbox input {
    cursor: pointer;
}

.filter-checkbox:hover {
    color: #e4cee9;
}

/* Results List Container */
.results-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(228, 206, 233, 0.2);
    background: #16213e;
}

.results-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.results-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(228, 206, 233, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-card:hover {
    background: rgba(228, 206, 233, 0.1);
    border-color: rgba(228, 206, 233, 0.4);
    transform: translateX(4px);
}

.result-card.active {
    background: rgba(228, 206, 233, 0.15);
    border-color: #e4cee9;
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.result-filename {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    word-break: break-word;
}

.result-badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-high {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.badge-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-low {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-cwe {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.badge-pass {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.badge-judge-tp {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-judge-fp {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.results-pagination {
    padding: 1rem;
    border-top: 1px solid rgba(228, 206, 233, 0.2);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(228, 206, 233, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: rgba(228, 206, 233, 0.1);
    border-color: #e4cee9;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.active {
    background: #e4cee9;
    color: #16213e;
    border-color: #e4cee9;
}

/* Code Preview Pane */
.code-preview-pane {
    background: #0f1620;
    overflow-y: auto;
    padding: 1rem;
}

.preview-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(228, 206, 233, 0.2);
}

.preview-title h5 {
    color: #fff;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.preview-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.code-viewer {
    background: #0a0e1a;
    border: 1px solid rgba(228, 206, 233, 0.2);
    border-radius: 8px;
    overflow-x: auto;
}

.code-block {
    margin: 0;
    padding: 1rem;
    color: #e4cee9;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.grep-matches-section,
.ai-analysis-section,
.judge-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(228, 206, 233, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.grep-matches-section h6,
.ai-analysis-section h6,
.judge-section h6 {
    color: #e4cee9;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.grep-match-item {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.grep-match-line {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.grep-match-rule {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.ai-response {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
    .zeroday-results-container {
        grid-template-columns: 1fr;
    }

    .code-preview-pane {
        display: none;
    }

    .result-card {
        cursor: pointer;
    }
}

/* Scrollbar Styling */
.filter-sidebar::-webkit-scrollbar,
.results-list::-webkit-scrollbar,
.code-preview-pane::-webkit-scrollbar {
    width: 8px;
}

.filter-sidebar::-webkit-scrollbar-track,
.results-list::-webkit-scrollbar-track,
.code-preview-pane::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.filter-sidebar::-webkit-scrollbar-thumb,
.results-list::-webkit-scrollbar-thumb,
.code-preview-pane::-webkit-scrollbar-thumb {
    background: rgba(228, 206, 233, 0.3);
    border-radius: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover,
.results-list::-webkit-scrollbar-thumb:hover,
.code-preview-pane::-webkit-scrollbar-thumb:hover {
    background: rgba(228, 206, 233, 0.5);
}

/* InputTracer Results Section */
.zd-inputtracer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.zd-inputtracer-item {
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #64b5f6;
    padding: 0.75rem;
    border-radius: 4px;
}

.zd-inputtracer-mapping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.zd-inputtracer-variable {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.zd-inputtracer-arrow {
    color: #64b5f6;
    font-size: 0.875rem;
}

.zd-inputtracer-source code {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.zd-inputtracer-context {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Show Full File Button */
.zd-expand-full-btn {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zd-expand-full-btn:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: #64b5f6;
}

/* ==========================================================================
   WORDPRESS ENDPOINT FILTER STYLES
   ========================================================================== */

.zd-wp-endpoint-section {
    border-top: 1px solid rgba(33, 150, 243, 0.3);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.zd-wp-endpoint-section .zd-filter-label {
    color: #64b5f6;
}

.zd-wp-endpoint-section .zd-filter-label i {
    color: #64b5f6;
}

/* Toggle Switch */
.zd-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.zd-toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
}

.zd-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.zd-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 20px;
}

.zd-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #aaa;
    transition: 0.3s;
    border-radius: 50%;
}

.zd-toggle-switch input:checked + .zd-toggle-slider {
    background-color: rgba(33, 150, 243, 0.5);
}

.zd-toggle-switch input:checked + .zd-toggle-slider:before {
    transform: translateX(20px);
    background-color: #64b5f6;
}

.zd-toggle-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Auth Level Pills */
.zd-auth-level-filter {
    margin-top: 0.75rem;
}

.zd-filter-sublabel {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zd-auth-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.zd-auth-pill {
    cursor: pointer;
    transition: all 0.2s ease;
}

.zd-auth-pill input {
    display: none;
}

.zd-auth-pill .zd-pill-content {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.zd-auth-pill input:checked + .zd-pill-content {
    border-width: 2px;
}

/* Auth level specific colors */
.zd-auth-unauthenticated input:checked + .zd-pill-content {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    color: #f44336;
}

.zd-auth-subscriber input:checked + .zd-pill-content {
    background: rgba(255, 152, 0, 0.2);
    border-color: #ff9800;
    color: #ff9800;
}

.zd-auth-contributor input:checked + .zd-pill-content {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    color: #ffc107;
}

.zd-auth-author input:checked + .zd-pill-content {
    background: rgba(139, 195, 74, 0.2);
    border-color: #8bc34a;
    color: #8bc34a;
}

.zd-auth-editor input:checked + .zd-pill-content {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196f3;
    color: #2196f3;
}

.zd-auth-admin input:checked + .zd-pill-content {
    background: rgba(156, 39, 176, 0.2);
    border-color: #9c27b0;
    color: #9c27b0;
}

/* ==========================================================================
   ENDPOINT CALL PATH VISUALIZATION
   ========================================================================== */

.zd-endpoint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.zd-endpoint-badge.rest {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.zd-endpoint-badge.ajax {
    background: rgba(156, 39, 176, 0.2);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.zd-endpoint-badge.admin {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.zd-endpoint-badge.shortcode {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.zd-endpoint-badge.widget {
    background: rgba(0, 150, 136, 0.2);
    color: #4db6ac;
    border: 1px solid rgba(0, 150, 136, 0.3);
}

.zd-endpoint-badge.block {
    background: rgba(63, 81, 181, 0.2);
    color: #7986cb;
    border: 1px solid rgba(63, 81, 181, 0.3);
}

.zd-endpoint-badge.hook {
    background: rgba(233, 30, 99, 0.2);
    color: #f48fb1;
    border: 1px solid rgba(233, 30, 99, 0.3);
}

.zd-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.zd-auth-badge.unauthenticated {
    background: rgba(244, 67, 54, 0.3);
    color: #ef5350;
}

.zd-auth-badge.subscriber {
    background: rgba(255, 152, 0, 0.3);
    color: #ffb74d;
}

.zd-auth-badge.contributor,
.zd-auth-badge.author {
    background: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

.zd-auth-badge.editor {
    background: rgba(33, 150, 243, 0.3);
    color: #64b5f6;
}

.zd-auth-badge.admin,
.zd-auth-badge.superadmin {
    background: rgba(156, 39, 176, 0.3);
    color: #ce93d8;
}

/* Call Path Display */
.zd-call-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.zd-call-path .func-node {
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: 500;
}

.zd-call-path .func-node.callback {
    background: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.zd-call-path .func-node.intermediate {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.zd-call-path .func-node.vulnerable {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.zd-call-path .path-arrow {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

/* Endpoint Info Section in Results */
.zd-endpoint-info {
    background: rgba(33, 150, 243, 0.05);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.75rem;
}

.zd-endpoint-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #64b5f6;
    font-weight: 600;
    font-size: 0.85rem;
}

.zd-endpoint-route {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    word-break: break-all;
}

.zd-endpoint-method {
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
    border-radius: 2px;
    text-transform: uppercase;
}

.zd-endpoint-method.get {
    background: rgba(76, 175, 80, 0.3);
    color: #81c784;
}

.zd-endpoint-method.post {
    background: rgba(33, 150, 243, 0.3);
    color: #64b5f6;
}

.zd-endpoint-method.put,
.zd-endpoint-method.patch {
    background: rgba(255, 152, 0, 0.3);
    color: #ffb74d;
}

.zd-endpoint-method.delete {
    background: rgba(244, 67, 54, 0.3);
    color: #ef5350;
}

/* ============================================
   WORDPRESS ENDPOINT REACHABILITY SECTION
   ============================================ */

/* Section Container */
.zd-wp-endpoint-section h6 {
    color: #0073aa;
}

.zd-wp-endpoint-section h6 i {
    color: #0073aa;
}

/* Endpoint List */
.zd-wp-endpoint-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Individual Endpoint Item */
.zd-wp-endpoint-item {
    background: rgba(0, 115, 170, 0.08);
    border: 1px solid rgba(0, 115, 170, 0.2);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}

.zd-wp-endpoint-item:hover {
    background: rgba(0, 115, 170, 0.12);
    border-color: rgba(0, 115, 170, 0.3);
}

.zd-wp-endpoint-item.zd-primary-endpoint {
    border-color: rgba(0, 184, 148, 0.4);
    background: rgba(0, 184, 148, 0.1);
}

/* Endpoint Header */
.zd-wp-endpoint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.zd-wp-endpoint-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(0, 115, 170, 0.2);
    border-radius: 4px;
    color: #3db4e9;
    font-size: 0.75rem;
    font-weight: 600;
}

.zd-wp-endpoint-type i {
    font-size: 0.7rem;
}

/* Auth Level Badges */
.zd-wp-endpoint-auth {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.zd-wp-endpoint-auth.zd-auth-unauthenticated {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.zd-wp-endpoint-auth.zd-auth-subscriber {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.zd-wp-endpoint-auth.zd-auth-contributor {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.zd-wp-endpoint-auth.zd-auth-author {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.zd-wp-endpoint-auth.zd-auth-editor {
    background: rgba(26, 188, 156, 0.2);
    color: #1abc9c;
}

.zd-wp-endpoint-auth.zd-auth-admin {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.zd-wp-endpoint-auth.zd-auth-superadmin {
    background: rgba(108, 92, 231, 0.2);
    color: #6c5ce7;
}

/* Endpoint Route */
.zd-wp-endpoint-route {
    margin-bottom: 0.5rem;
}

.zd-wp-endpoint-route code {
    display: block;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
    word-break: break-all;
}

/* Call Path Section */
.zd-wp-call-path {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.zd-wp-call-path-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.zd-wp-call-path-chain {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

/* Call Chain Visualization */
.zd-call-chain {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.zd-chain-node {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.zd-chain-node i {
    font-size: 0.65rem;
    opacity: 0.7;
}

.zd-chain-node:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Callback Node - First in chain */
.zd-chain-node.zd-chain-callback {
    background: rgba(0, 115, 170, 0.2);
    border-color: rgba(0, 115, 170, 0.4);
    color: #3db4e9;
}

.zd-chain-node.zd-chain-callback i {
    color: #3db4e9;
}

/* Vulnerable Node - Last in chain */
.zd-chain-node.zd-chain-vulnerable {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

.zd-chain-node.zd-chain-vulnerable i {
    color: #e74c3c;
}

/* Chain Arrow */
.zd-chain-arrow {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.65rem;
    padding: 0 0.125rem;
}

/* ============================================
   WORDPRESS ENDPOINT FILTER STYLES (Sidebar)
   ============================================ */

/* Toggle Switch */
.zd-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.zd-toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.zd-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.zd-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.zd-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.zd-toggle-switch input:checked + .zd-toggle-slider {
    background-color: var(--primary-blue);
}

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

.zd-toggle-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Auth Level Pills */
.zd-auth-level-filter {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.zd-filter-sublabel {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zd-auth-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.zd-auth-pill {
    cursor: pointer;
    flex: 0 0 auto;
}

.zd-auth-pill input {
    display: none;
}

.zd-auth-pill .zd-pill-content {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.zd-auth-pill .zd-pill-content i {
    font-size: 0.65rem;
}

/* Unauthenticated - Red/Critical */
.zd-auth-unauthenticated .zd-pill-content {
    background: rgba(231, 76, 60, 0.1);
    color: rgba(231, 76, 60, 0.7);
    border-color: rgba(231, 76, 60, 0.2);
}

.zd-auth-unauthenticated input:checked + .zd-pill-content {
    background: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
    border-color: #e74c3c;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.2);
}

/* Subscriber - Orange */
.zd-auth-subscriber .zd-pill-content {
    background: rgba(243, 156, 18, 0.1);
    color: rgba(243, 156, 18, 0.7);
    border-color: rgba(243, 156, 18, 0.2);
}

.zd-auth-subscriber input:checked + .zd-pill-content {
    background: rgba(243, 156, 18, 0.25);
    color: #f39c12;
    border-color: #f39c12;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.2);
}

/* Contributor - Purple */
.zd-auth-contributor .zd-pill-content {
    background: rgba(155, 89, 182, 0.1);
    color: rgba(155, 89, 182, 0.7);
    border-color: rgba(155, 89, 182, 0.2);
}

.zd-auth-contributor input:checked + .zd-pill-content {
    background: rgba(155, 89, 182, 0.25);
    color: #9b59b6;
    border-color: #9b59b6;
    box-shadow: 0 2px 6px rgba(155, 89, 182, 0.2);
}

/* Author - Blue */
.zd-auth-author .zd-pill-content {
    background: rgba(52, 152, 219, 0.1);
    color: rgba(52, 152, 219, 0.7);
    border-color: rgba(52, 152, 219, 0.2);
}

.zd-auth-author input:checked + .zd-pill-content {
    background: rgba(52, 152, 219, 0.25);
    color: #3498db;
    border-color: #3498db;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.2);
}

/* Editor - Teal */
.zd-auth-editor .zd-pill-content {
    background: rgba(26, 188, 156, 0.1);
    color: rgba(26, 188, 156, 0.7);
    border-color: rgba(26, 188, 156, 0.2);
}

.zd-auth-editor input:checked + .zd-pill-content {
    background: rgba(26, 188, 156, 0.25);
    color: #1abc9c;
    border-color: #1abc9c;
    box-shadow: 0 2px 6px rgba(26, 188, 156, 0.2);
}

/* Admin - Green */
.zd-auth-admin .zd-pill-content {
    background: rgba(0, 184, 148, 0.1);
    color: rgba(0, 184, 148, 0.7);
    border-color: rgba(0, 184, 148, 0.2);
}

.zd-auth-admin input:checked + .zd-pill-content {
    background: rgba(0, 184, 148, 0.25);
    color: #00b894;
    border-color: #00b894;
    box-shadow: 0 2px 6px rgba(0, 184, 148, 0.2);
}

/* WordPress Badge in Result Cards */
.zd-badge-wp {
    background: rgba(0, 115, 170, 0.2);
    color: #3db4e9;
}

.zd-badge-wp i {
    margin-left: 0.125rem;
}

.zd-badge-critical {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    animation: pulse-critical 2s infinite;
}

.zd-badge-critical i {
    margin-left: 0.125rem;
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   EXPANDABLE CALL TREE STYLES
   ============================================ */

/* Call Tree Container */
.zd-wp-call-tree-container {
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.zd-wp-call-tree-container.collapsed .zd-wp-call-tree-body {
    display: none;
}

.zd-wp-call-tree-container.collapsed .zd-tree-toggle {
    transform: rotate(-90deg);
}

/* Tree Header */
.zd-wp-call-tree-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.zd-wp-call-tree-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.zd-tree-toggle {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.6);
}

.zd-tree-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.zd-tree-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Tree Body */
.zd-wp-call-tree-body {
    padding: 0.75rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Root callback */
.zd-tree-root {
    margin-bottom: 0.5rem;
}

.zd-tree-callback {
    color: #3db4e9;
    font-weight: 600;
}

.zd-tree-callback i {
    margin-right: 0.35rem;
}

/* Tree List */
.zd-tree-list {
    list-style: none;
    margin: 0;
    padding-left: 1.25rem;
    border-left: 1px dashed rgba(255, 255, 255, 0.2);
}

.zd-tree-item {
    position: relative;
    padding: 0.15rem 0;
}

.zd-tree-item::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 0.6rem;
    width: 1rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.zd-tree-item.last::after {
    content: "";
    position: absolute;
    left: -1.26rem;
    top: 0.6rem;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.2);
}

/* Tree Node Row */
.zd-tree-node-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    transition: background 0.15s ease;
}

.zd-tree-item.has-children > .zd-tree-node-row {
    cursor: pointer;
}

.zd-tree-item.has-children > .zd-tree-node-row:hover {
    background: rgba(255, 255, 255, 0.1);
}

.zd-tree-item.collapsed > .zd-tree-list {
    display: none;
}

.zd-tree-item.collapsed > .zd-tree-node-row .zd-tree-toggle {
    transform: rotate(-90deg);
}

/* Tree Icons */
.zd-tree-dot {
    font-size: 0.3rem;
    color: rgba(255, 255, 255, 0.4);
    width: 0.7rem;
    text-align: center;
}

.zd-tree-func {
    color: rgba(255, 255, 255, 0.85);
}

/* Vulnerable function highlight */
.zd-vulnerable-func {
    color: #e74c3c !important;
    font-weight: 600;
}

.zd-vuln-icon {
    color: #e74c3c;
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

/* Direct callback indicator */
.zd-wp-direct-callback {
    padding: 0.4rem 0.6rem;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #e74c3c;
}

.zd-wp-direct-callback i {
    color: #e74c3c;
}