/**
 * AI Nexus AutoPost: Canvas Style Visuals CSS
 * Futuristic dark glassmorphic showcase cards with neon accents
 */

.nexus-canvas-card {
    margin: 2.2em 0;
    background: #0b0f19;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.55), 0 0 24px -6px rgba(6, 182, 212, 0.15);
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #f8fafc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nexus-canvas-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 16px 44px -4px rgba(0, 0, 0, 0.65), 0 0 32px -4px rgba(6, 182, 212, 0.25);
}

/* Card Header Bar */
.nexus-canvas-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    gap: 12px;
}

.nexus-canvas-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #38bdf8;
}

.nexus-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #06b6d4;
    box-shadow: 0 0 8px #06b6d4;
    animation: nexusPulse 1.8s infinite;
}

@keyframes nexusPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #38bdf8; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.nexus-canvas-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    flex-grow: 1;
}

/* Interactive Controls Toolbar */
.nexus-canvas-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nexus-btn-ctrl {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nexus-btn-ctrl img.wp-smiley {
    width: 14px !important;
    height: 14px !important;
    margin: 0 4px 0 0 !important;
    vertical-align: middle !important;
    display: inline-block !important;
    pointer-events: none;
}

.nexus-btn-ctrl:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.nexus-btn-ctrl.active {
    background: rgba(6, 182, 212, 0.2);
    border-color: #06b6d4;
    color: #38bdf8;
}

/* Legacy Canvas Viewport & Controls Hidden (Zero JS, Clean Presentation) */
.nexus-canvas-card .nexus-canvas-viewport,
.nexus-canvas-card .nexus-canvas-controls,
.nexus-canvas-card .nexus-canvas-hint {
    display: none !important;
}

/* 100% Indexable & Accessible Fallback Table */
.nexus-canvas-fallback {
    display: block !important;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-top: none;
    animation: nexusSlideDown 0.3s ease forwards;
}

.nexus-canvas-fallback.active-show {
    display: block;
}

@keyframes nexusSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nexus-indexable-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0;
    color: #cbd5e1;
}

.nexus-indexable-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #38bdf8;
    margin-bottom: 8px;
}

.nexus-indexable-table th {
    background: rgba(30, 41, 59, 0.6);
    color: #f1f5f9;
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nexus-indexable-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.nexus-indexable-table tr:hover td {
    background: rgba(56, 189, 248, 0.04);
}

@media (max-width: 640px) {
    .nexus-canvas-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .nexus-canvas-controls {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .nexus-canvas-hint {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* Viral Executive Takeaway Callout Box */
.nexus-callout-box {
    margin: 1.8em 0;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
    border-left: 4px solid #06b6d4;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
    color: #f1f5f9;
    font-size: 15px;
    line-height: 1.65;
}

.nexus-callout-box strong {
    color: #38bdf8;
    display: inline-block;
    margin-right: 4px;
}

/* Viral Shareable & Tweetable Quote Block */
.nexus-shareable-quote {
    margin: 2.2em 0;
    padding: 22px 28px;
    background: linear-gradient(145deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-left: 5px solid #8b5cf6;
    border-radius: 12px;
    box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.5), 0 0 20px -4px rgba(139, 92, 246, 0.15);
    color: #f8fafc;
    font-size: 17px;
    font-style: italic;
    line-height: 1.6;
    position: relative;
}

.nexus-shareable-quote::before {
    content: "“";
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 38px;
    color: rgba(139, 92, 246, 0.35);
    line-height: 1;
    font-family: Georgia, serif;
}

/* ==========================================================================
   Zero-JS Contextual Visual Metric Cards (Lightning Fast, 100% Indexable)
   ========================================================================== */
.nexus-visual-card {
    margin: 2.2em 0;
    background: #0b0f19;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.55), 0 0 24px -6px rgba(6, 182, 212, 0.12);
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #f8fafc;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nexus-visual-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 16px 44px -4px rgba(0, 0, 0, 0.65), 0 0 32px -4px rgba(6, 182, 212, 0.22);
}

.nexus-visual-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    gap: 12px;
}

.nexus-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #38bdf8;
}

.nexus-visual-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    flex-grow: 1;
}

.nexus-visual-body {
    padding: 18px 20px;
}

.nexus-metric-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nexus-metric-row {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nexus-metric-row:hover {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(56, 189, 248, 0.25);
}

.nexus-metric-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.nexus-metric-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.nexus-metric-values {
    font-size: 13px;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.nexus-val-primary {
    color: #38bdf8;
    font-weight: 700;
    font-size: 14px;
}

.nexus-val-secondary {
    color: #94a3b8;
    font-size: 12px;
}

.nexus-metric-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nexus-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nexus-bar-legend {
    font-size: 12px;
    color: #cbd5e1;
    min-width: 140px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.nexus-bar-track {
    flex-grow: 1;
    height: 8px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.nexus-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.nexus-bar-fill.bar-primary {
    background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.nexus-bar-fill.bar-secondary {
    background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

@media (max-width: 640px) {
    .nexus-bar-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .nexus-bar-legend {
        min-width: unset;
        max-width: 100%;
    }
    .nexus-bar-track {
        width: 100%;
    }
}

/* Institutional Benchmark & Comparison Tables */
.nexus-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.5em 0;
}

.nexus-benchmark-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.nexus-benchmark-table thead th {
    background: rgba(30, 41, 59, 0.9);
    color: #38bdf8;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    border-bottom: 2px solid rgba(56, 189, 248, 0.3);
    text-align: left;
    white-space: nowrap;
}

.nexus-benchmark-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    vertical-align: top;
    color: #e2e8f0;
}

.nexus-benchmark-table tbody tr:last-child td {
    border-bottom: none;
}

.nexus-benchmark-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.06);
}

/* Technical FAQ Items */
.nexus-faq-item {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-left: 4px solid #38bdf8;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.25);
}

.nexus-faq-question {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.nexus-faq-answer {
    font-size: 14.5px;
    color: #cbd5e1;
    line-height: 1.65;
}

.nexus-faq-answer p {
    margin: 0;
}

/* Fact-Check & Verification Audit Box */
.nexus-audit-box {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.25) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
}

.nexus-audit-box code {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* LaTeX Equation Container */
.nexus-latex-equation {
    margin: 1.6em 0;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    overflow-x: auto;
    text-align: center;
    font-size: 15px;
    color: #f1f5f9;
}



