/**
 * DataJam Pulse - Component Styles
 * Phase 5 - CSS Extraction (Batch 4)
 * Extracted: Dec 15, 2025
 * Source: index.html lines 756-1185, 1890-2106
 * Version: v5.4.10
 */

/* === SPINNER, SKELETON, MODALS === */
        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .spinner {
            width: 52px;
            height: 52px;
            border: 4px solid #2d3748;
            border-top: 4px solid #E62F6E;
            border-radius: 50%;
            margin: 0 auto 28px;
            animation: spin 1s linear infinite;
        }

        /* Progress Bar */
        .progress-container {
            width: 100%;
            max-width: 300px;
            margin: 20px auto;
            background: var(--bg-secondary);
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--border-color);
        }

        .progress-bar {
            height: 8px;
            background: linear-gradient(90deg, #E62F6E, #E94B52);
            border-radius: 8px;
            transition: width 0.3s ease;
            width: 0%;
        }

        .progress-text {
            font-size: 13px;
            color: var(--text-secondary);
            margin-top: 8px;
            font-weight: 500;
        }

        /* Skeleton Loading States */
        @keyframes shimmer {
            0% { background-position: -468px 0; }
            100% { background-position: 468px 0; }
        }

        /* Micro-animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .fade-in-up {
            animation: fadeInUp 0.6s ease-out forwards;
        }

        .fade-in {
            animation: fadeIn 0.4s ease-out forwards;
        }

        .skeleton-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 20px;
            animation: pulse 1.5s ease-in-out infinite;
        }

        .skeleton-badge {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        .skeleton-text {
            height: 16px;
            background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
            background-size: 200% 100%;
            border-radius: 4px;
            animation: shimmer 1.5s infinite;
        }

        .skeleton-bar {
            height: 12px;
            background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
            background-size: 200% 100%;
            border-radius: 6px;
            animation: shimmer 1.5s infinite;
        }

        .device-item {
            padding: 16px;
            background: #2d3748;
            border-radius: 10px;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid transparent;
            transition: all 0.3s;
        }

        .device-item:hover {
            border-color: #E62F6E;
        }

        .device-item-info {
            flex: 1;
        }

        .device-item-name {
            font-size: 15px;
            font-weight: 500;
            color: #FEFAF9;
            margin-bottom: 4px;
        }

        .device-item-id {
            font-size: 12px;
            color: #718096;
        }

        .btn-remove {
            padding: 8px 16px;
            background: rgba(230, 47, 110, 0.2);
            border: 1px solid #E62F6E;
            border-radius: 8px;
            color: #E62F6E;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-remove:hover {
            background: #E62F6E;
            color: #FEFAF9;
        }

        /* .sidebar-overlay and mobile responsive rules moved to css/layout.css (v5.4.1) */

        /* Comprehensive Mobile Optimization */
        @media (max-width: 768px) {
            /* Improve touch targets (WCAG 2.1 Level AA: minimum 44x44px) */
            .btn, .sidebar-btn, .report-btn {
                min-height: 48px;
                padding: 16px 18px;
                -webkit-tap-highlight-color: rgba(230, 47, 110, 0.2); /* iOS tap highlight */
            }

            input, select {
                min-height: 48px;
                font-size: 16px; /* Prevents iOS zoom on focus */
            }

            /* Better readable font sizes on mobile */
            body {
                font-size: 16px; /* Prevents iOS auto-zoom on input focus */
            }

            h1, .h1 {
                font-size: clamp(24px, 6vw, 32px);
            }

            h2, .h2 {
                font-size: clamp(20px, 5vw, 28px);
            }

            h3, .h3 {
                font-size: clamp(16px, 4vw, 20px);
            }

            /* Better chart sizing on mobile */
            .chart-container {
                min-height: 300px !important;
                max-height: 400px !important;
                padding-bottom: 50px !important; /* Extra space for axis labels on mobile */
                overflow: visible !important;
            }

            /* Increase body text line-height for mobile readability */
            p, li {
                line-height: 1.7;
            }

            /* Ensure adequate padding on mobile */
            .login-box, .settings-box {
                padding: 28px 20px;
            }
        }

        /* Small phones (iPhone SE, etc.) */
        @media (max-width: 375px) {
            h1, .h1 {
                font-size: 22px;
                letter-spacing: 0.01em;
            }

            h2, .h2 {
                font-size: 18px;
            }

            .btn {
                font-size: 15px;
                padding: 14px 16px;
            }
        }

        /* Debug info box */
        .debug-box {
            background: #1a1c24;
            border: 1px solid #2d3748;
            border-radius: 12px;
            padding: 20px;
            margin-top: 20px;
            font-size: 12px;
            font-family: monospace;
        }

        .debug-box h4 {
            color: #E62F6E;
            margin-bottom: 12px;
            font-size: 14px;
        }

        .debug-section {
            margin-bottom: 16px;
        }

        .debug-label {
            color: #718096;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .debug-value {
            color: #15E0BC;
            background: #2d3748;
            padding: 8px;
            border-radius: 6px;
            overflow-x: auto;
        }

        /* Report Cards */
        .stat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 24px;
            margin-bottom: 36px;
        }

        .stat-card {
            background: var(--bg-secondary);
            border: 1px solid var(--bg-tertiary);
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(230, 47, 110, 0.12);
            transition: all 0.3s, background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
        }

        .stat-card:hover {
            border-color: #E62F6E;
            transform: translateY(-4px) scale(1.02);
            box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 12px 32px rgba(230, 47, 110, 0.2);
        }

        .stat-label {
            font-size: 12px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
            transition: color 0.3s ease;
        }

        .stat-value {
            font-size: 36px;
            font-weight: 500;
            color: #FEFAF9;
            margin-bottom: 8px;
        }

        .stat-change {
            font-size: 13px;
            color: #15E0BC;
        }

        .stat-change.negative {
            color: #E62F6E;
        }

        .chart-container {
            background: var(--bg-secondary);
            border: 1px solid var(--bg-tertiary);
            border-radius: 12px;
            padding: 24px;
            padding-bottom: 40px; /* Extra space for rotated x-axis labels */
            margin-bottom: 24px;
            position: relative;
            height: 420px; /* Increased to accommodate axis labels */
            overflow: visible; /* Allow labels to extend if needed */
            transition: background 0.3s ease, border 0.3s ease;
        }

        .chart-title {
            font-size: 18px;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 20px;
            transition: color 0.3s ease;
        }

        /* Context Tags (v2.4.8 - Guru P0) */
        .context-tags {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }

        .context-tag {
            background: rgba(102, 126, 234, 0.1);
            border: 1px solid rgba(102, 126, 234, 0.3);
            color: #667eea;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            transition: all 0.2s ease;
        }

        .context-tag.tag-retail {
            background: rgba(102, 126, 234, 0.1);
            border-color: rgba(102, 126, 234, 0.3);
            color: #667eea;
        }

        .context-tag.tag-event {
            background: rgba(233, 75, 82, 0.1);
            border-color: rgba(233, 75, 82, 0.3);
            color: #E94B52;
        }

        .context-tag.tag-matched {
            background: rgba(16, 185, 129, 0.1);
            border-color: rgba(16, 185, 129, 0.3);
            color: #10B981;
        }

        .context-tag.tag-premium {
            background: rgba(245, 158, 11, 0.1);
            border-color: rgba(245, 158, 11, 0.3);
            color: #F59E0B;
        }

        .insights-box {
            background: var(--bg-secondary);
            border: 1px solid var(--bg-tertiary);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 24px;
            transition: background 0.3s ease, border 0.3s ease;
        }

        .insight-item {
            display: flex;
            gap: 12px;
            padding: 16px;
            background: #2d3748;
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .insight-icon {
            font-size: 24px;
            flex-shrink: 0;
        }

        .insight-content {
            flex: 1;
        }

        .insight-title {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 4px;
            transition: color 0.3s ease;
        }

        .insight-description {
            font-size: 13px;
            color: var(--text-muted);
            line-height: 1.5;
            transition: color 0.3s ease;
        }

        .micro-insight-card {
            display: flex;
            align-items: center;
            padding: 16px;
            background: var(--bg-secondary);
            border: 1px solid var(--bg-tertiary);
            border-radius: 12px;
            transition: all 0.3s ease;
            min-height: 70px;
        }

        .micro-insight-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow-color);
            border-color: #E62F6E;
        }


/* === OVERFLOW MENU, ACTION DROPDOWN, DATA SOURCE LABELS === */
        /* =============================================
           OVERFLOW MENU (v3.2.5)
           Added: December 6, 2025
           Moves secondary controls into dropdown
           ============================================= */
        .overflow-menu-container {
            position: relative;
            display: inline-block;
        }

        .overflow-menu-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            padding: 10px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Poppins', sans-serif;
            font-size: 18px;
            font-weight: 600;
            transition: all 0.3s;
            min-width: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .overflow-menu-btn:hover {
            background: var(--primary-pink);
            border-color: var(--primary-pink);
        }

        .overflow-menu-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            min-width: 220px;
            z-index: 100;
            overflow: hidden;
        }

        .overflow-menu-dropdown.show {
            display: block;
            animation: fadeInDown 0.2s ease;
        }

        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .overflow-menu-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 18px;
            color: var(--text-primary);
            font-size: 14px;
            cursor: pointer;
            transition: background 0.2s;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            font-family: 'Poppins', sans-serif;
        }

        .overflow-menu-item:hover {
            background: rgba(230, 47, 110, 0.15);
        }

        .overflow-menu-item.active {
            background: rgba(230, 47, 110, 0.2);
            color: var(--primary-pink);
        }

        .overflow-menu-item .icon {
            font-size: 16px;
            width: 20px;
            text-align: center;
        }

        .overflow-menu-divider {
            height: 1px;
            background: var(--border-color);
            margin: 4px 0;
        }

        /* =============================================
           ACTION DROPDOWN (v4.0.4)
           Share and More dropdowns in report header
           ============================================= */
        .action-dropdown-container {
            position: relative;
            display: inline-block;
        }

        .action-dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            min-width: 180px;
            z-index: 100;
            overflow: hidden;
        }

        .action-dropdown-menu.hidden {
            display: none;
        }

        .action-dropdown-menu.show {
            display: block;
            animation: fadeInDown 0.2s ease;
        }

        .action-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            color: var(--text-primary);
            font-size: 14px;
            cursor: pointer;
            transition: background 0.2s;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            font-family: 'Poppins', sans-serif;
        }

        .action-dropdown-item:hover {
            background: rgba(230, 47, 110, 0.15);
        }

        .action-dropdown-item.active {
            background: rgba(230, 47, 110, 0.2);
            color: var(--primary-pink);
        }

        .action-dropdown-item span {
            font-size: 16px;
            width: 20px;
            text-align: center;
        }

        .action-dropdown-divider {
            height: 1px;
            background: var(--border-color);
            margin: 4px 0;
        }

        /* =============================================
           DATA SOURCE LABELS (v3.2.5)
           Trust badges showing where insights come from
           ============================================= */
        .data-source-label {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .data-source-label.jambox {
            background: rgba(230, 47, 110, 0.15);
            color: #E62F6E;
            border: 1px solid rgba(230, 47, 110, 0.3);
        }

        .data-source-label.weather {
            background: rgba(59, 130, 246, 0.15);
            color: #3B82F6;
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        .data-source-label.prediction {
            background: rgba(139, 92, 246, 0.15);
            color: #8B5CF6;
            border: 1px solid rgba(139, 92, 246, 0.3);
        }

        .data-source-label.context {
            background: rgba(16, 185, 129, 0.15);
            color: #10B981;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .data-source-label.census {
            background: rgba(245, 158, 11, 0.15);
            color: #F59E0B;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .card-source-row {
            display: flex;
            justify-content: flex-end;
            margin-top: 12px;
            padding-top: 8px;
            border-top: 1px solid var(--border-color);
        }

