/*
Theme Name: Best Shop - Omniscient
Theme URI: https://nexusinstruments.store
Description: Omniscient child theme for the Best Shop WooCommerce theme. Dark, governance-grade, evidence-focused design system.
Author: Nexus Instruments
Author URI: https://nexusinstruments.store
Template: best-shop
Version: 1.0.0
Text Domain: best-shop-omniscient
*/

/* ===========================
   OMNISCIENT DESIGN SYSTEM
   =========================== */

:root {
    --bg-primary: #0E1116;
    --bg-secondary: #1B222C;

    --text-primary: #E6EDF3;
    --text-secondary: #A9B1BC;
    --text-muted: #6E7681;

    --accent-primary: #3FB8FF;
    --accent-warning: #3FB8FF;
    --accent-caution: #E6A700;
    --accent-danger: #C23B3B;

    --border-subtle: #2A323D;
}

/* Global */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Links */
a {
    color: var(--accent-primary);
}

a:hover {
    color: #66C9FF;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

/* Header */
.site-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
}

/* Footer */
.site-footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

/* Buttons */
button,
.button,
.wp-block-button__link {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 5px;
    font-weight: 600;
    padding: 12px 20px;
}

button:hover,
.button:hover {
    background-color: #66C9FF;
}

/* WooCommerce Product Cards */
.woocommerce ul.products li.product {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    padding: 20px;
    border-radius: 6px;
}

.woocommerce ul.products li.product h2 {
    font-size: 1.1rem;
}

.woocommerce ul.products li.product .price {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Remove star ratings */
.woocommerce .star-rating {
    display: none;
}

/* Subsystem-specific accents */
.omniscient-tech .woocommerce ul.products li.product .price {
    color: var(--accent-tech);
}

.omniscient-tech button,
.omniscient-tech .button,
.omniscient-tech .wp-block-button__link {
    background-color: var(--accent-tech);
}

.omniscient-tech button:hover,
.omniscient-tech .button:hover {
    background-color: #66C9FF; /* Lighter shade, adjust dynamically if needed */
}

.omniscient-eco .woocommerce ul.products li.product .price {
    color: var(--accent-eco);
}

.omniscient-eco button,
.omniscient-eco .button,
.omniscient-eco .wp-block-button__link {
    background-color: var(--accent-eco);
}

.omniscient-eco button:hover,
.omniscient-eco .button:hover {
    background-color: #5CB85C; /* Lighter green */
}

/* Accessibility Enhancements */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px;
    text-decoration: none;
    border: 2px solid var(--accent-primary);
}

button:focus,
.button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #FFFFFF;
        --bg-primary: #000000;
        --bg-secondary: #111111;
    }
}

/* Light mode toggle */
body.light-mode {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-muted: #ADB5BD;
    --border-subtle: #DEE2E6;
}

body.light-mode a {
    color: #007BFF;
}

body.light-mode .site-header,
body.light-mode .site-footer {
    background-color: var(--bg-primary);
}

/* Blockchain verification badge */
.omniscient-blockchain-badge {
    color: var(--accent-primary);
    font-size: 1.2em;
    margin-left: 5px;
    cursor: help;
}

/* Evidence timeline */
.evidence-timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-node {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 15px;
    width: 2px;
    height: calc(100% + 10px);
    background: var(--border-subtle);
}

.timeline-content {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.timeline-content:hover {
    background: var(--bg-secondary);
}

/* Loading spinner */
.loading-spinner {
    font-size: 1.5em;
    animation: spin 1s linear infinite;
}

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

/* Evidence Submission Form */
.evidence-submission input, .evidence-submission textarea {
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 10px;
}

.evidence-submission button {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

.evidence-submission .progress-bar {
    background: var(--border-subtle);
    height: 10px;
    border-radius: 5px;
    margin-top: 20px;
    width: 100%;
}

.evidence-submission .progress {
    background: var(--accent-primary);
    height: 10px;
    border-radius: 5px;
    width: 50%;
}

/* Interactive Charts */
.chart-container {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

/* Leaderboard */
.omniscient-leaderboard table {
    width: 100%;
    color: var(--text-primary);
    border-collapse: collapse;
}

.omniscient-leaderboard th, .omniscient-leaderboard td {
    padding: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}

.badge {
    font-weight: bold;
}

.badge.expert {
    color: var(--accent-primary);
}

.badge.contributor {
    color: var(--accent-warning);
}

.badge.novice {
    color: var(--text-secondary);
}

.badge.newcomer {
    color: var(--text-muted);
}

/* External Data Cards */
.data-card {
    background: var(--bg-primary);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
}

.data-card h5 {
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.data-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Hide author elements and details */
.entry-meta .author,
.byline,
.entry-author,
.post-author,
.author,
.author-info,
.author-bio,
.author-avatar {
    display: none !important;
}

/* Hide comments section */
#comments,
.comments-area,
.comment-list,
.comment-form,
.comments-title,
#respond {
    display: none !important;
}

/* Portal mobile optimization */
@media (max-width: 768px) {
    .omniscient-evidence-portal .container {
        padding: 10px;
    }

    .portal-hero h1 {
        font-size: 2em;
    }

    .evidence-filters div {
        flex-direction: column;
        align-items: stretch;
    }

    .evidence-filters input,
    .evidence-filters select {
        width: 100%;
        margin-bottom: 10px;
    }

    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .portal-external {
        padding: 15px;
    }
}

/* Rebrand parent theme yellow colors with Omniscient theme colors */
button, .button, input[type="submit"], .woocommerce button, .woocommerce .button {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
}

button:hover, .button:hover, input[type="submit"]:hover, .woocommerce button:hover, .woocommerce .button:hover {
    background-color: var(--accent-primary) !important;
    opacity: 0.9;
}

a {
    color: var(--accent-primary) !important;
}

a:hover {
    color: var(--accent-caution) !important;
}

/* Override any yellow backgrounds or borders */
* {
    background-color: transparent !important;
    border-color: var(--border-subtle) !important;
}

body, .site-content, .woocommerce {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Consistent border color for products */
.woocommerce ul.products li.product {
    border: 1px solid var(--border-subtle) !important;
    border-radius: 6px !important;
    padding: 10px !important;
    background: var(--bg-secondary) !important;
    transition: all 0.3s ease !important;
}

.woocommerce ul.products li.product:hover {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 2px 8px rgba(63, 184, 255, 0.2) !important;
}

.woocommerce ul.products li.product a {
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
}

.woocommerce ul.products li.product .price {
    color: var(--accent-primary) !important;
    font-weight: 500 !important;
}

.woocommerce ul.products li.product .button {
    background: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--accent-caution) !important;
}

/* Remove or replace footer credits */
.site-info, .footer-credits, .gradient-themes-credit {
    display: none !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        margin-bottom: 20px;
    }

    .omniscient-evidence-hub,
    .omniscient-ai-rec {
        padding: 15px;
        margin-top: 15px;
    }

    #dark-mode-toggle {
        bottom: 10px;
        right: 10px;
        padding: 10px;
    }
}
