/* Extracted from src/marketmonitor/assets/css/monitor.css */
/* Reset & Normalize */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Root Variables - Light Theme */
:root {
    /* Color System */
    --color-primary-50: #e3f2fd;
    --color-primary-100: #bbdefb;
    --color-primary-500: #2196f3;
    --color-primary-600: #1e88e5;
    --color-primary-700: #0d6efd;
    
    --color-success-50: #e8f5e9;
    --color-success-500: #4caf50;
    --color-success-600: #198754;
    
    --color-danger-50: #ffebee;
    --color-danger-500: #f44336;
    --color-danger-600: #dc3545;
    
    --color-warning-50: #fff8e1;
    --color-warning-500: #ffc107;
    --color-warning-600: #ffb300;
    
    --color-info-50: #e0f7fa;
    --color-info-500: #00bcd4;
    --color-info-600: #0dcaf0;
    
    --color-neutral-50: #f8f9fa;
    --color-neutral-100: #f1f3f5;
    --color-neutral-200: #e9ecef;
    --color-neutral-300: #dee2e6;
    --color-neutral-400: #ced4da;
    --color-neutral-500: #adb5bd;
    --color-neutral-600: #868e96;
    --color-neutral-700: #495057;
    --color-neutral-800: #343a40;
    --color-neutral-900: #212529;

    /* Theme Colors */
    --color-background: var(--color-neutral-50);
    --color-surface: #ffffff;
    --color-text-primary: var(--color-neutral-900);
    --color-text-secondary: var(--color-neutral-700);
    --color-text-muted: var(--color-neutral-600);
    --color-border: var(--color-neutral-200);

    /* Market Colors */
    --color-price-up: #02c076;
    --color-price-down: #f6465d;
    --color-price-neutral: #5b6178;
    --color-volume-high: #2196f3;
    --color-volume-low: #ff9800;

    /* Elevation & Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Animation Timing */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout & Spacing */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 1rem;     /* 16px */
    --space-4: 1.5rem;   /* 24px */
    --space-5: 2rem;     /* 32px */
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Typography */
    --font-family-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: "Roboto Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-overlay: 1070;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --color-background: #121212;
    --color-surface: #1e2026;
    --color-text-primary: #ffffff;
    --color-text-secondary: #d1d4dc;
    --color-text-muted: #a0a7b5;
    --color-border: rgba(255, 255, 255, 0.1);
    
    --color-price-up: #00f9a9;
    --color-price-down: #ff4d6d;
    --color-price-neutral: #7b89a8;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Base Styles */
body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-family-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Components */
.market-dashboard {
    min-height: 100vh;
    padding: var(--space-3);
    background-color: var(--color-background);
    transition: background-color var(--transition-normal);
}

/* Market Stat Card Component */
.market-stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    height: 100%;
    overflow: hidden;
}

.market-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.market-stat-card__body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.market-stat-card__title {
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.market-stat-card__subtitle {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.market-stat-card__value {
    font-family: var(--font-family-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-600);
}

/* Market Health Indicator */
.health-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background-color: rgba(var(--color-primary-500), 0.1);
}

.health-indicator__score {
    font-family: var(--font-family-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary-600);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background-color: rgba(var(--color-neutral-500), 0.1);
}

.status-indicator__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator__dot--active {
    background-color: var(--color-success-500);
    box-shadow: 0 0 10px var(--color-success-500);
    animation: pulse 2s infinite;
}

.status-indicator__dot--stale {
    background-color: var(--color-warning-500);
    box-shadow: 0 0 10px var(--color-warning-500);
}

/* Price Changes */
.change-percent {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-family-mono);
    font-weight: 500;
}

.change-percent--positive {
    color: var(--color-price-up);
    background-color: rgba(2, 192, 118, 0.1);
}

.change-percent--negative {
    color: var(--color-price-down);
    background-color: rgba(246, 70, 93, 0.1);
}

/* DataTable Styling */
.crypto-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.crypto-table th {
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    font-weight: 600;
    padding: var(--space-3);
    text-align: left;
    border-bottom: 2px solid var(--color-border);
}

.crypto-table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-neutral-200);
    border-top-color: var(--color-primary-600);
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

/* Animations */
@keyframes spinner {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:focus-visible {
    outline: 2px solid var(--color-primary-600);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .market-dashboard {
        padding: var(--space-2);
    }
}

@media (max-width: 768px) {
    .market-stat-card__body {
        padding: var(--space-3);
    }
    
    .crypto-table {
        font-size: 0.875rem;
    }
    
    .change-percent {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .market-dashboard {
        padding: var(--space-1);
    }
    
    .crypto-table {
        font-size: 0.75rem;
    }
    
    .market-stat-card__title {
        font-size: 1rem;
    }
    
    .market-stat-card__value {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .market-dashboard {
        padding: 0;
        background: none;
    }
    
    .market-stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .loading-overlay {
        display: none;
    }
}

.csx-supply-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    line-height: 1.1;
    min-width: 120px;
    max-width: 120px;
    margin-left: auto;
    gap: 2px; /* NIEUW */
}

.csx-supply-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.22);
    margin: 4px 0;
}

.csx-supply-circ {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.1;
    width: 100%;
    text-align: right;
    white-space: nowrap;
}

.csx-supply-max {
    font-size: 11px;
    opacity: 0.72;
    margin-top: 0;
    padding-top: 0;
    width: 100%;
    display: block;
    text-align: right;
    line-height: 1.1;
    white-space: nowrap;
}

.csx-supply-pct {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
    width: 100%;
    text-align: right;
    line-height: 1;
    white-space: nowrap;
}
