/* 1:1 recreation of the Voltage menu (library.lua theme presets) */

.vg {
  --inline: rgb(46, 46, 46);
  --outline: rgb(10, 10, 15);
  --accent: rgb(19, 128, 225);
  --background: rgb(20, 20, 25);
  --misc1: rgb(30, 30, 35);
  --misc2: rgb(23, 23, 28);
  --text: rgb(245, 245, 245);
  --unselected: rgb(145, 145, 145);
  --dim: rgb(45, 45, 50);
  --page: rgb(28, 28, 33);
  --deep: rgb(15, 15, 20);

  font: 12px Tahoma, Verdana, "DejaVu Sans", sans-serif;
  color: var(--unselected);
  line-height: 1;
  -webkit-font-smoothing: none;
  user-select: none;
}

.vg *,
.vg *::before,
.vg *::after { box-sizing: border-box; }

.vg-stage {
  position: relative;
  overflow: hidden;
}

.vg-window {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  background: var(--outline);
}

.vg-stroke {
  text-shadow:
    1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000,
    1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.vg-inset { position: absolute; inset: 1px; }

.vg-w-inline { background: var(--inline); }
.vg-w-bg { background: var(--misc1); }

.vg-title {
  position: absolute;
  left: 0;
  top: 5px;
  padding: 0 5px 0 7px;
  color: var(--text);
  z-index: 2;
}

.vg-holder {
  position: absolute;
  left: 6px;
  top: 21px;
  right: 6px;
  bottom: 5px;
  background: var(--inline);
}

.vg-holder-inline { position: absolute; inset: 1px; background: var(--outline); }
.vg-holder-bg { position: absolute; inset: 1px; background: var(--deep); }

.vg-topaccent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

/* ---------- tab bar ---------- */

.vg-tabbar,
.vg-subbar {
  position: absolute;
  left: 13px;
  right: 13px;
  background: var(--outline);
  display: flex;
  padding: 1px;
  z-index: 3;
}

.vg-tabbar { top: 13px; height: 39px; }
.vg-subbar { top: 58px; height: 30px; }

.vg-tab {
  flex: 1 1 0;
  position: relative;
  margin-right: -1px;
  background: var(--inline);
  cursor: pointer;
  min-width: 0;
}

.vg-tab:last-child { margin-right: 0; }

.vg-tab-face {
  position: absolute;
  inset: 1px;
  background: linear-gradient(180deg, rgb(27, 27, 32), rgb(21, 21, 25));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px 0 5px;
  overflow: hidden;
}

.vg-tab-face span {
  color: rgb(140, 140, 140);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-tab.on .vg-tab-face span { color: var(--text); }

/* ---------- page ---------- */

.vg-pageoutline {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 58px;
  bottom: 13px;
  background: var(--outline);
}

.vg-pageoutline.sub { top: 94px; }

.vg-page-inline { position: absolute; inset: 1px; background: var(--inline); }
.vg-page-bg { position: absolute; inset: 1px; background: var(--page); overflow: hidden; }

.vg-page {
  position: absolute;
  inset: 6px;
  display: none;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
}

.vg-page.on { display: flex; }

.vg-page::-webkit-scrollbar { width: 3px; }
.vg-page::-webkit-scrollbar-thumb { background: var(--accent); }
.vg-page::-webkit-scrollbar-track { background: transparent; }

.vg-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  align-content: flex-start;
}

/* ---------- section ---------- */

.vg-section {
  position: relative;
  background: var(--inline);
  padding-bottom: 2px;
  height: max-content;
}

.vg-sec-label {
  position: absolute;
  left: 10px;
  top: 0;
  height: 10px;
  padding: 0 2px 0 3px;
  background: var(--background);
  z-index: 2;
  display: flex;
  align-items: flex-end;
}

.vg-sec-label span {
  color: var(--text);
  transform: translateY(2px);
  white-space: nowrap;
}

.vg-sec-inline { background: var(--outline); margin: 1px; padding-bottom: 2px; }
.vg-sec-bg { background: var(--background); margin: 1px; position: relative; }

.vg-sec-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

.vg-elements {
  padding: 15px 12px 5px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ---------- rows ---------- */

.vg-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 12px;
}

.vg-row-main { flex: 1 1 auto; min-width: 0; position: relative; }

.vg-comps {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 12px;
  margin-left: auto;
  padding-left: 6px;
  flex: none;
}

/* toggle */

.vg-check {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--outline);
  cursor: pointer;
}

.vg-check i { position: absolute; inset: 1px; background: var(--dim); }
.vg-check i i { background: var(--outline); }
.vg-check i i i { background: var(--misc1); }

.vg-check.on i { background: var(--accent); }
.vg-check.on i i { background: var(--outline); }
.vg-check.on i i i { background: var(--accent); }

.vg-toggle {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  cursor: pointer;
  min-width: 0;
}

.vg-toggle > label {
  color: var(--unselected);
  cursor: pointer;
  white-space: nowrap;
  transform: translateY(-1px);
}

.vg-toggle.on > label { color: var(--text); }
.vg-toggle.risky > label { color: rgb(255, 60, 60); }

/* label row */

.vg-label { color: var(--unselected); transform: translateY(-1px); }

/* gear */

.vg-gear {
  width: 12px;
  height: 12px;
  flex: none;
  cursor: pointer;
  color: var(--unselected);
  margin-left: 4px;
  align-self: center;
}

.vg-gear svg { display: block; width: 12px; height: 12px; fill: currentColor; }
.vg-gear:hover { color: var(--text); }

/* colorpicker swatch */

.vg-swatch {
  position: relative;
  width: 20px;
  height: 12px;
  flex: none;
  background: var(--outline);
  cursor: pointer;
}

.vg-swatch i { position: absolute; inset: 1px; background: var(--dim); }
.vg-swatch i i { background: var(--outline); }
.vg-swatch i i i { background: var(--fill, #fff); }

/* keybind */

.vg-key {
  color: var(--unselected);
  cursor: pointer;
  white-space: nowrap;
  transform: translateY(-1px);
}

.vg-key:hover, .vg-key.listening { color: var(--text); }

/* slider */

.vg-slider { width: 100%; }
.vg-slider > label { display: block; color: var(--unselected); padding-left: 1px; }
.vg-slider.on > label { color: var(--text); }

.vg-track {
  position: relative;
  height: 10px;
  margin: 5px 4px 0;
  background: var(--outline);
  cursor: ew-resize;
}

.vg-track > i { position: absolute; inset: 1px; background: var(--dim); }
.vg-track > i > i { position: absolute; inset: 1px; background: var(--outline); }
.vg-track > i > i > i {
  position: absolute;
  inset: 1px;
  background: linear-gradient(180deg, var(--misc1), var(--misc2));
  overflow: visible;
}

.vg-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--accent);
}

.vg-val {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgb(235, 235, 235);
  white-space: nowrap;
  z-index: 2;
}

/* dropdown */

.vg-dd { width: 100%; position: relative; }
.vg-dd > label { display: block; color: var(--unselected); padding-left: 1px; margin-bottom: 6px; }

.vg-dd-box {
  position: relative;
  height: 17px;
  background: var(--outline);
  cursor: pointer;
}

.vg-dd-box > i { position: absolute; inset: 1px; background: var(--dim); }
.vg-dd-box > i > i { position: absolute; inset: 1px; background: var(--outline); }
.vg-dd-box > i > i > i {
  position: absolute;
  inset: 1px;
  background: linear-gradient(180deg, var(--misc1), var(--misc2));
}

.vg-dd-value {
  position: absolute;
  left: 3px;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--unselected);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.vg-dd-plus {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--unselected);
  z-index: 2;
}

.vg-dd.open .vg-dd-plus { color: var(--text); }

/* popups */

.vg-pop {
  position: absolute;
  z-index: 60;
  background: var(--outline);
  padding: 1px;
  display: none;
}

.vg-pop.open { display: block; }

.vg-pop-inline { background: var(--dim); padding: 1px; }
.vg-pop-bg { background: var(--background); padding: 3px; }

.vg-dd-pop .vg-pop-bg {
  max-height: 132px;
  overflow-y: auto;
  overflow-x: hidden;
}

.vg-dd-pop .vg-pop-bg::-webkit-scrollbar { width: 3px; }
.vg-dd-pop .vg-pop-bg::-webkit-scrollbar-thumb { background: var(--accent); }
.vg-dd-pop .vg-pop-bg::-webkit-scrollbar-track { background: transparent; }

.vg-opt {
  padding: 2px 4px;
  color: var(--unselected);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-opt:hover { color: rgb(200, 200, 200); }
.vg-opt.on { color: var(--accent); }

.vg-pop-title {
  color: var(--text);
  padding: 1px 2px 5px;
}

.vg-pop .vg-elements { padding: 0 2px 2px; }

/* button */

.vg-btn {
  position: relative;
  width: 100%;
  height: 18px;
  background: var(--outline);
  cursor: pointer;
}

.vg-btn > i { position: absolute; inset: 1px; background: var(--dim); }
.vg-btn > i > i { position: absolute; inset: 1px; background: var(--outline); }
.vg-btn > i > i > i {
  position: absolute;
  inset: 1px;
  background: linear-gradient(180deg, var(--misc1), var(--misc2));
}

.vg-btn span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--unselected);
  z-index: 2;
}

.vg-btn:hover span { color: var(--text); }
.vg-btn:active > i > i > i { background: var(--accent); }

/* textbox / list */

.vg-textbox {
  position: relative;
  width: 100%;
  height: 18px;
  background: var(--outline);
}

.vg-textbox > i { position: absolute; inset: 1px; background: var(--dim); }
.vg-textbox > i > i { position: absolute; inset: 1px; background: var(--outline); }
.vg-textbox > i > i > i {
  position: absolute;
  inset: 1px;
  background: linear-gradient(180deg, var(--misc1), var(--misc2));
}

.vg-textbox input {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: none;
  padding: 0 3px;
  font: inherit;
  color: var(--unselected);
  outline: none;
}

.vg-list {
  position: relative;
  width: 100%;
  height: 84px;
  background: var(--outline);
}

.vg-list > i { position: absolute; inset: 1px; background: var(--dim); }
.vg-list > i > i { position: absolute; inset: 1px; background: var(--outline); }
.vg-list > i > i > i {
  position: absolute;
  inset: 1px;
  background: var(--background);
  overflow: auto;
  padding: 2px;
}

.vg-tip {
  position: fixed;
  z-index: 90;
  max-width: 280px;
  background: var(--outline);
  padding: 1px;
  display: none;
  pointer-events: none;
}

.vg-tip.on { display: block; }
.vg-tip-inner { background: var(--background); padding: 4px 6px; color: rgb(200, 200, 200); }
.vg-tip-inner b { display: block; color: var(--text); margin-bottom: 3px; font-weight: normal; }
.vg-tip-inner span { white-space: pre-line; line-height: 1.35; }

.vg-head { display: flex; align-items: center; }
.vg-section { flex: none; }
.vg-head > .vg-gear { margin-left: 4px; }
