/*
 * Decoration: BeOS-Inspired (html.decor-beos, a tab style: html.wm-tabs)
 *
 * The yellow tab that is only as wide as its title (Shift+drag slides it),
 * a thin light-gray beveled frame, light-gray menu bar and menus, and BeOS
 * style buttons: a box at the left of the tab (the control menu) and the
 * minimize / zoom boxes at the right.
 */

html.decor-beos {
  --beos-font: "Swis721 BT", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
html.decor-beos body { font: 12px var(--beos-font); }

/* ---------- frame ---------- */

html.decor-beos .wm-window { padding: 27px 5px 5px; }
html.decor-beos .wm-window::before {
  top: 21px;
  background: var(--border-inactive);
  border: 1px solid var(--frame);
  box-shadow: inset 1px 1px var(--hilite), inset -1px -1px var(--shadow);
}
html.decor-beos .wm-window.active::before { background: var(--border); }
html.decor-beos .wm-window.maximized { padding: 22px 0 0; }
html.decor-beos .wm-window.maximized::before { border-width: 1px 0 0; box-shadow: none; }

/* ---------- the tab ---------- */

html.decor-beos .wm-tabrow { height: 22px; gap: 0; align-items: flex-end; }
html.decor-beos .wm-titlebar {
  flex: 0 1 auto;
  min-width: 70px;
  max-width: 320px;
  height: 22px;
  padding: 0 4px;
  gap: 5px;
  align-items: center;
  background: var(--title-inactive);
  color: var(--title-inactive-text);
  border: 1px solid var(--frame);
  border-bottom: 0;
  box-shadow: inset 1px 1px var(--hilite), inset -1px 0 var(--shadow);
  font: bold 12px var(--beos-font);
}
html.decor-beos .wm-titlebar.active {
  background: linear-gradient(to right, var(--title), var(--title2));
  color: var(--title-text);
}
html.decor-beos .wm-titlebar + .wm-titlebar { margin-left: -1px; }
html.decor-beos .wm-titlebar.back { height: 19px; font-weight: normal; }
html.decor-beos .wm-title { padding: 0 4px; line-height: 20px; }

/* box buttons: 13x13, beveled, a soft highlight from the top-left */
html.decor-beos .wm-ctlbox,
html.decor-beos .wm-btn {
  position: relative;
  width: 13px;
  height: 13px;
  font-size: 0;          /* hide the window manager's text glyphs */
  border: 1px solid var(--frame);
  background: linear-gradient(135deg, var(--hilite) 0%, var(--title) 55%, var(--shadow) 100%);
  cursor: default;
}
html.decor-beos .wm-titlebar:not(.active) .wm-ctlbox,
html.decor-beos .wm-titlebar:not(.active) .wm-btn {
  background: linear-gradient(135deg, var(--hilite) 0%, var(--title-inactive) 55%, var(--shadow) 100%);
}
html.decor-beos .wm-ctlbox:active,
html.decor-beos .wm-btn:active {
  background: linear-gradient(135deg, var(--shadow) 0%, var(--title) 60%, var(--hilite) 100%);
}
/* minimize: a flat bar */
html.decor-beos .wm-btn-min::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 2px;
  background: var(--frame);
}
/* zoom (maximize): a small box over a large box */
html.decor-beos .wm-btn-max::before {
  content: ""; position: absolute; left: 3px; top: 3px; right: 1px; bottom: 1px;
  border: 1px solid var(--frame);
}
html.decor-beos .wm-btn-max::after {
  content: ""; position: absolute; left: 1px; top: 1px; width: 5px; height: 5px;
  border: 1px solid var(--frame);
  background: var(--hilite);
}

/* ---------- menu bar and contents ---------- */

html.decor-beos .wm-menubar {
  background: var(--menu);
  color: var(--menu-text);
  border-bottom: 1px solid var(--shadow);
  box-shadow: inset 0 1px var(--hilite);
}
html.decor-beos .wm-menubar-item { padding: 3px 8px; }
html.decor-beos .wm-menubar-item.open { background: var(--select); color: var(--select-text); }
html.decor-beos .wm-client {
  background: var(--window);
  color: var(--window-text);
  border: 1px solid var(--shadow);
}
html.decor-beos .wm-window.fixed .wm-client { background: var(--face); color: var(--button-text); }

/* resize handles over the thin frame (the frame starts 21px down) */
html.decor-beos .wm-rh-n  { top: 21px;  left: 10px; right: 10px; height: 5px; }
html.decor-beos .wm-rh-s  { bottom: 0;  left: 10px; right: 10px; height: 5px; }
html.decor-beos .wm-rh-e  { right: 0;   top: 31px;  bottom: 10px; width: 5px; }
html.decor-beos .wm-rh-w  { left: 0;    top: 31px;  bottom: 10px; width: 5px; }
html.decor-beos .wm-rh-nw { top: 21px;  left: 0;  width: 10px; height: 10px; }
html.decor-beos .wm-rh-ne { top: 21px;  right: 0; width: 10px; height: 10px; }
html.decor-beos .wm-rh-sw { bottom: 0;  left: 0;  width: 10px; height: 10px; }
html.decor-beos .wm-rh-se { bottom: 0;  right: 0; width: 14px; height: 14px; }

/* ---------- icons ---------- */

html.decor-beos .icon-label { font: 11px var(--beos-font); }
html.decor-beos #desktop > .min-icon .icon-label { padding: 0 3px; }

/* ---------- menus ---------- */

html.decor-beos .wm-menu {
  padding: 2px 0;
  background: var(--menu);
  color: var(--menu-text);
  border: 1px solid var(--frame);
  box-shadow: inset 1px 1px var(--hilite), inset -1px -1px var(--shadow), 2px 2px 0 rgba(0, 0, 0, 0.35);
  font: 12px var(--beos-font);
}
html.decor-beos .wm-menu-item { padding: 3px 16px 3px 0; }
html.decor-beos .wm-menu-sep { border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hilite); margin: 3px 4px; }

/* ---------- dialogs ---------- */

html.decor-beos .dialog { font: 12px var(--beos-font); }
html.decor-beos .dialog input[type=text] {
  font: inherit; padding: 2px 4px;
  background: var(--window); color: var(--window-text);
  border: 1px solid var(--shadow); box-shadow: inset 1px 1px var(--shadow);
}
html.decor-beos .dialog button {
  font: bold 12px var(--beos-font);
  padding: 4px 12px;
  background: linear-gradient(var(--hilite), var(--face));
  color: var(--button-text);
  border: 1px solid var(--frame);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--hilite);
}
html.decor-beos .dialog button:active { background: linear-gradient(var(--shadow), var(--face)); }
