/* ===================================================================
 * styles-dark-mode-icons.css
 * Purpose: Dark-mode icon and stats text colour overrides
 * Extracted from styles.css during the Apr 2026 split (task #23).
 * =================================================================== */
/* COMPREHENSIVE DARK MODE TEXT FIX FOR SUBSCRIPTION CARDS */
[data-theme="dark"] .subscription-card .card-body,
[data-theme="dark"] .subscription-card .card-body *,
[data-theme="dark"] .subscription-card .card-body li,
[data-theme="dark"] .subscription-card .card-body span,
[data-theme="dark"] .subscription-card .card-body strong,
[data-theme="dark"] .subscription-card .card-body p,
[data-theme="dark"] .subscription-card .card-body div,
[data-theme="dark"] .subscription-card .card-body ul,
[data-theme="dark"] .subscription-card .card-body ul li,
[data-theme="dark"] .subscription-card .list-unstyled,
[data-theme="dark"] .subscription-card .list-unstyled li,
[data-theme="dark"] .subscription-card .list-unstyled li span,
[data-theme="dark"] .subscription-card .list-unstyled li strong {
    color: #ffffff !important;
}

/* Storage section text fix for dark mode */
[data-theme="dark"] .storage-upgrade-section .card-body,
[data-theme="dark"] .storage-upgrade-section .card-body *,
[data-theme="dark"] .storage-option-card,
[data-theme="dark"] .storage-option-card *,
[data-theme="dark"] .storage-section,
[data-theme="dark"] .storage-section *,
[data-theme="dark"] .need-additional-storage-section,
[data-theme="dark"] .need-additional-storage-section * {
    color: #ffffff !important;
}

/* Override any inherited dark colors in dark mode */
[data-theme="dark"] .card-body:not(.subscription-header-basic):not(.subscription-header-premium):not(.subscription-header-enterprise) {
    color: #ffffff !important;
}

[data-theme="dark"] .card-body:not(.subscription-header-basic):not(.subscription-header-premium):not(.subscription-header-enterprise) * {
    color: #ffffff !important;
}

[data-theme="light"] .subscription-header-basic h6,
[data-theme="light"] .subscription-header-basic h4,
[data-theme="light"] .subscription-header-basic small {
    color: #000000 !important;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .subscription-header-premium h6,
[data-theme="light"] .subscription-header-premium h4,
[data-theme="light"] .subscription-header-premium small {
    color: #000000 !important;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .subscription-header-enterprise h6,
[data-theme="light"] .subscription-header-enterprise h4,
[data-theme="light"] .subscription-header-enterprise small {
    color: #000000 !important;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.stat-card {
    background: var(--darker-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Ensure stat card icons retain their colors and are vibrant in dark mode */
.stat-card .stats-icon {
    filter: none !important;
}

[data-theme="dark"] .stat-card .stats-icon {
    filter: none !important;
}

/* ULTIMATE ICON COLOR FIX FOR DARK MODE - Maximum specificity and coverage */

/* FORCE ALL ICON COLORS WITH MAXIMUM SPECIFICITY */
[data-theme="dark"] body .sortable-stat-container .stat-icon i,
[data-theme="dark"] body .overview-card .stat-icon i,
[data-theme="dark"] body .sortable-stat-container i,
[data-theme="dark"] body .overview-card i,
[data-theme="dark"] body [data-stat-id] i,
[data-theme="dark"] body [data-stat-id] .stat-icon i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container i,
[data-theme="dark"] html[data-theme="dark"] .overview-card i,
[data-theme="dark"] html[data-theme="dark"] [data-stat-id] i {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
}

/* SPECIFIC ICON COLORS WITH ULTRA HIGH SPECIFICITY */
[data-theme="dark"] body .sortable-stat-container[data-stat-id="tender-projects"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="tender-projects"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="tender-projects"] .bi-file-earmark-text,
[data-theme="dark"] .sortable-stat-container[data-stat-id="tender-projects"] i.bi-file-earmark-text,
[data-theme="dark"] [data-stat-id="tender-projects"] i.text-primary {
    color: #4FC3F7 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

[data-theme="dark"] body .sortable-stat-container[data-stat-id="production-projects"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="production-projects"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="production-projects"] .bi-building,
[data-theme="dark"] .sortable-stat-container[data-stat-id="production-projects"] i.bi-building,
[data-theme="dark"] [data-stat-id="production-projects"] i.text-primary {
    color: #66BB6A !important;
    filter: none !important;
    -webkit-filter: none !important;
}

[data-theme="dark"] body .sortable-stat-container[data-stat-id="tenders-value"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="tenders-value"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="tenders-value"] .bi-currency-dollar,
[data-theme="dark"] .sortable-stat-container[data-stat-id="tenders-value"] i.bi-currency-dollar,
[data-theme="dark"] [data-stat-id="tenders-value"] i.text-primary {
    color: #FFD54F !important;
    filter: none !important;
    -webkit-filter: none !important;
}

[data-theme="dark"] body .sortable-stat-container[data-stat-id="high-priority"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="high-priority"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="high-priority"] .bi-exclamation-triangle,
[data-theme="dark"] .sortable-stat-container[data-stat-id="high-priority"] i.bi-exclamation-triangle,
[data-theme="dark"] [data-stat-id="high-priority"] i.text-danger {
    color: #FF5722 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

[data-theme="dark"] body .sortable-stat-container[data-stat-id="medium-priority"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="medium-priority"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="medium-priority"] .bi-exclamation,
[data-theme="dark"] .sortable-stat-container[data-stat-id="medium-priority"] i.bi-exclamation,
[data-theme="dark"] [data-stat-id="medium-priority"] i.text-warning {
    color: #FF9800 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

[data-theme="dark"] body .sortable-stat-container[data-stat-id="low-priority"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="low-priority"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="low-priority"] .bi-arrow-down-circle,
[data-theme="dark"] .sortable-stat-container[data-stat-id="low-priority"] i.bi-arrow-down-circle,
[data-theme="dark"] [data-stat-id="low-priority"] i.text-info {
    color: #2196F3 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

[data-theme="dark"] body .sortable-stat-container[data-stat-id="production-value"] i,
[data-theme="dark"] html[data-theme="dark"] .sortable-stat-container[data-stat-id="production-value"] i,
[data-theme="dark"] .sortable-stat-container[data-stat-id="production-value"] .bi-currency-dollar,
[data-theme="dark"] .sortable-stat-container[data-stat-id="production-value"] i.bi-currency-dollar,
[data-theme="dark"] [data-stat-id="production-value"] i.text-success {
    color: #4CAF50 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* OVERRIDE ANY BOOTSTRAP TEXTCLASSES IN DARK MODE */
[data-theme="dark"] .text-primary,
[data-theme="dark"] .text-danger,
[data-theme="dark"] .text-warning,
[data-theme="dark"] .text-info,
[data-theme="dark"] .text-success {
    filter: none !important;
    -webkit-filter: none !important;
}

/* NUCLEAR OPTION: Override ALL icon styling in stats containers */
[data-theme="dark"] .sortable-stat-container i[class*="bi-"],
[data-theme="dark"] .overview-card i[class*="bi-"],
[data-theme="dark"] [data-stat-id] i[class*="bi-"] {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

/* GLOBAL ICON COLOR RESET FOR STATS */
[data-theme="dark"] .sortable-stat-container .bi-file-earmark-text { color: #4FC3F7 !important; }
[data-theme="dark"] .sortable-stat-container .bi-building { color: #66BB6A !important; }
[data-theme="dark"] .sortable-stat-container .bi-currency-dollar { color: #FFD54F !important; }
[data-theme="dark"] .sortable-stat-container .bi-exclamation-triangle { color: #FF5722 !important; }
[data-theme="dark"] .sortable-stat-container .bi-exclamation { color: #FF9800 !important; }
[data-theme="dark"] .sortable-stat-container .bi-arrow-down-circle { color: #2196F3 !important; }

/* Light mode - keep existing behavior but ensure colors are visible */
[data-theme="light"] [data-stat-id="tender-projects"] .stats-icon,
[data-theme="light"] [data-stat-id="tender-projects"] .bi-file-earmark-text {
    color: #1976D2 !important; /* Darker blue for light mode */
}

[data-theme="light"] [data-stat-id="production-projects"] .stats-icon,
[data-theme="light"] [data-stat-id="production-projects"] .bi-building {
    color: #388E3C !important; /* Darker green for light mode */
}

[data-theme="light"] [data-stat-id="tenders-value"] .stats-icon,
[data-theme="light"] [data-stat-id="tenders-value"] .bi-currency-dollar {
    color: #F57C00 !important; /* Darker yellow/orange for light mode */
}

[data-theme="light"] [data-stat-id="high-priority"] .stats-icon,
[data-theme="light"] [data-stat-id="high-priority"] .bi-exclamation-triangle {
    color: #D32F2F !important; /* Red for high priority in light mode */
}

[data-theme="light"] [data-stat-id="medium-priority"] .stats-icon,
[data-theme="light"] [data-stat-id="medium-priority"] .bi-exclamation {
    color: #F57C00 !important; /* Orange for medium priority in light mode */
}

[data-theme="light"] [data-stat-id="low-priority"] .stats-icon,
[data-theme="light"] [data-stat-id="low-priority"] .bi-arrow-down-circle {
    color: #1976D2 !important; /* Blue for low priority in light mode */
}

[data-theme="light"] [data-stat-id="production-value"] .stats-icon,
[data-theme="light"] [data-stat-id="production-value"] .bi-currency-dollar {
    color: #388E3C !important; /* Green for production value in light mode */
}

/* TEMPLATE-SPECIFIC ICON TARGETING - Based on actual HTML structure */
[data-theme="dark"] .stat-icon.me-2 i.bi-file-earmark-text.text-primary {
    color: #4FC3F7 !important;
}

[data-theme="dark"] .stat-icon.me-2 i.bi-building.text-primary {
    color: #66BB6A !important;
}

[data-theme="dark"] .stat-icon.me-2 i.bi-currency-dollar.text-primary {
    color: #FFD54F !important;
}

[data-theme="dark"] .stat-icon.me-2 i.bi-exclamation-triangle.text-danger {
    color: #FF5722 !important;
}

[data-theme="dark"] .stat-icon.me-2 i.bi-exclamation.text-warning {
    color: #FF9800 !important;
}

[data-theme="dark"] .stat-icon.me-2 i.bi-arrow-down-circle.text-info {
    color: #2196F3 !important;
}

[data-theme="dark"] .stat-icon.me-2 i.bi-currency-dollar.text-success {
    color: #4CAF50 !important;
}

/* FORCE OVERRIDE BOOTSTRAP COLOR CLASSES IN DARK MODE STATS */
[data-theme="dark"] .sortable-stat-container .text-primary,
[data-theme="dark"] .overview-card .text-primary {
    color: #4FC3F7 !important;
}

[data-theme="dark"] .sortable-stat-container .text-danger,
[data-theme="dark"] .overview-card .text-danger {
    color: #FF5722 !important;
}

[data-theme="dark"] .sortable-stat-container .text-warning,
[data-theme="dark"] .overview-card .text-warning {
    color: #FF9800 !important;
}

[data-theme="dark"] .sortable-stat-container .text-info,
[data-theme="dark"] .overview-card .text-info {
    color: #2196F3 !important;
}

[data-theme="dark"] .sortable-stat-container .text-success,
[data-theme="dark"] .overview-card .text-success {
    color: #4CAF50 !important;
}

