/* Prop Firms Display - Dark Theme v3.8.2
 * Cookie-based theme detection for Blocksy
 * Works with .pfd-dark-mode class managed by JavaScript and PHP
 */

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

.pfd-container.pfd-dark-mode {
    /* Gold colors - UNCHANGED */
    --pfd-primary: #f59e0b !important;
    --pfd-primary-hover: #d97706 !important;
    --pfd-primary-light: #78350f !important;
    
    /* Semantic colors */
    --pfd-success: #10b981 !important;
    --pfd-success-light: #064e3b !important;
    --pfd-danger: #ef4444 !important;
    --pfd-danger-light: #7f1d1d !important;
    
    /* Inverted grays */
    --pfd-gray-50: #0f172a !important;
    --pfd-gray-100: #1e293b !important;
    --pfd-gray-200: #334155 !important;
    --pfd-gray-300: #475569 !important;
    --pfd-gray-400: #64748b !important;
    --pfd-gray-500: #94a3b8 !important;
    --pfd-gray-600: #cbd5e1 !important;
    --pfd-gray-700: #e2e8f0 !important;
    --pfd-gray-800: #f1f5f9 !important;
    --pfd-gray-900: #f8fafc !important;
    
    /* Inverted text */
    --pfd-text-primary: #f8fafc !important;
    --pfd-text-secondary: #cbd5e1 !important;
    --pfd-text-tertiary: #94a3b8 !important;
    --pfd-text-light: #64748b !important;
    
    /* Inverted backgrounds */
    --pfd-bg-primary: #1e293b !important;
    --pfd-bg-secondary: #0f172a !important;
    --pfd-bg-tertiary: #334155 !important;
    
    /* Inverted borders */
    --pfd-border-light: #334155 !important;
    --pfd-border-medium: #475569 !important;
    
    /* Enhanced shadows for dark backgrounds */
    --pfd-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3) !important;
    --pfd-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3) !important;
    --pfd-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4) !important;
    --pfd-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
   Direct styling for better specificity
   ======================================== */

/* All these styles only apply when .pfd-dark-mode is present */

.pfd-container.pfd-dark-mode .pfd-firm-header {
    background: var(--pfd-bg-primary) !important;
    border-color: var(--pfd-border-light) !important;
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-firm-name,
.pfd-container.pfd-dark-mode .pfd-breadcrumb-current {
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-breadcrumb-link {
    color: var(--pfd-text-secondary) !important;
}

.pfd-container.pfd-dark-mode .pfd-breadcrumb-separator {
    color: var(--pfd-text-tertiary) !important;
}

.pfd-container.pfd-dark-mode .pfd-logo {
    background: var(--pfd-bg-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-meta-item {
    background: var(--pfd-bg-tertiary) !important;
    border-color: var(--pfd-border-light) !important;
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-rating-compact {
    background: var(--pfd-bg-primary) !important;
    border-color: var(--pfd-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-rating-number {
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-tabs-container {
    background: var(--pfd-bg-primary) !important;
    border-color: var(--pfd-border-light) !important;
}

.pfd-container.pfd-dark-mode .pfd-tabs-nav {
    background: var(--pfd-bg-secondary) !important;
    border-color: var(--pfd-border-light) !important;
}

.pfd-container.pfd-dark-mode .pfd-tab-button {
    color: var(--pfd-text-secondary) !important;
}

.pfd-container.pfd-dark-mode .pfd-tab-button:hover {
    background: var(--pfd-bg-tertiary) !important;
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-tab-button.active {
    background: var(--pfd-bg-primary) !important;
    color: var(--pfd-primary) !important;
    border-color: var(--pfd-border-light) !important;
}

.pfd-container.pfd-dark-mode .pfd-info-card {
    background: var(--pfd-bg-secondary) !important;
    border-color: var(--pfd-border-light) !important;
}

.pfd-container.pfd-dark-mode .pfd-info-label {
    color: var(--pfd-text-secondary) !important;
}

.pfd-container.pfd-dark-mode .pfd-info-value {
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-table-header {
    background: var(--pfd-bg-tertiary) !important;
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-challenge-row {
    background: var(--pfd-bg-primary) !important;
    border-color: var(--pfd-border-light) !important;
}

.pfd-container.pfd-dark-mode .pfd-challenge-row:hover {
    background: var(--pfd-bg-tertiary) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-table-wrapper {
    background: var(--pfd-bg-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-table-header {
    background: var(--pfd-bg-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-table-header > div {
    background: var(--pfd-bg-primary) !important;
    color: var(--pfd-text-primary) !important;
    border-color: var(--pfd-border-light) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-challenge-row:hover > * {
    background: var(--pfd-bg-tertiary) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-challenge-row > div {
    border-color: var(--pfd-border-light) !important;
    background: var(--pfd-bg-primary) !important;
}

/* Prices - Keep Green */
.pfd-container.pfd-dark-mode .pfd-price-value,
.pfd-container.pfd-dark-mode .pfd-eprice-value {
    color: #10b981 !important;
}

.pfd-container.pfd-dark-mode .pfd-old-price,
.pfd-container.pfd-dark-mode .pfd-eold-price {
    color: var(--pfd-text-secondary) !important;
}

.pfd-container.pfd-dark-mode .pfd-einfo-value {
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-eprofit-bar-container {
    background: var(--pfd-gray-300) !important;
}

.pfd-container.pfd-dark-mode .pfd-eprofit-bar {
    background: var(--pfd-primary) !important;
}

/* Buttons - Keep Gold */
.pfd-container.pfd-dark-mode .pfd-btn-primary,
.pfd-container.pfd-dark-mode .pfd-ebtn-primary,
.pfd-container.pfd-dark-mode .pfd-cta-button {
    background: var(--pfd-primary) !important;
    color: #000 !important;
}

.pfd-container.pfd-dark-mode .pfd-btn-primary:hover,
.pfd-container.pfd-dark-mode .pfd-ebtn-primary:hover,
.pfd-container.pfd-dark-mode .pfd-cta-button:hover {
    background: var(--pfd-primary-hover) !important;
    color: #000 !important;
}

.pfd-container.pfd-dark-mode .pfd-ebtn-disabled {
    background: var(--pfd-gray-300) !important;
    color: var(--pfd-gray-500) !important;
}

.pfd-container.pfd-dark-mode .pfd-ecol-actions {
    background: var(--pfd-bg-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-challenge-row:hover .pfd-ecol-actions {
    background: var(--pfd-bg-tertiary) !important;
}

.pfd-container.pfd-dark-mode .pfd-badge-success {
    background: var(--pfd-success-light) !important;
    color: #6ee7b7 !important;
}

.pfd-container.pfd-dark-mode .pfd-promo-banner {
    background: linear-gradient(135deg, var(--pfd-bg-primary) 0%, var(--pfd-bg-tertiary) 100%) !important;
    border-color: var(--pfd-border-medium) !important;
}

.pfd-container.pfd-dark-mode .pfd-promo-tag {
    background: var(--pfd-primary) !important;
    color: #000 !important;
}

.pfd-container.pfd-dark-mode .pfd-promo-title {
    color: var(--pfd-text-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-promo-description {
    color: var(--pfd-gray-600) !important; /* Brighter gray for better readability (#cbd5e1) */
}

.pfd-container.pfd-dark-mode .pfd-challenges-note {
    background: var(--pfd-primary-light) !important;
    border-color: var(--pfd-primary) !important;
}

.pfd-container.pfd-dark-mode .pfd-challenges-note p {
    color: #fcd34d !important;
}

.pfd-container.pfd-dark-mode .pfd-error {
    background: var(--pfd-danger-light) !important;
    color: #fca5a5 !important;
    border-color: var(--pfd-danger) !important;
}

/* Country Tags (Restricted Countries) - Brighter text in dark mode */
.pfd-container.pfd-dark-mode .pfd-country-tag {
    background: var(--pfd-danger-light) !important;
    color: #fca5a5 !important; /* Bright red-pink for better visibility */
}

.pfd-container.pfd-dark-mode .pfd-country-tag:hover {
    background: #991b1b !important;
    color: #fecaca !important;
}

.pfd-container.pfd-dark-mode .pfd-country-name {
    color: #fca5a5 !important;
}

/* Leverage Badge (Assets tab) - Bright yellow text for readability on dark amber background */
.pfd-container.pfd-dark-mode .pfd-leverage-badge {
    background: var(--pfd-primary-light) !important;
    color: #fde68a !important; /* Bright yellow (amber-200) for excellent contrast */
}

/* Enhanced Table Header - Same style as Assets table */
.pfd-container.pfd-dark-mode .pfd-enhanced-table-header {
    background: var(--pfd-bg-secondary) !important;
}

.pfd-container.pfd-dark-mode .pfd-enhanced-table-header > div {
    background: var(--pfd-bg-secondary) !important;
    color: var(--pfd-text-primary) !important;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .pfd-container.pfd-dark-mode .pfd-table-header {
        background: var(--pfd-bg-tertiary) !important;
    }
    
    .pfd-container.pfd-dark-mode .pfd-table-header .pfd-col-actions {
        background: var(--pfd-bg-tertiary) !important;
    }
    
    .pfd-container.pfd-dark-mode .pfd-challenge-row {
        background: var(--pfd-bg-primary) !important;
    }
    
    .pfd-container.pfd-dark-mode .pfd-challenge-row .pfd-col-actions {
        background: var(--pfd-bg-primary) !important;
    }
}
