/*
 * TODO: this file is getting big and could be split along its existing sections:
 *   nav.css            - base, nav, run button, profile/lang/theme dropdowns
 *   speed-slider.css   - widget toolbar + speed slider
 *   toolbar.css        - modern editor toolbar (edit interface/widget/camera/terrain)
 *   editor-layout.css  - editor-ui layout, panels, sidebars
 *   change-tracker.css - change-tracker toolbar
 *   responsive.css     - editor-specific media queries
 * Keeping it as one file for now to avoid touching the editor pre-rebase.
 */

/* Base & Nav */

html {
  overflow-y: auto;
}

body {
  overflow: visible;
  background-color: white;
  --minHeight: 16px;
  --fontSize: 14px;
  --lineHeight: 1.3;
  --fontFamily: "Arial";
  --hNotchHeight: 5px;
  --barHeight: 8px;
}

html.modal-open {
  overflow: clip;
}

main {
  position: relative;
  background-color: #ffffff;
  color: var(--color-text);
  padding-top: 1.25rem;
}

[data-theme="dark"] main,
[data-theme="dark"] #project_info,
[data-theme="dark"] #editorCanvas,
[data-theme="dark"] #wgtSpaceToolbar {
  background: #1f2937;
}

[data-theme="dark"] #project_info {
  border-bottom-color: #374151;
}

[data-theme="dark"] #wgtSpaceToolbar {
  border-bottom-color: #374151;
}

[data-theme="dark"] .proj-title { color: #f9fafb; }
[data-theme="dark"] .proj-desc { color: #d1d5db; }
[data-theme="dark"] .proj-details,
[data-theme="dark"] .proj-galleries li { color: #d1d5db; }
[data-theme="dark"] .proj-label,
[data-theme="dark"] .proj-galleries-heading,
[data-theme="dark"] .proj-galleries-empty { color: #9ca3af; }
[data-theme="dark"] .proj-sidebar,
[data-theme="dark"] .proj-galleries { border-left-color: #374151; }
[data-theme="dark"] .proj-hint { border-color: #6b7280; color: #9ca3af; }
[data-theme="dark"] .proj-title-input,
[data-theme="dark"] .proj-desc-input {
  background: #0a0e14;
  border-color: #374151;
  color: #f9fafb;
}
[data-theme="dark"] .proj-title-input::placeholder,
[data-theme="dark"] .proj-desc-input::placeholder { color: #9ca3af; }
[data-theme="dark"] .proj-actions button {
  background: transparent;
  border-color: #374151;
  color: #d1d5db;
}
[data-theme="dark"] .proj-actions button:hover {
  border-color: #6b7280;
}

[data-theme="dark"] .editor-toolbar-btn {
  background: #111827;
  border-color: #374151;
  color: #d1d5db;
}
[data-theme="dark"] .editor-toolbar-btn:hover {
  background: #1f2937;
  border-color: #4b5563;
  color: #f9fafb;
}

[data-theme="dark"] #speedSlider {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  border-color: #374151;
  color: #d1d5db;
}
[data-theme="dark"] #speedSliderLabel { color: #d1d5db; }
[data-theme="dark"] #speedSliderValue {
  background: #0a0e14;
  border-color: #374151;
  color: #f9fafb;
}
[data-theme="dark"] #speedSliderButton {
  background: #4b5563;
  border-color: #6b7280;
  color: #f9fafb;
}
[data-theme="dark"] #speedSliderButton:hover {
  background: #6b7280;
  border-color: #9ca3af;
}
[data-theme="dark"] #speedSliderButton.wgt-editor-toggled {
  background: #4b5563;
  border-color: #6b7280;
  color: #f9fafb;
}
[data-theme="dark"] #speedSliderButton .wgt-editor-btnicon {
  background-color: #f9fafb;
}

[data-theme="high-contrast"] main,
[data-theme="high-contrast"] #editor-ui,
[data-theme="high-contrast"] #project_info,
[data-theme="high-contrast"] #container {
  background: var(--color-bg);
  color: var(--color-text);
}

[data-theme="high-contrast"] #project_info,
[data-theme="high-contrast"] .proj-title-input,
[data-theme="high-contrast"] .proj-desc-input,
[data-theme="high-contrast"] .proj-actions button {
  border-color: var(--color-border);
}

[data-theme="high-contrast"] .proj-details,
[data-theme="high-contrast"] .proj-label,
[data-theme="high-contrast"] .proj-hint,
[data-theme="high-contrast"] .proj-title-input,
[data-theme="high-contrast"] .proj-desc-input,
[data-theme="high-contrast"] .proj-actions button {
  color: var(--color-text);
}

[data-theme="high-contrast"] .proj-title-input,
[data-theme="high-contrast"] .proj-desc-input,
[data-theme="high-contrast"] .proj-actions button {
  background: var(--color-bg);
}

[data-theme="high-contrast"] .proj-details a,
[data-theme="high-contrast"] .proj-details-link,
[data-theme="high-contrast"] .proj-galleries a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Theme toggle (editor only) */

.theme-state {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

#theme-toggle[data-theme="light"] .theme-state-dark {
  display: none;
}

#theme-toggle[data-theme="dark"] .theme-state-light {
  display: none;
}

#theme-toggle[data-theme="high-contrast"] .theme-state-light,
#theme-toggle[data-theme="high-contrast"] .theme-state-dark {
  display: none;
}

#theme-toggle[data-theme="high-contrast"]::after {
  content: "High Contrast";
}

.theme-icon-sun,
.theme-icon-moon {
  display: none;
  align-items: center;
  justify-content: center;
}

html[data-theme="light"] .theme-icon-sun {
  display: flex;
}

html[data-theme="light"] .icon-mask.theme-icon-sun {
  display: inline-block;
}

html[data-theme="dark"] .theme-icon-moon {
  display: flex;
}

html[data-theme="dark"] .icon-mask.theme-icon-moon {
  display: inline-block;
}

.icon-play {
  -webkit-mask-image: url('../../../weblogo/bin-debug/images/icons/icon-play.svg');
  mask-image: url('../../../weblogo/bin-debug/images/icons/icon-play.svg');
}

.icon-pause {
  -webkit-mask-image: url('../../../weblogo/bin-debug/images/icons/icon-pause.svg');
  mask-image: url('../../../weblogo/bin-debug/images/icons/icon-pause.svg');
}

.site-footer {
  position: relative;
  z-index: 1;
}

.nav-center {
  justify-content: flex-start;
  margin-left: 1.5rem;
  align-self: stretch;
}

.nav-center .nav {
  align-self: stretch;
}

.nav-center .nav a,
.nav-center .nav button {
  font-size: 14px;
}

.nav-center .nav a:hover,
.nav-center .nav button:hover {
  background: none;
}

.nav-center .nav #runLi {
  display: inline-flex;
  align-self: stretch;
  align-items: stretch;
  --nav-pad-y: 8px;
  margin-top: calc(-1 * var(--nav-pad-y));
  margin-bottom: calc(-1 * var(--nav-pad-y));
}

.nav-center .nav #runLi > button {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  height: 100%;
  background: transparent;
  border-radius: 0;
}

.nav-center .nav #runLi.runBtnGood,
.nav-center .nav #runLi.runBtnBad {
  border-radius: 0;
}

.nav-center .nav #runLi.runBtnGood { background-color: #2c7020; }
.nav-center .nav #runLi.runBtnGood:hover { background-color: #59e140; }
.nav-center .nav #runLi.runBtnBad { background-color: #590000; }
.nav-center .nav #runLi.runBtnBad:hover { background-color: #b80000; }

.nav-center .nav #runLi.runBtnGood > button,
.nav-center .nav #runLi.runBtnBad > button {
  color: #fff;
}

.nav-center .nav #statusBarLi {
  display: none;
}

.nav-right,
.nav-right a,
.nav-right button,
.lang-btn,
.profile-btn {
  font-size: 14px;
}

/* Widget toolbar (legacy buttons hidden, speed restored) */

#wgtSpaceToolbar .wgt-space-toolbar-item {
  display: none;
}

#speedSlider {
  display: inline-flex !important;
  order: 2;
  margin-left: auto;
  align-items: center;
  gap: 7px;
  height: 25px;
  padding: 0 5px 0 4px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: linear-gradient(180deg, #e5e7eb 0%, #d7dce3 100%);
  color: #334155;
  white-space: nowrap;
  box-sizing: border-box;
}

#speedSliderLabel {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.speedSliderRail {
  flex: 0 0 150px;
  display: flex;
  align-items: center;
  height: 100%;
}

#slider {
  display: block;
  width: 100%;
  height: 14px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

#slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
}

#slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
}

#speedSliderValue {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 54px;
  width: 54px;
  padding: 3px 10px 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f3f4f6;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  overflow: hidden;
  appearance: textfield;
  -moz-appearance: textfield;
  font-family: inherit;
  outline: none;
}

#speedSliderValue:focus {
  border-color: #94a3b8;
  background: #ffffff;
}

#speedSliderValue::-webkit-outer-spin-button,
#speedSliderValue::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#speedSliderButton {
  margin-left: 2px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: none;
  color: #475569;
}

#speedSliderButton.wgt-editor-roundbtn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
}

#speedSliderButton:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

#speedSliderButton.wgt-editor-toggled {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #475569;
}

#speedSliderButton .wgt-editor-btnicon {
  background-color: #475569;
}

/* Modern toolbar */

#wgtSpaceToolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 3px 12px;
  background: var(--editor-surface, #fff);
  border-bottom: 1px solid var(--editor-border, #d1d5db);
  overflow: visible;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  order: 1;
  gap: 3px;
  padding: 3px 10px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.editor-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--editor-border, #bbb);
  border-radius: 4px;
  background: var(--editor-surface, #fff);
  cursor: pointer;
  color: var(--editor-text-muted, #555);
  font-size: 13px;
  font-weight: 400;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  position: relative;
}

.editor-toolbar-btn:hover {
  background: var(--editor-hover, #f5f5f5);
  color: var(--editor-text, #222);
  border-color: var(--editor-border-strong, #bbb);
}

.editor-toolbar-btn.is-active {
  background: #eef4ff;
  border-color: #93b5e0;
  color: #1e40af;
}

.editor-toolbar-btn img,
.editor-toolbar-btn svg {
  display: block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.editor-toolbar-btn[hidden] {
  display: none;
}

.editor-toolbar-divider {
  width: 1px;
  height: 14px;
  background: var(--editor-border, #d1d5db);
  margin: 0 2px;
}

/* Create widget dropdown */
.editor-toolbar-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--editor-surface, #fff);
  border: 1px solid var(--editor-border, #d1d5db);
  border-radius: 6px;
  padding: 4px;
  min-width: 150px;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.editor-toolbar-dropdown.is-open {
  display: flex;
}

.editor-toolbar-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--editor-text, #333);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  background: transparent;
}

.editor-toolbar-dropdown-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--editor-text-subtle, #6b7280);
}

.editor-toolbar-dropdown-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.editor-toolbar-dropdown button:hover {
  background: var(--editor-hover, #f3f4f6);
  color: var(--editor-text, #111);
}

/* Engine speed control */
.engine-speed-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--editor-border, #d1d5db);
  border-radius: 4px;
  background: var(--editor-surface, #fff);
  color: var(--editor-text-muted, #555);
  font-size: 12px;
}

.engine-speed-label {
  color: var(--editor-text-muted, #555);
  font-weight: 500;
}

.engine-speed-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: var(--editor-surface-3, #e5e7eb);
  outline: none;
  cursor: pointer;
}

.engine-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--editor-accent, #4a7c29);
  border: none;
  cursor: pointer;
}

.engine-speed-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--editor-accent, #4a7c29);
  border: none;
  cursor: pointer;
}

.engine-speed-value {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--editor-text, #111);
}

.engine-speed-input {
  width: 48px;
  padding: 2px 4px;
  border: 1px solid var(--editor-border, #d1d5db);
  border-radius: 3px;
  background: var(--editor-field, #fff);
  color: var(--editor-text, #111);
  font-size: 12px;
  font-family: inherit;
  text-align: right;
}

.engine-speed-input::-webkit-inner-spin-button,
.engine-speed-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.engine-speed-unit {
  color: var(--editor-text-subtle, #6b7280);
  font-size: 11px;
}

@media (max-width: 960px) {
  #speedSlider {
    gap: 8px;
    padding: 5px 9px;
  }

  .speedSliderRail {
    flex-basis: 110px;
  }
}

@media (max-width: 760px) {
  #speedSlider {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  #speedSliderLabel {
    display: none;
  }
}

/* Editor layout */

#editor-ui {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#editor-ui > section {
  min-width: 0;
}

/* Project info bar */
#project_info {
  width: 100%;
  margin: 0;
  padding: 24px 24px 28px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.proj-info {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.proj-sidebar {
  flex: 0 0 auto;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 1px solid #e5e7eb;
  padding-left: 24px;
}

.proj-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #1f2937;
}

.proj-label {
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

.proj-details a { color: #669934; }

.proj-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid #9ca3af;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
  top: -1px;
}

.proj-hint:hover::after {
  content: attr(data-hint);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  background: #1e1e1e;
  color: #d4d4d4;
  font-size: 12px;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 10px 14px;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  width: 320px;
  white-space: pre-line;
  line-height: 1.6;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.proj-details-link {
  font-size: 12px;
  color: #669934;
  text-decoration: none;
  margin-top: auto;
}

.proj-details-link:hover {
  color: #5a8930;
  text-decoration: underline;
}

.proj-galleries {
  flex: 0 1 auto;
  min-width: 140px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid #e5e7eb;
  padding-left: 24px;
}

.proj-galleries-heading {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proj-galleries ul {
  margin: 0;
  padding: 0;
  padding-right: 12px;
  list-style: none;
  overflow-y: auto;
  max-height: 120px;
  font-size: 13px;
  line-height: 1.6;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.proj-galleries ul::-webkit-scrollbar,
.proj-desc-input::-webkit-scrollbar { width: 8px; background: transparent; }
.proj-galleries ul::-webkit-scrollbar-thumb,
.proj-desc-input::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.proj-galleries ul::-webkit-scrollbar-thumb:hover,
.proj-desc-input::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.35); }

.proj-galleries li {
  color: #1f2937;
  word-break: break-word;
}

.proj-galleries a {
  color: #669934;
}

.proj-galleries-empty {
  font-size: 13px;
  color: #9ca3af;
}

.proj-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proj-actions button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-align: left;
}

.proj-actions button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.proj-actions button.is-active {
  background: #669934;
  color: #fff;
  border-color: #669934;
}

.proj-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.proj-desc {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  max-height: 240px;
  overflow-y: auto;
}

.proj-desc p { margin: 0; }

.proj-title-input,
.proj-desc-input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #fff;
}

.proj-title-input { font-weight: 600; }

.proj-desc-input {
  resize: vertical;
  min-height: 100px;
  flex: 1 1 auto;
  line-height: 1.5;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

[data-theme="dark"] .proj-desc-input { scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
[data-theme="dark"] .proj-desc-input::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); }
[data-theme="dark"] .proj-desc-input::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

.proj-title-input::placeholder,
.proj-desc-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.proj-title-input:focus, .proj-desc-input:focus {
  border-color: #9ca3af;
}

/* Play mode */
#editor-ui.play-mode .proj-title-input {
  border-color: transparent;
  background: transparent;
}

#editor-ui.play-mode .proj-desc-input {
  border-color: transparent;
  background: transparent;
  resize: none;
}

#editor-ui.play-mode .proj-title-input::placeholder,
#editor-ui.play-mode .proj-desc-input::placeholder { color: transparent; }

#editor-ui.play-mode #blockWS {
  visibility: hidden;
  height: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

#editor-ui.play-mode #editorBlocks { margin: 0; }

#editor-ui.play-mode { gap: 0; }
#editor-ui.play-mode .edit-only { display: none; }

#playModeBtn.is-active { background: #669934; color: #fff; border-color: #669934; }

#editorCanvas,
#editorBlocks {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

#editorBlocks {
  min-height: 0;
  padding: 0;
  margin-top: 8px;
  margin-bottom: 5px;
  overflow-x: clip;
  overflow-anchor: none;
}

#container {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 600px;
  height: min(70vh, 760px);
  padding: 0;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #edf3ff 0%, #f8fafc 100%);
}

#editorCanvasStage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
}

#blockWS,
#blockWS .sbPageHolder,
#blockWS .sbPage,
#blockWS .sbPageV3 {
  overflow-anchor: none;
}

#editorCanvasStage > #widgetContainer,
#editorCanvasStage > canvas {
  grid-area: 1 / 1;
}

#editorCanvasStage > canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

#editorCanvasStage > #widgetContainer {
  min-height: 0;
  min-width: 0;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

#editorCanvasStage > #widgetContainer > * {
  pointer-events: auto;
}

/* Change tracker toolbar */

#slnToolBar {
  display: flex;
  align-items: center;
  position: relative;
  gap: 2px;
  margin-left: auto;
  margin-right: clamp(1.5rem, 6vw, 6rem);
}

#slnToolBar .sln-navbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

#slnToolBar .sln-navbar-btn > span:not(.icon-mask) {
  display: block;
  line-height: 1.2;
}

#slnToolBar .sln-navbar-btn:hover {
  color: #e5e7eb;
}

#slnToolBar .sln-navbar-btn .icon-mask {
  width: 16px;
  height: 16px;
  min-width: 16px;
}

#slnToolBar #slnChanges {
  all: initial;
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-darker, #1a1a2e);
  border: 1px solid var(--gray-700, #374151);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-600, #4b5563) transparent;
  font-family: inherit;
  box-sizing: border-box;
}

#slnToolBar #slnChanges.slnClosed { max-height: 0; overflow: hidden; border: none; box-shadow: none; }

#slnToolBar #slnChangeList { all: initial; display: block; padding: 4px 0; margin: 0; font-family: inherit; }

#slnToolBar #slnChangeList li {
  all: initial;
  display: block;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  color: var(--gray-400, #9ca3af);
  border-left: 2px solid transparent;
}

#slnToolBar .sln-undo-pointer {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary, #e2e8f0);
  font-weight: 600;
  border-left-color: #3b82f6;
}

#slnToolBar .sln-undo-pointer:before { display: none; }

#slnToolBar .sln-redo {
  color: var(--gray-600, #4b5563);
  font-style: italic;
}

#slnToolBar .sln-nochanges { color: var(--gray-500, #6b7280); }

/* Responsive (editor-specific only; nav handled by components.css) */

@media (max-width: 1200px) {
  #slnToolBar .sln-navbar-btn > span:not(.icon-mask) { display: none; }
  #slnToolBar .sln-navbar-btn { padding: 0.375rem; }
}

@media (max-width: 1000px) {
  #slnToolBar { display: none; }
}

@media (max-width: 900px) {
  #container { height: min(62vh, 640px); }
}
