.highlight-green {
    background: rgba(50, 205, 50, 0.5); /* Softer, more green and less yellow */
}

.highlight-lightred {
    background: rgba(240, 128, 128, 0.5); /* Light red with transparency */
}

.highlight-lightblue {
    background: rgba(173, 216, 230, 0.5); /* Light blue with transparency */
}

.highlight-lightyellow {
    background: rgba(255, 255, 224, 0.5); /* Light yellow with transparency */
}

.highlight-lightpurple {
    background: rgba(216, 191, 216, 0.5); /* Light purple with transparency */
}

.highlight-lightorange {
    background: rgba(255, 160, 122, 0.5); /* Light orange with transparency */
}

.repair:before {
    content: "\1F527"; /* Unicode for wrench/repair icon */
    position: absolute;
    left: 3px;
    top: 2px;
    font-size: 15px;
    color: #00000030;
}

.height30 {
    height: 30px !important
}

.height35 {
    height: 35px !important
}

.height40 {
    height: 40px !important
}

.height45 {
    height: 45px !important
}

.height50 {
    height: 50px !important
}

.height55 {
    height: 55px !important
}

.layout-scroll {
    overflow: auto !important;
}

[data-cell-id='sidebar'], .dhx_sidebar--popup-menu {
    --dhx-h-background: 173;
    --dhx-s-background: 98.7%;
    --dhx-l-background: 30.4%;
    
    --dhx-background-primary: hsl(var(--dhx-h-background), var(--dhx-s-background), var(--dhx-l-background));
    --dhx-background-secondary: hsl(var(--dhx-h-background), var(--dhx-s-background), calc(var(--dhx-l-background) + 8%));
    --dhx-background-additional: hsl(var(--dhx-h-background), var(--dhx-s-background), calc(var(--dhx-l-background) + 12%));
    }
    
    [data-dhx-theme='custom-theme-dark'] {
        /* font */
        --dhx-font-color-primary: var(--dhx-color-gray-200);
        --dhx-font-color-secondary: var(--dhx-color-gray-500);
        --dhx-font-color-additional: var(--dhx-color-gray-500);
        --dhx-font-color-disabled: var(--dhx-color-gray-800);
        --dhx-font-color-contrast: var(--dhx-color-black);
        /* end font */

        /* border */
        --dhx-border-color: #007a99;
        /* end border */

        /* color scheme */
        --dhx-h-primary: 45;
        --dhx-s-primary: 100%;
        --dhx-l-primary: 35%;

        --dhx-h-secondary: 185;
        --dhx-s-secondary: 5%;
        --dhx-l-secondary: 50%;

        --dhx-h-danger: 330;
        --dhx-s-danger: 65%;
        --dhx-l-danger: 50%;

        --dhx-h-success: 175;
        --dhx-s-success: 60%;
        --dhx-l-success: 40%;

        --dhx-h-background: 190;
        --dhx-s-background: 100%;
        --dhx-l-background: 10%;
        /* end color scheme */

        /* theme colors */
        --dhx-background-primary: hsl(var(--dhx-h-background), var(--dhx-s-background), var(--dhx-l-background));
        --dhx-background-secondary: hsl(var(--dhx-h-background), var(--dhx-s-background), calc(var(--dhx-l-background) + 8%));
        --dhx-background-additional: hsl(var(--dhx-h-background), var(--dhx-s-background), calc(var(--dhx-l-background) + 12%));
        /* end theme colors */

        /* DHTMLX Grid service variables*/
        --dhx-s-grid-header-background: #002229;
        --dhx-s-grid-selection-background: var(--dhx-color-gray-100);
        /* end DHTMLX Grid service variables*/

        /* DHTMLX Toolbar service variables*/
        --dhx-s-toolbar-background: #002229;
        /* end DHTMLX Toolbar service variables */

        /* DHTMLX Spreadsheet service variables */
        --dhx-spreadsheet-range-background-1: #00815a;
        --dhx-spreadsheet-range-background-2: #bfc000;
        --dhx-spreadsheet-range-background-3: #c55933;
        --dhx-spreadsheet-range-background-4: #0cc1d6;
        --dhx-spreadsheet-range-background-5: #0080a3;
        --dhx-spreadsheet-range-background-6: #529a0a;
        --dhx-spreadsheet-range-background-7: #6d767b;
        --dhx-spreadsheet-range-background-8: #ba38e7;

        --dhx-spreadsheet-range-color-1: #8be3c9;
        --dhx-spreadsheet-range-color-2: #f6f740;
        --dhx-spreadsheet-range-color-3: #f7b69e;
        --dhx-spreadsheet-range-color-4: #e0fcff;
        --dhx-spreadsheet-range-color-5: #8fe9ff;
        --dhx-spreadsheet-range-color-6: #d8ffa6;
        --dhx-spreadsheet-range-color-7: #e4e4e4;
        --dhx-spreadsheet-range-color-8: #ecb6ff;
        /* end DHTMLX Spreadsheet service variables */
    }


.layout-incomplete {
    color: red !important;
    background-color: #f9e6e6 !important;
    font-size:x-large;
    font-weight: bold;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.layout-complete {
    color: #4682b4 !important;
    background-color: #e6f2f9 !important;
    margin: 0;
    font-size: x-large;
    font-weight: bold;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* RAG Widget Styles */

/* Base Layout */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#container {
    width: 100%;
    height: 100%;
    display: flex;
}

/* Sidebar Styles */
.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background-color: transparent;
    cursor: col-resize;
    z-index: 10;
}

.resize-handle:hover {
    background-color: #10a37f;
}

/* Header Styles */
.sidebar-toggle {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
    min-width: 30px;
    text-align: center;
}

.sidebar-toggle:hover {
    background-color: #f0f0f0;
}

/* Toggle Switch Styles */
.theme-switch, .markdown-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.theme-switch input, .markdown-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider, .markdown-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.theme-slider:before, .markdown-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .theme-slider, input:checked + .markdown-slider {
    background-color: #10a37f;
}

input:checked + .theme-slider:before, input:checked + .markdown-slider:before {
    transform: translateX(26px);
}

.theme-label, .markdown-label {
    font-size: 12px;
    margin-left: 5px;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Chat Container */
/* Input Area */
/* Message Styles */
/* Markdown Styles within Messages */
/* Chat List Styles */
/* Dark Mode Styles */
/* Dark Mode Markdown Styles */
/* Config Modal Styles */
/* Demo Event Log Styles */
.demo-events {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    max-width: 200px;
    z-index: 1001;
}

.demo-layout {
    display: flex;
    height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.widget-area {
    flex: 2;
    position: relative;
}

.controls-area {
    flex: 1;
    background: #f5f5f5;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #ddd;
    max-width: 400px;
}

.control-section {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-section h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

button {
    background: #10a37f;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin: 2px;
    font-size: 12px;
}

button:hover {
    background: #0c8b6a;
}

button.secondary {
    background: #6c757d;
}

button.secondary:hover {
    background: #545b62;
}

input, textarea, select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    margin: 4px 0;
}

.event-log {
    background: #1e1e1e;
    color: #00ff00;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.artifact-demo {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 12px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.stat-item {
    text-align: center;
    background: #e9ecef;
    padding: 8px;
    border-radius: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #10a37f;
}

.stat-label {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

