@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&display=swap');

:root {
    --blueteq-blue: #186FB5;
    --danger-red: #d40000;
    --success-green: rgb(22 163 74);
    /* Light mode colors (default) */
    --bg-primary: #F4F9FD;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-light: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --input-bg: #ffffff;
    --input-border: #e5e7eb;
    --hover-bg: #f3f4f6;
    --info-bg: #eff6ff;
    --info-color: #3b82f6;
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-light: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --input-bg: #334155;
    --input-border: #475569;
    --hover-bg: #475569;
    --bg-hover: #475569;
    --info-bg: rgba(59, 130, 246, 0.15);
    --info-color: #60a5fa;
}

/* High Contrast mode colors */
[data-theme="high-contrast"] {
    --blueteq-blue: #0066ff;
    --danger-red: #ff0000;
    --success-green: #00ff00;
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-tertiary: #ffffff;
    --border-color: #ffffff;
    --border-color-light: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 0 0 2px #ffffff;
    --shadow-md: 0 0 0 3px #ffffff;
    --shadow-lg: 0 0 0 4px #ffffff;
    --input-bg: #000000;
    --input-border: #ffffff;
    --hover-bg: #333333;
    --info-bg: #000000;
    --info-color: #ffffff;
}

    /* High contrast specific overrides for maximum readability */
    [data-theme="high-contrast"] * {
        font-weight: 600 !important;
    }

    [data-theme="high-contrast"] a {
        text-decoration: underline !important;
    }

    [data-theme="high-contrast"] button,
    [data-theme="high-contrast"] .btn-primary,
    [data-theme="high-contrast"] .btn-secondary {
        border: 3px solid #ffffff !important;
    }

    [data-theme="high-contrast"] input,
    [data-theme="high-contrast"] select,
    [data-theme="high-contrast"] textarea {
        border: 3px solid #ffffff !important;
    }

    [data-theme="high-contrast"] p,
    [data-theme="high-contrast"] span:not(.k-icon),
    [data-theme="high-contrast"] div:not([class*="k-"]) {
        color: #ffffff !important;
    }

    [data-theme="high-contrast"] h1,
    [data-theme="high-contrast"] h2,
    [data-theme="high-contrast"] h3,
    [data-theme="high-contrast"] h4,
    [data-theme="high-contrast"] h5,
    [data-theme="high-contrast"] h6 {
        color: #ffffff !important;
    }

*:not(i):not(span.k-icon):not(a.k-icon) {
    font-family: "Red Hat Display", serif !important;
}

/* Apply theme colors to body with smooth transitions */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html, body {
    overflow-x: hidden;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

p {
    margin: 0 !important;
    text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

#root, #__next {
    isolation: isolate;
}

.k-detail-row, .k-detail-cell {
    padding: 0 !important;
}

.text-white {
    color: #fff;
}

/* Help text styling */
.help-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--info-bg, #eff6ff);
    border-left: 3px solid var(--info-color, #3b82f6);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0.5rem;
    width: 100%;
}

    .help-card i {
        color: var(--info-color, #3b82f6);
        margin-top: 0.125rem;
        flex-shrink: 0;
    }

/* Help card size variants */
.help-card--sm {
    padding: 0.5rem;
    font-size: 0.75rem;
}

.help-card--md {
    padding: 0.75rem;
    font-size: 0.875rem;
}

.help-card--lg {
    padding: 1rem;
    font-size: 0.95rem;
}

/* Help card variants */
.help-card--warning {
    background-color: rgba(251, 191, 36, 0.08); /* amber-400-ish, soft */
    border-left-color: #f59e0b; /* amber-500 */
}

    .help-card--warning i {
        color: #f59e0b;
    }

.help-card--danger {
    background-color: rgba(239, 68, 68, 0.08); /* red-500-ish, soft */
    border-left-color: #ef4444; /* red-500 */
}

    .help-card--danger i {
        color: #ef4444;
    }

/* High Contrast specific overrides for help text */
[data-theme="high-contrast"] .help-card {
    border-left: 3px solid #ffffff !important;
    background-color: #000000 !important;
    border: 1px solid #ffffff;
    border-left-width: 4px;
}

    [data-theme="high-contrast"] .help-card i {
        color: #ffffff !important;
    }

/* ========================================
   Badge Styles
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* Badge Outline (default outline style) */
.badge-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

    .badge-outline:hover {
        border-color: var(--blueteq-blue);
        color: var(--blueteq-blue);
    }

/* Badge Success */
.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Badge Danger */
.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Badge Info */
.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Badge Warning */
.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: rgb(245, 158, 11);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-primary {
    background: var(--blueteq-blue);
    color: white;
    border: 1px solid rgba(24, 111, 181, 0.2);
}

/* Badge Secondary */
.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Kendo Badge Variants (for compatibility) */
.k-badge-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.k-badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.k-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.k-badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.k-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: rgb(245, 158, 11);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Dark Mode Badge Overrides */
[data-theme="dark"] .badge-outline,
[data-theme="dark"] .k-badge-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

    [data-theme="dark"] .badge-outline:hover,
    [data-theme="dark"] .k-badge-outline:hover {
        border-color: var(--blueteq-blue);
        color: var(--blueteq-blue);
    }

[data-theme="dark"] .badge-success,
[data-theme="dark"] .k-badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: rgb(74, 222, 128);
    border-color: rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .badge-danger,
[data-theme="dark"] .k-badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: rgb(248, 113, 113);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .badge-info,
[data-theme="dark"] .k-badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: rgb(96, 165, 250);
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .badge-warning,
[data-theme="dark"] .k-badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: rgb(251, 191, 36);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}

/* High Contrast Mode Badge Overrides */
[data-theme="high-contrast"] .badge,
[data-theme="high-contrast"] .k-badge-outline,
[data-theme="high-contrast"] .k-badge-success,
[data-theme="high-contrast"] .k-badge-danger,
[data-theme="high-contrast"] .k-badge-info,
[data-theme="high-contrast"] .k-badge-warning {
    border-width: 2px !important;
    font-weight: 700 !important;
}

[data-theme="high-contrast"] .badge-outline,
[data-theme="high-contrast"] .k-badge-outline {
    background: #000000 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

[data-theme="high-contrast"] .badge-success,
[data-theme="high-contrast"] .k-badge-success {
    background: #000000 !important;
    border-color: #00ff00 !important;
    color: #00ff00 !important;
}

[data-theme="high-contrast"] .badge-danger,
[data-theme="high-contrast"] .k-badge-danger {
    background: #000000 !important;
    border-color: #ff0000 !important;
    color: #ff0000 !important;
}

[data-theme="high-contrast"] .badge-info,
[data-theme="high-contrast"] .k-badge-info {
    background: #000000 !important;
    border-color: #0066ff !important;
    color: #0066ff !important;
}

[data-theme="high-contrast"] .badge-warning,
[data-theme="high-contrast"] .k-badge-warning {
    background: #000000 !important;
    border-color: #ffff00 !important;
    color: #ffff00 !important;
}

[data-theme="high-contrast"] .badge-secondary {
    background: #000000 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

[data-theme="dark"] .badge-primary {
    background: rgba(24, 111, 181, 0.2);
    color: var(--blueteq-blue);
    border-color: rgba(24, 111, 181, 0.3);
}

.k-tabstrip-content.k-content.k-active:focus,
.k-tabstrip-content.k-content.k-active {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

    .k-tabstrip-content.k-content.k-active:focus:not(:focus-visible) {
        outline: none;
        box-shadow: none;
    }

::-webkit-scrollbar {
    width: 8px;
    height: 8px; 
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.28);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(15, 23, 42, 0.45);
    }

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}


[data-theme="dark"] {
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

    [data-theme="dark"] ::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
    }

        [data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.48);
        }

[data-theme="high-contrast"] {
    scrollbar-color: #ffffff #000000; 
}

    [data-theme="high-contrast"] ::-webkit-scrollbar-thumb {
        background: #ffffff;
        border: 1px solid #000000;
        border-radius: 0;
    }