/* LITTLESITE · THEME — tui
   The twelfth look (concepts/desk.md, The looks, and the TUI): the whole
   desk in text. Frames are double-line boxes with the title set into the
   top edge, the buttons are bracketed glyphs, the menus are lists with a
   cursor, the taskbar is a status line, and everything is one monospace
   face in light text on black. The variables are the ones every theme
   sets, so a game in a window wears the same text look. */
.theme-tui {
  --window-bg: #000000;
  --window-border: #a8a8a8;
  --window-active-border: #ffffff;
  --desktop-bg: #000000;
  --taskbar-bg: #000000;
  --text-main: #d8d8d8;
  --text-secondary: #8a8a8a;
  --accent: #5fd7ff;
  --surface: #000000;
  --surface-hover: #1c1c1c;
  --tui-font: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-family: var(--tui-font);
  color: var(--text-main);
}
.theme-tui #desktop { background: var(--desktop-bg); }

/* --- Windows: a double-line box, the title set into its top edge --- */
.theme-tui .window {
  background: var(--window-bg);
  border: 3px double var(--window-border);
  border-radius: 0;
  box-shadow: none;
  color: var(--text-main);
  font-family: var(--tui-font);
}
.theme-tui .window.active { border-color: var(--window-active-border); }
.theme-tui .window .titlebar {
  background: var(--window-bg);
  border-bottom: 1px solid var(--window-border);
  color: var(--text-main);
  font-family: var(--tui-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.theme-tui .window.active .titlebar { background: var(--window-border); color: var(--window-bg); }
.theme-tui .window .window-title::before { content: "┤ "; font-weight: 400; }
.theme-tui .window .window-title::after { content: " ├"; font-weight: 400; }
.theme-tui .window .window-controls button {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  font-family: var(--tui-font);
  font-size: 13px;
  width: 28px;
  height: 20px;
  line-height: 20px;
  padding: 0;
}
.theme-tui .window .window-controls button::before { content: "["; }
.theme-tui .window .window-controls button::after { content: "]"; }
.theme-tui .window .window-controls button:hover { background: var(--accent); color: var(--window-bg); transform: none; }
.theme-tui .window .window-content { background: var(--window-bg); color: var(--text-main); }
.theme-tui .window.custom-background .window-content { background: var(--window-custom-background, var(--window-bg)); }
.theme-tui .resize-handle { background: none; }

/* --- The code pane: tabs as bracketed words --- */
.theme-tui .code-toolbar { background: var(--window-bg); border-top: 1px solid var(--window-border); font-family: var(--tui-font); }
.theme-tui .code-tab, .theme-tui .code-save-btn {
  background: none; border: none; border-radius: 0; color: var(--text-secondary); font-family: var(--tui-font); font-size: 12px; text-transform: uppercase;
}
.theme-tui .code-tab::before, .theme-tui .code-save-btn::before { content: "["; }
.theme-tui .code-tab::after, .theme-tui .code-save-btn::after { content: "]"; }
.theme-tui .code-tab.active, .theme-tui .code-save-btn:hover, .theme-tui .code-tab:hover { color: var(--window-bg); background: var(--text-main); }

/* --- The taskbar: a status line --- */
.theme-tui #taskbar {
  background: var(--taskbar-bg);
  border-top: 1px solid var(--window-border);
  box-shadow: none;
  font-family: var(--tui-font);
  color: var(--text-main);
}
.theme-tui.taskbar-top #taskbar { border-top: none; border-bottom: 1px solid var(--window-border); }
.theme-tui .start-btn, .theme-tui .taskbar-windows button {
  background: none; border: none; border-radius: 0; box-shadow: none; color: var(--text-main); font-family: var(--tui-font); font-size: 13px; text-transform: uppercase;
}
.theme-tui .start-btn .start-icon { display: none; }
.theme-tui .start-btn::before { content: "[ "; }
.theme-tui .start-btn::after { content: " ]"; }
.theme-tui .start-btn.active, .theme-tui .start-btn:hover, .theme-tui .taskbar-windows button.active, .theme-tui .taskbar-windows button:hover { background: var(--text-main); color: var(--window-bg); }
.theme-tui .taskbar-windows button::before { content: "│ "; color: var(--text-secondary); }
.theme-tui .taskbar-tray { background: none; border: none; box-shadow: none; color: var(--text-secondary); font-family: var(--tui-font); }
.theme-tui .taskbar-tray .tray-item { border: none; background: none; color: inherit; }
.theme-tui .taskbar-tray .tray-item::before { content: "│ "; }
.theme-tui #clock { font-family: var(--tui-font); }

/* --- The menus: a list with a cursor --- */
.theme-tui .context-menu, .theme-tui .start-menu {
  background: var(--window-bg);
  border: 3px double var(--window-border);
  border-radius: 0;
  box-shadow: none;
  padding: 4px 0;
  color: var(--text-main);
  font-family: var(--tui-font);
  backdrop-filter: none;
}
.theme-tui .context-menu-item, .theme-tui .start-menu-item {
  background: none; border: none; border-radius: 0; color: var(--text-main); font-family: var(--tui-font); font-size: 13px; padding: 2px 12px 2px 24px; position: relative;
}
.theme-tui .context-menu-item::before, .theme-tui .start-menu-item::before { content: " "; position: absolute; left: 8px; }
.theme-tui .context-menu-item:hover, .theme-tui .context-menu-item:focus, .theme-tui .start-menu-item:hover, .theme-tui .start-menu-item:focus { background: var(--text-main); color: var(--window-bg); outline: none; }
.theme-tui .context-menu-item:hover::before, .theme-tui .context-menu-item:focus::before, .theme-tui .start-menu-item:hover::before, .theme-tui .start-menu-item:focus::before { content: ">"; }
.theme-tui .context-menu-divider, .theme-tui .start-menu-divider { border: none; border-top: 1px solid var(--window-border); margin: 4px 0; background: none; }
.theme-tui .start-menu-icon { display: none; }
.theme-tui .start-menu-header { background: none; border-bottom: 1px solid var(--window-border); color: var(--text-main); }
.theme-tui .start-menu-avatar { display: none; }
.theme-tui .start-menu-username { font-family: var(--tui-font); text-transform: uppercase; }
.theme-tui .start-menu-status { color: var(--text-secondary); }
.theme-tui .start-menu-section-title { color: var(--text-secondary); font-family: var(--tui-font); text-transform: uppercase; }
.theme-tui .start-menu-section-title::before { content: "── "; }
.theme-tui .start-menu-footer { border-top: 1px solid var(--window-border); background: none; }

/* --- The notice, the icons, the dialog --- */
.theme-tui .notice { background: var(--window-bg); border: 1px solid var(--window-border); border-radius: 0; color: var(--text-main); font-family: var(--tui-font); box-shadow: none; }
.theme-tui .desk-icon { color: var(--text-main); font-family: var(--tui-font); text-shadow: none; border-radius: 0; }
.theme-tui .desk-icon:hover, .theme-tui .desk-icon:focus { background: var(--text-main); color: var(--window-bg); border-color: var(--text-main); }
.theme-tui dialog.desk-dialog { background: var(--window-bg); color: var(--text-main); border: 3px double var(--window-border); border-radius: 0; font-family: var(--tui-font); }
.theme-tui dialog.desk-dialog button { background: none; border: 1px solid var(--window-border); border-radius: 0; color: var(--text-main); font-family: var(--tui-font); }
.theme-tui dialog.desk-dialog button.yes { background: var(--text-main); color: var(--window-bg); border-color: var(--text-main); }

/* The Blue Square in text: a double rule, still blue; the corner marks a little smaller. */
.theme-tui .square { border: 4px double #2B4BD7; }
.theme-tui .square-handle { width: 18px; height: 18px; }
