#canvas_container {
  cursor:default;
  position: absolute;
  right: 0;
  left: 50px;
  top: 36px;
  bottom: 0;
}

#rubber-zone-bar {
  display: none;
}

html, body { margin:0; }

body.noscroll {
  position: fixed;
  width: 100%;
  height:100%;
}

#progress_bar {
  margin: 10px 0;
  padding: 3px;
  border: 1px solid #000;
  font-size: 14px;
  clear: both;
  opacity: 0;
  -moz-transition: opacity 1s linear;
  -o-transition: opacity 1s linear;
  -webkit-transition: opacity 1s linear;
}
#progress_bar.loading {
  opacity: 1.0;
}
#progress_bar .percent {
  background-color: #99ccff;
  height: auto;
  width: 0;
}

:root {
  --tooltip-connector-thickness: 2px;
  --tooltip-background-color: #000;
}

.tooltip-connector {
  position: fixed;
  height: var(--tooltip-connector-thickness);
  background: var(--tooltip-background-color);
  border-radius: 999px;
  pointer-events: none;
  transform-origin: 0 50%;
  z-index: 1069;
}

.info {
	padding: 4px 12px;
	font-size: 12px;
	color: #eee;
	background-color: #333;
	position: absolute;
	bottom: 0;
	left: 50px;
	right: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 18px;
	height: 26px;
	z-index: 10;
	box-sizing: border-box;
	font-variant-numeric: tabular-nums;
}
.info b {
	margin-right: 2px;
	flex: 0 0 auto;
}
.info .var {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	overflow: visible;
	word-break: normal;
	height: auto;
	white-space: nowrap;
}

.info-symmetry-section {
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
}

#symmetry-dropdown { position:relative; display:inline-flex; align-items:center; gap:4px; }
.symmetry-picker-label { margin-right:2px; }
.symmetry-menu-btn { width:auto; min-width:44px; padding:1px 7px; color:#eee; }
#symmetry-menu {
  position:absolute;
  left:0;
  bottom:30px;
  width:min(390px, calc(100vw - 70px));
  padding:8px;
  background:#fff;
  color:#222;
  border:1px solid #aaa;
  border-radius:5px;
  box-shadow:0 -4px 16px rgba(0,0,0,0.25);
  text-align:left;
  z-index:1100;
}
.symmetry-menu-row {
  display:grid;
  grid-template-columns:18px minmax(0,1fr);
  align-items:center;
  gap:6px;
  margin:3px 0;
  min-height:26px;
  font-weight:normal;
  cursor:pointer;
}
.symmetry-menu-row input { margin:0; }
.symmetry-value-row { grid-template-columns:18px minmax(120px,1fr) 82px; }
.symmetry-point-row { grid-template-columns:18px 72px 68px 20px 68px; }
.symmetry-value-row input[type="number"] {
  width:100%; min-width:0;
  height:25px;
  padding:2px 5px;
}
.symmetry-check-row { margin-top:7px; padding-top:5px; border-top:1px solid #ccc; }

#tool_bar {
  position:absolute;
  left:0;
  bottom:0;
  top:0;
  width:50px;
  /*border-right:1px solid #e5e5e5;*/
  background:#333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

#tool_bar ul {
  margin:0;
  padding:0 10px;
  width: 50px;
}

#tool_bar ul li {
  display:block;
  height:30px;
  width:30px;
  background:#393939;
}

#tool_bar a {
  display:block;
  width:30px;
  height:30px;
  line-height:24px;
  text-align:center;
  color:#EEE;
  font-size:28px;
}

#tool_bar ul li a:hover {
  color:#FFF;
  background-color:#1b1b1b;
  text-decoration:none;
}

#tool_bar ul li a.toolbar-tool-active {
  background-color: rgba(0,0,0,0.3);
}

#tool_bar ul li a:focus,
#tool_bar ul li a:active {
  outline: none;
}

#gui-tab li a:focus,
#gui-tab li a:active {
  outline: none;
}

#tool_bar ul li a {
  background-size:cover;
  background-repeat:no-repeat;
}

#tool_bar #zones-menu {
  background:#333;
  margin:0;
  position: absolute;
  left: 50px;
  top: 10px;
  border-radius:0;
  border:1px solid #1b1b1b;
  border-left:0;
}

#tool_bar ul li a {
  background-size:cover;
  background-repeat:no-repeat;
}

#contextMenu .toolbar-gui-open,
#contextMenu .toolbar-gui-close,
#contextMenu .toolbar-toolSelect,
#contextMenu .toolbar-toolWall,
#contextMenu .toolbar-toolZone {
  cursor:pointer;
}

/* Settings cog icon for toolbar */
.toolbar-gui-open:after,
.toolbar-gui-close:after {
    font-family: 'Glyphicons Halflings';
    content: "\e019";
    font-size: 16px;
    position: relative;
    top: 3px;
}

/* Remove old background images for gui open/close buttons */
.toolbar-gui-open {
  background-image: none;
}

.toolbar-gui-close {
  background-image: none;
}

.toolbar-toolSelect {
  background-image:url('../images/SelectTool.png');
}

.toolbar-toolWall {
  background-image:url('../images/ObjectTools/WallTool.png');
}

.toolbar-toolZone {
  background-image:url('../images/ObjectTools/ZoneBase.png');
}


#zone-base {
  position:relative;
}

.toolbar-toolZone-death {
  background-image:url('../images/ObjectTools/Zones/DeathZone.png');
}
.toolbar-toolZone-win {
  background-image:url('../images/ObjectTools/Zones/WinZone.png');
}
.toolbar-toolZone-target {
  background-image:url('../images/ObjectTools/Zones/TargetZone.png');
}
.toolbar-toolZone-fortress {
  background-image:url('../images/ObjectTools/Zones/FortressZone.png');
}
.toolbar-toolZone-rubber {
  background-image:url('../images/ObjectTools/Zones/RubberZone.png');
}

.toolbar-toolSpawn {
  background-image:url('../images/ObjectTools/SpawnTool.png');
}

.toolbar-toolLock {
  background-image:url('../images/Lock/Lock.png');
  background-color: #7f2626;
  border: 1px solid #d96565;
}

.toolbar-toolUnlock {
  background-image:url('../images/Lock/Unlock.png');
  background-color: #236b35;
  border: 1px solid #65c77a;
}

.toolbar-toolZoomIn {
  background-image:url('../images/Zoom/ZoomIn.png');
}
.toolbar-toolZoomOut {
  background-image:url('../images/Zoom/ZoomOut.png');
}

.toolbar-toolScaleUp {
  background-image:url('../images/Zoom/Grow.png');
}
.toolbar-toolScaleDown {
  background-image:url('../images/Zoom/Shrink.png');
}

/* Toolbar-only icon pseudo-elements (scoped so they don't appear in context menu) */
#tool_bar .toolbar-delete:after {
    font-family: 'Glyphicons Halflings';
    content: "\e014";
    font-size: 18px;

    position:relative;
    top:3px;
}

#tool_bar .toolbar-undo:after {
    font-family: sans-serif;
    content: "\21b6";
    font-size: 26px;

    position:relative;
    top:4px; left:-1px;
}

#tool_bar .toolbar-redo:after {
    font-family: sans-serif;
    content: "\21b7";
    font-size: 26px;

    position:relative;
    top:4px; left:-0px;
}
/* Split Tool icon */
.toolbar-toolSplit:after {
    font-family: sans-serif;
    content: "\2702";
    font-size: 18px;
    position:relative;
    top:3px;
}

#tool_bar li a.toolbar-toolScaleUp {
  font-size:20px;
}

#tool_bar li a.toolbar-toolScaleDown {
  font-size:20px;
}

/* Keep the settings window within the viewport and clear of the top/bottom bars. */
#control_box {
  position:fixed;
  background:#FFF; width:600px;
  width: min(100%, 600px);
  border:1px solid #aaa;
  top: 46px;
  z-index:5;
  left:0;
  right:0;margin:auto auto;
  text-align:left;
  display:none;
  resize: both;
  overflow: auto;
  min-width: 320px;
  min-height: 200px;
  max-width: calc(100vw - 66px);
  max-height: calc(100vh - 82px);
  box-sizing: border-box;
}

#control-box-header {
  background: #333;
  color: #eee;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid #555;
}

#control-box-header #control-box-close {
  float: right;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.7;
}

#control-box-header #control-box-close:hover {
  opacity: 1;
}

#control_box > #gui-content {
  padding: 20px;
}

#control_box .gui-tool-name {
  margin-top:0;
  border-bottom:1px solid #aaa;
  margin-bottom:20px;
  padding-bottom:5px;
}

#control_box #gui-content {
  text-align:left;
  margin-bottom:10px;
}

#control_box #gui-tab-content {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

#control_box .tab-pane {
  background:#f5f5f5;
  border:1px solid #e5e5e5;
  border-top:0;
  padding:20px;
}

#control_box_close {
  float:right;
  width:30px;
  height:30px;
  line-height:30px;
  text-align:center;
  font-weight:bold;
  cursor:pointer;
}

#control_box table { background:#FFF; margin-bottom:0; border-radius:3px; }

#control_box table tr td:first-child { text-align:left; }
#control_box table tr { text-align:left; }

#contextMenu {
  position: absolute;
  display:none;
}

/* Split Tool icon */
.toolbar-toolSplit:after {
    font-family: sans-serif;
    content: "\2702";
    font-size: 18px;
    position:relative;
    top:3px;
}

/* Wall Vertex Move Tool icon */
.toolbar-toolWallVertexMove:after {
    font-family: sans-serif;
    content: "\25CF";
    font-size: 14px;
    position: relative;
    top: 3px;
}

/* Join Tool icon */
.toolbar-toolJoin {
  background-image: url('../images/ObjectTools/JoinTool.svg');
}
.toolbar-toolJoin:after {
    content: none;
}

/* Info/About button */
.toolbar-toolInfo:after {
    font-family: 'Glyphicons Halflings';
    content: "\e086";
    font-size: 16px;
    position:relative;
    top:3px;
}

/* Bottom toolbar group pinned to bottom */
#toolbar-bottom-ul {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 10px;
  padding-bottom: 8px;
  margin: 0;
}

#toolbar-bottom-ul li:first-child {
  margin-bottom: 6px;
}

/* Keybind overlay badge on toolbar buttons */
#tool_bar a {
  position: relative;
}

.keybind-overlay {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 9px;
  font-family: monospace;
  color: rgba(255,255,255,0.65);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Settings modal: auto-size, no mandatory scroll when there's room */
#control_box #gui-tab-content {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

/* XML editor toolbar button */
.toolbar-toolXml {
  background-image: url('../images/ObjectTools/XmlTool.svg');
}
.toolbar-toolXml:after {
  content: none;
}

/* Action History Window */
#action-history-window {
  position: fixed;
  top: 46px;
  right: 8px;
  width: 220px;
  height: 240px;
  min-height: 120px;
  max-height: 50vh;
  background: rgba(20, 20, 20, 0.95);
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
  max-width: calc(100vw - 66px);
  max-height: calc(100vh - 82px);
  box-sizing: border-box;
}
#action-history-header {
  background: #333;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid #555;
  flex-shrink: 0;
}

#action-history-header .vt-window-action,
#wall-tool-header .vt-window-action,
#zone-tool-header .vt-window-action,
#control-box-header .vt-window-action,
#xml-editor-header .vt-window-action {
  float: right;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.7;
  margin-left: 8px;
}

#action-history-header .vt-window-action:hover,
#wall-tool-header .vt-window-action:hover,
#zone-tool-header .vt-window-action:hover,
#control-box-header .vt-window-action:hover,
#xml-editor-header .vt-window-action:hover {
  opacity: 1;
}

#action-history-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1;
  font-size: 11px;
}
#action-history-list li {
  padding: 2px 8px;
}
#action-history-list li.ah-undo {
  color: #aaddff;
}
#action-history-list li.ah-redo {
  color: #888;
  font-style: italic;
}
#action-history-list li.ah-current {
  color: #ffdd44;
  font-weight: bold;
  border-top: 1px solid #555;
  border-bottom: 1px solid #555;
  margin: 2px 0;
}

/* XML editor floating window */
#xml-editor-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  /* Transparent — clicks pass through to canvas */
  background: none;
  pointer-events: none;
}
#xml-editor-overlay.visible {
  display: block;
}
#xml-editor-box {
  pointer-events: all;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 4px;
  width: 400px;
  min-width: 400px;
  max-height: 80vh;
  height: 50vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  position: absolute;
  bottom: 34px;
  right: 0;
  top: auto;
  left: auto;
  resize: both;
  overflow: hidden;
  max-width: calc(100vw - 66px);
  max-height: calc(100vh - 82px);
}
#xml-editor-header {
  background: #333;
  color: #eee;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: move;
  user-select: none;
  border-bottom: 1px solid #555;
  flex-shrink: 0;
}
#xml-editor-box h4 {
  margin: 0 0 8px;
}
#xml-editor-tabs {
  border-bottom: 1px solid #ddd;
  margin-bottom: 0;
  flex-shrink: 0;
  padding: 0 10px;
}
#xml-editor-tabs li.active > a,
#xml-editor-tabs li.active > a:hover {
  background: #fff;
  border-bottom-color: #fff;
}
#xml-editor-tabs li.disabled > a {
  color: #aaa;
  cursor: not-allowed;
  pointer-events: none;
}
#xml-editor-content {
  flex: 1;
  min-height: 100px;
  font-family: monospace;
  font-size: 12px;
  resize: none;
  border: 1px solid #ccc;
  border-top: none;
  padding: 8px;
  white-space: pre;
  overflow: auto;
}
#xml-editor-box .xml-editor-actions {
  margin-top: 8px;
  padding: 0 10px 8px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
#xml-editor-error {
  padding: 4px 10px 0;
  color: #c00;
  font-size: 12px;
  display: none;
}

/* Toast notification */
#vt-toast {
  position: fixed;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40,40,40,0.92);
  color: #fff;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#vt-toast.vt-toast-show {
  opacity: 1;
}

.tooltip {
  z-index: 10000;
}

/* Info bar fixed-width value spans to prevent layout shift */
.info #cursor-x,
.info #cursor-y,
.info #anchor-x,
.info #anchor-y {
  display: inline-block;
  width: 64px;
  text-align: left;
}
.info #zoom {
  display: inline-block;
  width: 36px;
  text-align: right;
}
.info #spacing {
  display: inline-block;
  width: 36px;
  text-align: right;
}
.info-cursor-section {
  width: 234px;
  justify-content: center;
}
.info-grid-section,
.info-zoom-section,
.info-anchor-section {
  gap: 6px;
  justify-content: center;
}
.info-zoom-section {
  width: 208px;
}
.info-grid-section {
  width: 252px;
}
.info-anchor-section {
  width: 254px;
}
#grid-spacing-select,
#zoom-percent-select {
  height: 20px;
  min-width: 56px;
  color: #eee;
  background: #444;
  border: 1px solid #666;
  border-radius: 3px;
  font-size: 12px;
  padding: 0 4px;
}
#zoom-percent-select {
  min-width: 68px;
}
.info-icon-btn {
  width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #ddd;
  background: #444;
  border: 1px solid #666;
  border-radius: 3px;
  font-size: 11px;
}
.info-icon-btn:hover,
.info-icon-btn:focus,
.info-icon-btn.active {
  color: #fff;
  background: #555;
  border-color: #888;
}
.grid-control-spaced {
  margin-left: 8px;
}
.info-icon-btn.lock-state-locked {
  background: #7f2626;
  border-color: #d96565;
  color: #fff;
}
.info-icon-btn.lock-state-unlocked {
  background: #236b35;
  border-color: #65c77a;
  color: #fff;
}
.info-icon-btn.lock-state-locked:hover,
.info-icon-btn.lock-state-locked:focus {
  background: #9a3030;
  border-color: #f07f7f;
}
.info-icon-btn.lock-state-unlocked:hover,
.info-icon-btn.lock-state-unlocked:focus {
  background: #2b7f40;
  border-color: #7de392;
}
.disabled-button-tooltip {
  display: inline-flex;
  cursor: pointer;
}
.disabled-button-tooltip.disabled {
  cursor: not-allowed;
}
.disabled-button-tooltip.disabled > button {
  pointer-events: none;
}
.grid-size-lock-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.grid-size-lock-icon-locked {
  background-image: url('../images/Lock/Lock.png');
}
.grid-size-lock-icon-unlocked {
  background-image: url('../images/Lock/Unlock.png');
}
.info-section {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 4px;
}
.info-sep {
  opacity: 0.35;
  padding: 0 6px;
  user-select: none;
}

/* Wall height popover bar (hidden - replaced by wall-tool-window) */
#wall-height-bar {
  display: none;
}

/* Wall Tool and Zone Tool floating windows */
#wall-tool-window,
#zone-tool-window {
  position: fixed;
  left: 66px;
  top: 46px;
  min-width: 220px;
  max-width: 340px;
  background: rgba(245,245,245,0.98);
  color: #222;
  border: 1px solid #bbb;
  border-radius: 5px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.25);
  z-index: 300;
  font-size: 13px;
  resize: both;
  overflow: auto;
  max-width: calc(100vw - 66px);
  max-height: calc(100vh - 82px);
  box-sizing: border-box;
}
#wall-tool-window {
  width: 340px;
  height: 420px;
}
#zone-tool-window {
  width: 300px;
  height: 240px;
}

#wall-tool-header,
#zone-tool-header {
  background: rgba(220,220,220,0.98);
  padding: 5px 10px;
  cursor: move;
  user-select: none;
  font-weight: bold;
  border-bottom: 1px solid #bbb;
  border-radius: 5px 5px 0 0;
  color: #222;
}

#wall-tool-body,
#zone-tool-body {
  padding: 10px;
  display: grid;
  grid-template-columns: 42px 96px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}

.wall-tool-section {
  margin-bottom: 8px;
}

.wall-tool-mode-btn {
  width: 34px;
  height: 28px;
  padding: 3px 0;
  line-height: 20px;
  text-align: center;
}

.wall-tool-mode-btn i,
.wall-tool-mode-btn img {
  font-size: 14px;
  line-height: 20px;
  max-width: 18px;
  max-height: 18px;
  vertical-align: middle;
}

.wall-tool-mode-btn img {
  display: inline-block;
}

.tooltip .vt-tooltip-title {
  font-weight: bold;
}

.tooltip .vt-tooltip-desc {
  margin-top: 4px;
  max-width: 220px;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

#wall-tool-points-list {
  background: rgba(0,0,0,0.04);
  border-radius: 3px;
  padding: 4px;
}

#wall-tool-points-list .wtp-point,
#wall-tool-points-list .wtp-wall {
  padding: 2px 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  gap: 4px;
}

#wall-tool-points-list input {
  width: 52px;
  background: #fff;
  color: #222;
  border: 1px solid #bbb;
  border-radius: 2px;
  font-size: 11px;
  padding: 1px 3px;
}

#zone-tool-types-row {
  align-items: center;
}

#zone-tool-types-row .zone-type-btn {
  width: 34px;
  height: 34px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f6f6f6;
  border: 1px solid #aaa;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

#zone-tool-types-row .zone-type-btn:hover,
#zone-tool-types-row .zone-type-btn:focus {
  background: #fff;
  border-color: #666;
}

#zone-tool-types-row .zone-type-btn img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

#zone-tool-types-row .zone-type-btn.active-zone-type {
  background: #fff;
  border-color: #375ffc;
  outline: none;
  box-shadow: 0 0 0 2px rgba(55,95,252,0.35);
}

.vt-tool-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#wall-tool-body > .wall-tool-section:first-child,
#zone-tool-types-row {
  grid-column: 1;
  grid-row: 1 / span 20;
}

#zone-tool-settings {
  display: contents;
}

#wall-tool-status-row {
  grid-column: 2 / 4;
}

.vt-tool-grid-row {
  display: grid;
  grid-template-columns: 34px minmax(86px, 1fr) minmax(34px, auto);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  box-sizing: border-box;
}

button.vt-tool-grid-row,
#zone-tool-types-row .zone-type-btn.vt-tool-grid-row {
  width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 3px 0;
  line-height: 20px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

.vt-setting-row {
  display: contents;
}

.vt-tool-icon {
  width: 30px;
  min-width: 30px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.vt-tool-icon img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.vt-tool-name {
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
}

.vt-tool-input {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.wall-tool-mode-btn .vt-tool-name,
.wall-tool-mode-btn .vt-tool-input,
#zone-tool-types-row .zone-type-btn .vt-tool-name,
#zone-tool-types-row .zone-type-btn .vt-tool-input {
  display: none;
}

.vt-setting-row > .vt-tool-icon {
  display: none;
}

.vt-setting-row > .vt-tool-name {
  grid-column: 2;
  align-self: center;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.vt-setting-row > .vt-tool-input {
  grid-column: 3;
  justify-content: flex-start;
  align-self: center;
  min-height: 32px;
}

.vt-tool-choice-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #888;
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
  box-sizing: border-box;
}

.wall-tool-mode-btn.active .vt-tool-choice-dot,
#zone-tool-types-row .zone-type-btn.active-zone-type .vt-tool-choice-dot {
  background: #375ffc;
  border-color: #375ffc;
  box-shadow: 0 0 0 2px rgba(55,95,252,0.22);
}

#wall-tool-body .vt-setting-row input[type="number"],
#zone-tool-body .vt-setting-row input[type="number"] {
  width: 78px;
}

#dWallHeight {
  width: 62px;
}

#dWallText {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  font-family: monospace;
  font-size: 11px;
  box-sizing: border-box;
}

#wall-tool-points-list.vt-tool-input {
  grid-column: 2 / 4;
  display: block;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
}

#wall-tool-points-section > #wall-tool-points-label {
  grid-column: 2 / 4;
  align-items: flex-end;
  min-height: 22px;
}

.vt-tool-actions-row > .vt-tool-name,
.vt-tool-actions-row > .vt-tool-input {
  min-height: 0;
}

.vt-tool-actions {
  gap: 6px;
}

.vt-tool-actions .btn {
  flex: 1;
  min-width: 62px;
}

/* Action history clickable items */
#action-history-list li.ah-undo:hover,
#action-history-list li.ah-redo:hover {
  background: rgba(255,255,255,0.08);
  text-decoration: underline;
}

/* Toolbar new map / import / export — use image files */
.toolbar-newMap {
  background-image: none;
}
.toolbar-import {
  background-image: none;
}
.toolbar-export {
  background-image: none;
}
.toolbar-armawebtron-preview {
  background-image: none;
}
.toolbar-help-toggle {
  background-image: none;
}

#tool_bar a.toolbar-help-toggle,
#tool_bar a.toolbar-newMap,
#tool_bar a.toolbar-import,
#tool_bar a.toolbar-export,
#tool_bar a.toolbar-armawebtron-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

#tool_bar a.toolbar-help-toggle:hover,
#tool_bar a.toolbar-newMap:hover,
#tool_bar a.toolbar-import:hover,
#tool_bar a.toolbar-export:hover,
#tool_bar a.toolbar-armawebtron-preview:hover {
  background-color: #1b1b1b;
  text-decoration: none;
}

/* Context menu: standardized item size/spacing (matching copy/paste style) */
#contextMenu .dropdown-menu > li > a {
  display: block;
  padding: 5px 20px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #333;
  white-space: nowrap;
}
#contextMenu .dropdown-menu > li > a:hover,
#contextMenu .dropdown-menu > li > a:focus {
  text-decoration: none;
  color: #262626;
  background-color: #f5f5f5;
}

/* Keyboard shortcut labels in context menu */
.cm-shortcut {
  float: right;
  opacity: 0.55;
  font-size: 11px;
  margin-left: 16px;
  padding-top: 1px;
}

/* Context menu submenu */
#contextMenu .dropdown-submenu {
  position: relative;
}
#contextMenu .dropdown-submenu > a::after {
  content: " ▶";
  font-size: 10px;
  opacity: 0.6;
}
#contextMenu .cm-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -2px;
  min-width: 180px;
  z-index: 1001;
}
#contextMenu .dropdown-submenu:hover > .cm-submenu {
  display: block;
}
/* Flip submenu to left when context menu is near right edge */
#contextMenu.submenu-left .cm-submenu {
  left: auto;
  right: 100%;
}

/* Toolbar popovers */
#new-map-popover,
#armawebtron-preview-popover {
  position: fixed;
  z-index: 500;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.25);
  padding: 0;
  min-width: 210px;
}
#armawebtron-preview-popover {
  width: 330px;
}
.new-map-popover-body,
.armawebtron-preview-popover-body {
  padding: 12px 14px 10px;
}
.new-map-popover-body p,
.armawebtron-preview-popover-body p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
}
.armawebtron-preview-popover-body strong {
  display: block;
  margin-bottom: 6px;
}
.armawebtron-preview-popover-body ol {
  margin: 0 0 10px 18px;
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
}
.new-map-popover-actions,
.armawebtron-preview-popover-actions {
  display: flex;
  gap: 8px;
}
.armawebtron-preview-popover-actions {
  flex-wrap: wrap;
}

/* Dark theme overrides for new popover and XML header */

/* Configure tab section labels and dividers */
.cfg-section-label {
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  margin: 0 0 4px 0;
}
.cfg-divider {
  margin: 10px 0;
  border-color: #ddd;
}
.cfg-checkbox {
  margin: 2px 0;
}
.cfg-checkbox label {
  font-weight: normal;
  cursor: pointer;
}
.cfg-form-group {
  margin-bottom: 0;
}
.cfg-form-group label {
  font-size: 13px;
}
/* Top settings bar */
#top-settings-bar {
  position: absolute;
  top: 0;
  left: 50px;
  right: 0;
  height: 36px;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  gap: 6px;
  z-index: 5;
  font-size: 12px;
  box-sizing: border-box;
  overflow: hidden;
}

.top-settings-fields {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  overflow: hidden;
}

.tsb-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tsb-field label {
  margin: 0;
  font-weight: bold;
  white-space: nowrap;
  cursor: help;
  font-size: 12px;
  color: #444;
}

.tsb-input {
  height: 24px;
  padding: 0 6px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: 12px;
  background: #fff;
  color: #333;
  width: 110px;
  box-sizing: border-box;
}

.tsb-input-sm {
  width: 70px;
}

.tsb-input:focus {
  outline: none;
  border-color: #66afe9;
  box-shadow: 0 0 4px rgba(102,175,233,0.4);
}

.tsb-sep {
  opacity: 0.35;
  padding: 0 6px;
  user-select: none;
  flex-shrink: 0;
}

/* Action history toolbar button */
.toolbar-actionHistory:after {
  font-family: 'Glyphicons Halflings';
  content: "\e168";
  font-size: 16px;
  position: relative;
  top: 3px;
}

/* Axes field in top bar: inline checkbox alignment */
.tsb-field .form-check-input {
  margin: 0 2px 0 0;
  vertical-align: middle;
  position: static;
}

.grid-cfg-header {
  display: grid;
  grid-template-columns: 120px 110px 130px;
  gap: 4px 8px;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: bold;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.grid-cfg-row {
  display: grid;
  grid-template-columns: 120px 110px 130px;
  gap: 4px 8px;
  align-items: center;
  margin-bottom: 6px;
}
.grid-cfg-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}
.grid-cfg-label {
  font-size: 12px;
}

/* Map Settings search list hover */
#map-settings-dropdown .mss-item:hover {
  background: #f0f0ff;
}

.cfg-form-group .form-control {
  margin-top: 4px;
  max-width: 260px;
}
