/* Prop Firms Table - Dark Theme v1.0.0
 * Cookie-based theme detection for Blocksy
 * Works with .pft-dark-mode class managed by JavaScript
 */

/* ========================================
   CSS VARIABLES - Dark Theme
   Applied when .pft-dark-mode class is present
   ======================================== */

.pft-wrapper.pft-dark-mode,
.pft-table-wrapper.pft-dark-mode,
.pft-sidebar.pft-dark-mode,
.pft-header.pft-dark-mode {
    /* Gold colors - UNCHANGED */
    --pft-primary: #f59e0b !important;
    --pft-primary-hover: #d97706 !important;
    --pft-primary-light: #78350f !important;
    
    /* Semantic colors */
    --pft-success: #10b981 !important;
    --pft-success-light: #064e3b !important;
    --pft-danger: #ef4444 !important;
    --pft-danger-light: #7f1d1d !important;
    
    /* Inverted grays */
    --pft-gray-50: #0f172a !important;
    --pft-gray-100: #1e293b !important;
    --pft-gray-200: #334155 !important;
    --pft-gray-300: #475569 !important;
    --pft-gray-400: #64748b !important;
    --pft-gray-500: #94a3b8 !important;
    --pft-gray-600: #cbd5e1 !important;
    --pft-gray-700: #e2e8f0 !important;
    --pft-gray-800: #f1f5f9 !important;
    --pft-gray-900: #f8fafc !important;
    
    /* Inverted text */
    --pft-text-primary: #f8fafc !important;
    --pft-text-secondary: #cbd5e1 !important;
    --pft-text-tertiary: #94a3b8 !important;
    --pft-text-light: #64748b !important;
    
    /* Inverted backgrounds */
    --pft-bg-primary: #1e293b !important;
    --pft-bg-secondary: #0f172a !important;
    --pft-bg-tertiary: #334155 !important;
    
    /* Inverted borders */
    --pft-border-light: #334155 !important;
    --pft-border-medium: #475569 !important;
    
    /* Enhanced shadows for dark backgrounds */
    --pft-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3) !important;
    --pft-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3) !important;
    --pft-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4) !important;
    --pft-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.5) !important;
}

/* ========================================
   COMPONENT OVERRIDES - HEADER
   ======================================== */


.pft-table-container {
     --pft-bg-primary: #1e293b !important;
    --pft-bg-secondary: #1e293b !important;
    --pft-bg-tertiary: #334155 !important;
}

.pft-header.pft-dark-mode {
    background: var(--pft-bg-primary, #1e293b) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.pft-header.pft-dark-mode .pft-header-title {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-header.pft-dark-mode .pft-header-disclaimer {
    color: var(--pft-text-secondary, #cbd5e1) !important;
}

.pft-header.pft-dark-mode .pft-email-link {
    color: #60a5fa !important;
}

.pft-header.pft-dark-mode .pft-email-link:hover {
    color: #93c5fd !important;
}

/* ========================================
   COMPONENT OVERRIDES - HERO SECTION
   ======================================== */

.pft-hero-section.pft-dark-mode {
    background: transparent !important;
}

.pft-hero-section.pft-dark-mode .pft-hero-title {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-hero-section.pft-dark-mode .pft-hero-subtitle {
    color: var(--pft-text-secondary, #cbd5e1) !important;
}

.pft-hero-section.pft-dark-mode .pft-benefit-card {
    background: var(--pft-bg-primary, #1e293b) !important;
    border-color: var(--pft-bg-primary, #1e293b) !important;
}

.pft-hero-section.pft-dark-mode .pft-benefit-card:hover {
    background: var(--pft-bg-tertiary, #334155) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.pft-hero-section.pft-dark-mode .pft-benefit-value {
    color: var(--pft-primary, #f59e0b) !important;
}

.pft-hero-section.pft-dark-mode .pft-benefit-label {
    color: var(--pft-text-secondary, #cbd5e1) !important;
}

/* ========================================
   COMPONENT OVERRIDES - WRAPPER & SIDEBAR
   ======================================== */

.pft-wrapper.pft-dark-mode {
    background: var(--pft-bg-secondary, #0f172a) !important;
}

.pft-sidebar.pft-dark-mode {
    background: var(--pft-bg-primary, #1e293b) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.pft-sidebar.pft-dark-mode h3,
.pft-sidebar.pft-dark-mode h4 {
    color: var(--pft-text-primary, #f8fafc) !important;
}

/* ========================================
   COMPONENT OVERRIDES - FILTERS
   ======================================== */

.pft-sidebar.pft-dark-mode .pft-filter-btn {
    background: var(--pft-bg-tertiary, #334155) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-sidebar.pft-dark-mode .pft-filter-btn:hover {
    background: var(--pft-gray-300, #475569) !important;
}

.pft-sidebar.pft-dark-mode .pft-filter-btn.pft-active {
    background: var(--pft-primary, #f59e0b) !important;
    color: #000 !important;
}

.pft-sidebar.pft-dark-mode .pft-filter-checkbox {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-sidebar.pft-dark-mode .pft-range-values {
    color: var(--pft-text-primary, #f8fafc) !important;
}

/* Range Slider Dark Theme */
.pft-sidebar.pft-dark-mode .pft-range-slider .noUi-target {
    background: var(--pft-gray-300, #475569) !important;
}

.pft-sidebar.pft-dark-mode .pft-range-slider .noUi-connect {
    background: var(--pft-primary, #f59e0b) !important;
}

.pft-sidebar.pft-dark-mode .pft-range-slider .noUi-handle {
    background: var(--pft-bg-primary, #1e293b) !important;
    border-color: var(--pft-primary, #f59e0b) !important;
}

/* ========================================
   COMPONENT OVERRIDES - TABLE
   ======================================== */

.pft-table-wrapper.pft-dark-mode {
    background: var(--pft-bg-primary, #1e293b) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-table-header {
    background: var(--pft-bg-secondary, #0f172a) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-table-header > div {
    background: var(--pft-bg-secondary, #0f172a) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
    border-bottom-color: var(--pft-border-light, #334155) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-table-header > div[data-sort]:hover {
    background: var(--pft-bg-tertiary, #334155) !important;
}

/* Sticky columns dark mode */
.pft-table-wrapper.pft-dark-mode .pft-col-logo,
.pft-table-wrapper.pft-dark-mode .pft-table-header .pft-col-logo {
    background: var(--pft-bg-secondary, #0f172a) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-col-actions,
.pft-table-wrapper.pft-dark-mode .pft-table-header .pft-col-actions {
    background: var(--pft-bg-secondary, #0f172a) !important;
}

/* Table Rows */
.pft-table-wrapper.pft-dark-mode .pft-row > div {
    border-bottom-color: var(--pft-border-light, #334155) !important;
    background: var(--pft-bg-primary, #1e293b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-row:hover > * {
    background: var(--pft-bg-tertiary, #334155) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-row .pft-col-logo {
    background: var(--pft-bg-primary, #1e293b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-row:hover .pft-col-logo {
    background: var(--pft-bg-tertiary, #334155) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-row .pft-col-actions {
    background: var(--pft-bg-primary, #1e293b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-row:hover .pft-col-actions {
    background: var(--pft-bg-tertiary, #334155) !important;
}

/* ========================================
   COMPONENT OVERRIDES - FIRM INFO
   ======================================== */

.pft-table-wrapper.pft-dark-mode .pft-firm-logo {
    background: var(--pft-bg-tertiary, #334155) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-firm-name {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-box {
    border-color: var(--pft-primary, #f59e0b) !important;
    background: transparent !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-score {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-star {
    color: var(--pft-primary, #f59e0b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-star.pft-empty {
    color: var(--pft-gray-400, #64748b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-reviews {
    color: var(--pft-primary, #f59e0b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-reviews .pft-info-icon {
    border-color: var(--pft-primary, #f59e0b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-reviews .pft-info-icon::after {
    color: var(--pft-primary, #f59e0b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-info {
    background: var(--pft-primary, #f59e0b) !important;
    color: #000 !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-tooltip {
    background: var(--pft-gray-100, #1e293b) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-tooltip::after {
    border-top-color: var(--pft-gray-100, #1e293b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-tooltip a {
    color: #60a5fa !important;
}

.pft-table-wrapper.pft-dark-mode .pft-rating-tooltip a:hover {
    color: #93c5fd !important;
}

/* ========================================
   COMPONENT OVERRIDES - COUNTRY & ASSETS
   ======================================== */

.pft-table-wrapper.pft-dark-mode .pft-country-info span {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-asset-chip {
    background: var(--pft-bg-tertiary, #334155) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-info-value {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-boolean-value.pft-yes {
    color: #4ade80 !important;
}

.pft-table-wrapper.pft-dark-mode .pft-boolean-value.pft-no {
    color: var(--pft-gray-400, #64748b) !important;
}

/* ========================================
   COMPONENT OVERRIDES - BUTTONS
   ======================================== */

.pft-table-wrapper.pft-dark-mode .pft-btn-primary {
    background: var(--pft-primary, #f59e0b) !important;
    color: #000 !important;
}

.pft-table-wrapper.pft-dark-mode .pft-btn-primary:hover {
    background: var(--pft-primary-hover, #d97706) !important;
    color: #000 !important;
}

/* ========================================
   COMPONENT OVERRIDES - INFO ICONS & TOOLTIPS
   ======================================== */

.pft-table-wrapper.pft-dark-mode .pft-info-icon {
    border-color: var(--pft-gray-400, #64748b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-info-icon::after {
    color: var(--pft-gray-400, #64748b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-info-icon:hover {
    background: var(--pft-bg-tertiary, #334155) !important;
    border-color: var(--pft-text-secondary, #cbd5e1) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-info-icon:hover::after {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-tooltip {
    background: var(--pft-bg-primary, #1e293b) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid var(--pft-border-light, #334155) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-tooltip::after {
    border-bottom-color: var(--pft-bg-primary, #1e293b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-tooltip a {
    color: #60a5fa !important;
}

.pft-table-wrapper.pft-dark-mode .pft-tooltip a:hover {
    color: #93c5fd !important;
}

/* ========================================
   COMPONENT OVERRIDES - SORT ICONS
   ======================================== */

.pft-table-wrapper.pft-dark-mode .pft-sort-icon {
    border-bottom-color: var(--pft-gray-400, #64748b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-table-header > div[data-sort].pft-sort-asc .pft-sort-icon {
    border-bottom-color: var(--pft-primary, #f59e0b) !important;
}

.pft-table-wrapper.pft-dark-mode .pft-table-header > div[data-sort].pft-sort-desc .pft-sort-icon {
    border-top-color: var(--pft-primary, #f59e0b) !important;
}

/* ========================================
   COMPONENT OVERRIDES - PAGINATION
   ======================================== */

.pft-wrapper.pft-dark-mode .pft-pagination {
    background: transparent !important;
}

.pft-wrapper.pft-dark-mode .pft-pagination-btn {
    background: var(--pft-bg-primary, #1e293b) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
    border-color: var(--pft-border-light, #334155) !important;
}

.pft-wrapper.pft-dark-mode .pft-pagination-btn:hover {
    background: var(--pft-bg-tertiary, #334155) !important;
    border-color: var(--pft-primary, #f59e0b) !important;
}

.pft-wrapper.pft-dark-mode .pft-pagination-btn.pft-active {
    background: var(--pft-primary, #f59e0b) !important;
    border-color: var(--pft-primary, #f59e0b) !important;
    color: #000 !important;
}

.pft-wrapper.pft-dark-mode .pft-pagination-dots {
    color: var(--pft-text-tertiary, #94a3b8) !important;
}

/* ========================================
   MOBILE FILTERS POPUP
   ======================================== */

.pft-mobile-filters-popup.pft-dark-mode {
    background: var(--pft-bg-primary, #1e293b) !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-mobile-filters-header {
    border-bottom-color: var(--pft-border-light, #334155) !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-mobile-filters-header h3 {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-mobile-filters-close {
    color: var(--pft-text-secondary, #cbd5e1) !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-filter-section h4 {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-filter-btn {
    background: var(--pft-bg-tertiary, #334155) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-filter-btn.pft-active {
    background: var(--pft-primary, #f59e0b) !important;
    color: #000 !important;
}

.pft-mobile-filters-popup.pft-dark-mode .pft-filter-checkbox {
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-mobile-filters-btn.pft-dark-mode {
    background: var(--pft-bg-tertiary, #334155) !important;
    color: var(--pft-text-primary, #f8fafc) !important;
}

.pft-mobile-filters-btn.pft-dark-mode:hover {
    background: var(--pft-gray-300, #475569) !important;
}

/* ========================================
   MOBILE RESPONSIVE - Dark Theme
   ======================================== */

@media (max-width: 1024px) {
    .pft-wrapper.pft-dark-mode {
        background: var(--pft-bg-secondary, #0f172a) !important;
    }
}

@media (max-width: 768px) {
    .pft-header.pft-dark-mode {
        background: var(--pft-bg-primary, #1e293b) !important;
    }
    
    .pft-table-wrapper.pft-dark-mode {
        box-shadow: none !important;
    }
    
    .pft-table-wrapper.pft-dark-mode .pft-table-header > div {
        background: var(--pft-bg-secondary, #0f172a) !important;
    }
    
    .pft-table-wrapper.pft-dark-mode .pft-row > div {
        background: var(--pft-bg-primary, #1e293b) !important;
    }
    
    .pft-table-wrapper.pft-dark-mode .pft-row:hover > * {
        background: var(--pft-bg-tertiary, #334155) !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Force dark mode styling on specific elements when needed */
[data-pft-theme="dark"] .pft-wrapper,
[data-pft-theme="dark"] .pft-table-wrapper,
[data-pft-theme="dark"] .pft-sidebar,
[data-pft-theme="dark"] .pft-header {
    /* Inherit all dark mode styles when data attribute is present */
}
