/* nui-code-editor.css */

nui-code-editor {
    display: block;
    width: 100%;
    height: 100%;
}

.nui-code-editor-container {
    display: flex;
    width: 100%;
    height: 100%;
    background: var(--color-shade2);
    border-radius: var(--border-radius1, 4px);
    overflow: hidden;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--border-shade1, rgba(0,0,0,0.1));
}

.nui-code-editor-lines {
    min-width: 3rem;
    padding: 1rem 0.5rem;
    text-align: right;
    background: var(--color-shade3);
    color: var(--color-base-text, #333);
    opacity: 0.6;
    user-select: none;
    overflow: hidden;
    border-right: 1px solid var(--border-shade2, rgba(0,0,0,0.1));
    white-space: pre;
    box-sizing: border-box;
}

.nui-code-editor-lines::-webkit-scrollbar {
    display: none;
}

.nui-code-editor-wrap {
    flex-grow: 1;
    overflow: auto;
    position: relative;
}

.nui-code-editor-input {
    display: block;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 1rem;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre; 
    tab-size: 4;
    outline: none;
    box-sizing: border-box;
    caret-color: var(--color-base-text, #000);
}

.nui-code-editor-input * {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Dark mode basic support */
@media (prefers-color-scheme: dark) {
    .nui-code-editor-container {
        border-color: rgba(255,255,255,0.1);
    }
    .nui-code-editor-lines {
        background: var(--color-shade2);
        color: var(--color-base-text, #fff);
    }
    .nui-code-editor-input {
        caret-color: var(--color-base-text, #fff);
    }
}