/* Way of Code - VIM Editor Styles */

/* Editor pane fills the window */
.wayofcode-editor-pane {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Window sizing */
#dao.retro-window {
    max-width: 900px;
}

/* Editor container fills the retro-window content */
#wayofcode-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
}

/* Editor area */
.wayofcode-editor-area {
    flex: 1;
    min-height: 0;
    position: relative;
}

/* CodeMirror styling within wayofcode */
#wayofcode-editor .CodeMirror {
    height: 100%;
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
    font-size: 16px;
    line-height: 1.8;
    background: var(--page-bg);
    color: var(--black);
    transition: background-color var(--transition-theme);
}

#wayofcode-editor .CodeMirror-gutters {
    background: rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}

#wayofcode-editor .CodeMirror-linenumber {
    color: rgba(0, 0, 0, 0.4);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    padding: 0 8px 0 5px;
}

#wayofcode-editor .CodeMirror-cursor {
    border-left: 2px solid var(--black);
}

/* Vim fat cursor (block cursor in normal mode) */
#wayofcode-editor .cm-fat-cursor .CodeMirror-cursor {
    width: 0.6em !important;
    border: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

#wayofcode-editor .cm-fat-cursor-mark {
    background: rgba(0, 0, 0, 0.5);
}

#wayofcode-editor .CodeMirror-selected {
    background: rgba(0, 0, 0, 0.15) !important;
}

#wayofcode-editor .CodeMirror-focused .CodeMirror-selected {
    background: rgba(0, 0, 0, 0.2) !important;
}

#wayofcode-editor .CodeMirror-activeline-background {
    background: rgba(0, 0, 0, 0.05);
}

#wayofcode-editor .CodeMirror-activeline .CodeMirror-linenumber {
    background: rgba(0, 0, 0, 0.1);
    color: var(--black);
}

/* Vim command line dialog */
#wayofcode-editor .CodeMirror-dialog {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    z-index: 100;
    background: var(--black);
    color: #fff;
    padding: 4px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#wayofcode-editor .CodeMirror-dialog input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    outline: none;
    width: 90%;
}

/* Vim status bar */
.wayofcode-statusbar {
    height: 28px;
    flex-shrink: 0;
    background: var(--black);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wayofcode-statusbar .mode {
    background: #30D158; /* truth-green */
    color: var(--black);
    padding: 2px 8px;
    margin-right: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
}

.wayofcode-statusbar .mode.insert {
    background: #64D2FF; /* phosphor-blue */
}

.wayofcode-statusbar .mode.visual {
    background: #BF5AF2; /* electric-purple */
}

.wayofcode-statusbar .mode.replace {
    background: #FF453A; /* signal-red */
}

.wayofcode-statusbar .filename {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
}

.wayofcode-statusbar .nav-hint {
    margin-right: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.wayofcode-statusbar .nav-hint kbd {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 4px;
    border-radius: 2px;
    margin: 0 2px;
}

.wayofcode-statusbar .position {
    color: rgba(255, 255, 255, 0.6);
}
