/* Notepad (XP SP3) in Luna: the menu bar is Solitaire's, the status bar, scroll bars and grip are the Luna
   parts Internet Explorer uses (assets/ie/, see css/ie.css and css/ie-page.css). */

/* lfFaceName "Lucida Console", iPointSize 100: 13px at 96 dpi. Where it isn't installed, a monospace font of
   the same 0.6 em advance, with Lucida Console's ascent and descent so lines sit as close. */
@font-face { font-family: "XP Lucida Console"; src: local("Lucida Console"), local("LucidaConsole"); }
@font-face {
  font-family: "XP Lucida Console Stand-in";
  src: local("DejaVu Sans Mono"), local("DejaVuSansMono"), local("Menlo"), local("Menlo-Regular"),
    local("Liberation Mono"), local("LiberationMono"), local("Consolas");
  ascent-override: 79%;
  descent-override: 21%;
  line-gap-override: 0%;
}

.np-root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--face);
}
.maximized .np-root { width: auto; height: auto; }
.np-root.busy, .np-root.busy * { cursor: wait; }   /* SetCursor(IDC_WAIT) while a file loads */

/* WS_EX_CLIENTEDGE, themed: [Edit] BorderColor 127 157 185, then a pixel of the window colour. */
.np-box {
  flex: 1 1 auto;
  display: flex;
  min-width: 0;
  min-height: 0;
  border: 1px solid #7f9db9;
  padding: 1px;
  background: #fff;
}
.np-edit {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border: 0;
  padding: 0 0 0 1px;
  resize: none;
  outline: none;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 13px/13px "XP Lucida Console", "XP Lucida Console Stand-in", monospace;
  white-space: pre;
  overflow: scroll;                 /* WS_VSCROLL | WS_HSCROLL: both always there */
  tab-size: 8;
  -webkit-user-select: text;
  user-select: text;
}
/* Chromium ignores ::-webkit-scrollbar once scrollbar-color is set, so only Firefox gets the colours. */
@supports (-moz-appearance: none) {
  .np-edit { scrollbar-color: #c3d3fd #fefefb; }
}
.np-edit.wrap { white-space: pre-wrap; overflow-wrap: break-word; overflow-x: hidden; overflow-y: scroll; }
.np-edit::selection { background: #316ac5; color: #fff; }

.np-edit::-webkit-scrollbar { width: 17px; height: 17px; }
.np-edit::-webkit-scrollbar-corner { background: #ece9d8; }
.np-edit::-webkit-scrollbar-track:vertical { background: url(../assets/ie/sb-track-v-normal.png) 0 0 / 17px 100%; }
.np-edit::-webkit-scrollbar-track:horizontal { background: url(../assets/ie/sb-track-h-normal.png) 0 0 / 100% 17px; }
.np-edit::-webkit-scrollbar-thumb:vertical {
  min-height: 17px;
  border-style: solid;
  border-width: 5px 6px;
  border-image: url(../assets/ie/sb-thumb-v-normal.png) 5 6 stretch;
  background: url(../assets/ie/sb-grip-v-normal.png) center no-repeat, url(../assets/ie/sb-thumb-v-mid-normal.png) 0 0 / 100% 100%;
  background-clip: padding-box;
}
.np-edit::-webkit-scrollbar-thumb:vertical:hover {
  border-image-source: url(../assets/ie/sb-thumb-v-hot.png);
  background-image: url(../assets/ie/sb-grip-v-hot.png), url(../assets/ie/sb-thumb-v-mid-hot.png);
}
.np-edit::-webkit-scrollbar-thumb:vertical:active {
  border-image-source: url(../assets/ie/sb-thumb-v-pressed.png);
  background-image: url(../assets/ie/sb-grip-v-pressed.png), url(../assets/ie/sb-thumb-v-mid-pressed.png);
}
.np-edit::-webkit-scrollbar-thumb:horizontal {
  min-width: 17px;
  border-style: solid;
  border-width: 6px 5px;
  border-image: url(../assets/ie/sb-thumb-h-normal.png) 6 5 stretch;
  background: url(../assets/ie/sb-grip-h-normal.png) center no-repeat, url(../assets/ie/sb-thumb-h-mid-normal.png) 0 0 / 100% 100%;
  background-clip: padding-box;
}
.np-edit::-webkit-scrollbar-thumb:horizontal:hover {
  border-image-source: url(../assets/ie/sb-thumb-h-hot.png);
  background-image: url(../assets/ie/sb-grip-h-hot.png), url(../assets/ie/sb-thumb-h-mid-hot.png);
}
.np-edit::-webkit-scrollbar-thumb:horizontal:active {
  border-image-source: url(../assets/ie/sb-thumb-h-pressed.png);
  background-image: url(../assets/ie/sb-grip-h-pressed.png), url(../assets/ie/sb-thumb-h-mid-pressed.png);
}
.np-edit::-webkit-scrollbar-button:single-button { display: block; width: 17px; height: 17px; background-repeat: no-repeat; }
.np-edit::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url(../assets/ie/sb-up.png); }
.np-edit::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url(../assets/ie/sb-down.png); }
.np-edit::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url(../assets/ie/sb-left.png); }
.np-edit::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url(../assets/ie/sb-right.png); }
.np-edit::-webkit-scrollbar-button:single-button:hover { background-position: 0 -17px; }
.np-edit::-webkit-scrollbar-button:single-button:active { background-position: 0 -34px; }
.np-edit::-webkit-scrollbar-button:single-button:disabled { background-position: 0 -51px; }
.np-edit::-webkit-scrollbar-button:double-button { display: none; }

/* msctls_statusbar32: [Status] StatusBackground.bmp, [Status.Pane] StatusPane.bmp, the size grip. */
.np-status {
  flex: none;
  height: 22px;
  display: flex;
  align-items: stretch;
  position: relative;
  padding: 3px 0 1px 2px;
  isolation: isolate;
}
.np-status[hidden] { display: none; }
.np-status::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-style: solid;
  border-width: 5px 17px 9px 50px;
  border-image: url(../assets/ie/status.png) 5 17 9 50 fill round;
}
.np-status .sp {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 4px 0 2px;
  border-style: solid;
  border-width: 2px 2px 2px 0;
  border-image: url(../assets/ie/statuspane.png) 2 2 2 0;
  white-space: pre;
  overflow: hidden;
}
.np-status .sp:first-child { flex: 0 0 75%; }
.np-status .pos { flex: 1 1 auto; }
.np-status .sgrip { width: 16px; flex: none; background: url(../assets/ie/grip.png) right bottom no-repeat; margin: -3px 0 -1px; }
.maximized .np-status .sgrip { visibility: hidden; }

/* Dialogs: Go To (notepad.exe DIALOG 14), MessageBox, About (shell32 DIALOG 14352). DS_MODALFRAME windows
   and message boxes have no icon in their caption. */
.np-goto .ticon, .np-msg .ticon, .np-about .ticon { display: none; }
.np-dedit input {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 1px 2px;
  border: 1px solid #7f9db9;
  font: 11px var(--ui-font);
  outline: none;
}
.np-wrap { white-space: normal; }
.np-etched { height: 0 !important; border-top: 1px solid #aca899; border-bottom: 1px solid #fff; }
.np-link { color: #0066cc; text-decoration: underline; cursor: pointer; }
.np-msg .mtext { white-space: pre-line; max-width: 460px; line-height: 13px; }
.np-about .np-banner { position: absolute; left: 0; top: 0; pointer-events: none; }
.np-about .np-banner img { display: block; }
