/* Ensure html and body cover full viewport height */
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;

  /* Prevent body scroll by default */
}

@media (max-width: 768px) {
  #container .row {
    flex-wrap: wrap;
  }

  #container button,
  #container select,
  #container input {
    font-size: 0.9rem;
  }
}

.bg-success {
  background-color: #2b2727 !important;
}

/* Reduce font size of sub-accordion headers */
#accordionFlushRegions .accordion-button {
  font-size: 0.85rem;
  /* or use clamp for responsiveness */
  padding: 0.4rem 0.75rem;
  /* smaller padding for compact look */
}

/* Optional: reduce font size of body text as well */
#accordionFlushRegions .accordion-body {
  font-size: 0.85rem;
  background-color: #f5f5f5;
  color: #000000;

  font-weight: bold;
}

#accordionFlushExample {
  border: 2px ridge #bbb;
}
.accordion-body {
  background-color: #f5f5f5;
  color: #333;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
}

.accordion-collapse {
  transition: transform 0.1s ease;
}

.accordion-collapse.collapsing {
  transform: scale(0);
}

.accordion-collapse.show {
  transform: scale(1);
}

/* Target the button when it is in the expanded state */
.accordion-button:not(.collapsed) {
  background: linear-gradient(to left, #d0d0d0, #a8a8aa) !important;
  color: #000 !important;
}

.accordion-button {
  background-color: #a8a8aa !important;
  color: #000 !important;
  font-weight: 400 !important;
  font-size: clamp(0.9rem, 1.2vw, 1.2rem);
  /* 👈 responsive */
}

.accordion-button:hover {
  color: #ffffff !important;
}

.accordion-header {
  border: 1px solid #dee2e6;
}
@media (max-width: 768px) {
  .accordion-button {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .accordion-button {
    font-size: 0.8rem;
  }
}
.accordion-button:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.form-check-label1 {
  font-size: x-small;
  color: #000000;

  font-weight: bold;
}

.form-check-label {
  font-size: x-small;
}

.form-check-label:hover {
  font-weight: bold;
  cursor: pointer;
}

.form-check-input:checked + .form-check-label {
  font-weight: bold;
  color: #000000;
  cursor: pointer;
}

.form-check-input:hover + .form-check-label {
  font-weight: bold;
  cursor: pointer;
}
.form-check-input:checked {
  background-color: #a8a8aa !important;
  border-color: #d0d0d0 !important;
}
/* Ensure time display wraps properly */
.time-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.time-panel {
  position: relative;
  width: 100%;
  height: 50px;
  background-color: #000000;
  border: 1px solid #ccc;
  overflow: hidden;
}

.time-line {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid #000;
}

.small-line {
  height: 20%;
  background-color: #000;
}

.large-line {
  height: 40%;
  background-color: #000;
}

.label {
  position: absolute;
  bottom: 0;
  font-size: 10px;
  transform: translateX(-50%);
}

#page-loader {
  position: fixed;
  /* Use fixed instead of absolute for centering in the viewport */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Center the div both horizontally and vertically */
  z-index: 100000;
  display: none;
  text-align: center;
  width: 100%;
  max-width: 600px;
  /* Adjust the max-width as needed */
  padding-top: 25px;
  background-color: rgba(255, 255, 255, 0.9);
}

/* Main container to allow scrolling */
.main-container {
  height: 100vh;
  /* Full viewport height */
  background-color: #8d8e97;
}

#container {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background-color: black;
}

#neuronCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid #8a8a8a;
  border: 2px groove #bbb;
  padding: 0px;
}

.txt {
  padding: 7px;
  border-radius: 6px;
  font-size: 16px;
  background: #fbfbfb;
  border: 2px solid transparent;
  height: 36px;
  box-shadow: 0 0 0 1px #dddddd, 0 2px 4px 0 rgb(0 0 0 / 7%), 0 1px 1.5px 0 rgb(0 0 0 / 5%);

  :focus {
    border: 2px solid #000;
    border-radius: 4px;
  }
}

#loader {
  border: 12px solid #f3f3f3;
  border-radius: 50%;
  border-top: 12px solid #444444;
  width: 70px;
  height: 70px;
  animation: spin 1s linear infinite;
}

.center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.Heading h3 {
  text-align: center;
  color: #fff;
  font-family: FreeMono, monospace;
}

.fieldset {
  position: relative;
  border: 1px solid #000000;
  padding: 15px;
  margin-top: 20px;
}

.fieldset h1 {
  position: absolute;
  top: 0;
  font-size: 12px;
  line-height: 1;
  margin: -9px 0 0;
  /* half of font-size */
  background: #fff;
  color: #000000;
  padding: 0 5px;
}

#lbltimestamp {
  font-size: 14px;
  color: #000;
}

body {
  overflow: hidden;
  margin: 0;
}

#btnTrench {
  position: absolute;
  margin: 10px;
}

.progressbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  counter-reset: step;
}

.progressbar::before,
.progress {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  background: #000000;
  z-index: -1;
}

.progress {
  background-color: #fff;
  color: #000000;
  width: 0%;
  transition: 1s;
}

.progress-step {
  width: 2.8rem;
  height: 2.8rem;
  background-color: #000000;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.progress-step:hover {
  cursor: pointer;
  background-color: #fff;
  color: #2a6b38;
  transition: 0.3s;
  box-shadow: 0px 0px 8px #fff;
}

.progress-step::before {
  counter-increment: step;
  content: counter(step);
}

.progress-step::after {
  content: attr(data-title);
  position: absolute;
  top: calc(100% + 0.25rem);
  font-size: 0.6rem;
}

.progress-step-active {
  background-color: #ffffff;
  color: #000000;
}

#panel #gui {
  width: 100%;

  padding: 10px;
  background-color: #b8b8b7 !important;
}

.children {
  color: #000;
  background-color: #b8b8b7;
}

#gui .title {
  color: #000;
  background-color: #a8a8aa;
  font-size: small;
}

.controller {
  background-color: #a8a8aa;
  color: #000;
  font-size: small;
}

.fill {
  color: #000;
  background-color: #3c4050;
}

.children input {
  background-color: #b8b8b7;
  color: #000 !important;
  margin-top: 1px;
  padding-top: 1px;
}

input[type="number"][step="any"][aria-labelledby="lil-gui-name-2"] {
  background-color: #b8b8b7;
  color: #000 !important;
  margin-top: 1px;
  padding-top: 1px;
}

input[type="number"][step="any"][aria-labelledby="lil-gui-name-3"] {
  background-color: #b8b8b7;

  color: #000 !important;
  margin-top: 1px;
  padding-top: 1px;
}

input[type="number"][step="any"][aria-labelledby="lil-gui-name-4"] {
  background-color: #b8b8b7;
  color: #000 !important;
  margin-top: 1px;
  padding-top: 1px;
}

input[type="number"][step="any"][aria-labelledby="lil-gui-name-5"] {
  background-color: #b8b8b7;
  color: #000 !important;
  margin-top: 1px;
  padding-top: 1px;
}

/* Style the dropdowns */
select {
  width: 60px;
  /* Reduce the width of the dropdown */

  font-size: 12px;
  /* Reduce the text size inside the dropdown */
  margin: 0px;
  padding: 0px;
}

/* Optional: Add some spacing between form elements */
#color-selectordg,
#color-selectorca1,
#color-selectorca2,
#color-selectorca3,
#color-selectorsub,
#color-selectorec {
  margin-bottom: 10px;
  /* Add space between each label and dropdown pair */
}

.btn-success {
  background-color: #abaaa0 !important;
  color: #000 !important;
  border: none !important;
  padding: 8px 18px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  transition: background-color 0.3s ease, transform 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  cursor: pointer !important;
}

.btn-success:hover {
  background-color: #97979c !important;

  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

#myImg {
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

#myImg:hover {
  opacity: 0.7;
}

/* The Modal (background) */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 99999;
  /* Sit on top */
  padding-top: 100px;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgb(0, 0, 0);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.9);
  /* Black w/ opacity */
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: 100%;
  max-width: 1000px;
}

/* Caption of Modal Image */
#caption {
  margin: auto;
  display: block;
  width: 100%;
  max-width: 1000px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation */
.modal-content,
#caption {
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
  from {
    -webkit-transform: scale(0);
  }

  to {
    -webkit-transform: scale(1);
  }
}

@keyframes zoom {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 1000px) {
  .modal-content {
    width: 100%;
  }
}

#ddactivity_chunks {
  transition: 0.4s;
  /* background-color: #a8a8aa; */
  min-width: 300px;
}

#ddactivity_chunks option {
  padding: 1px;
  font-weight: bold;
}

input[type="range"] {
  width: 100%;
  cursor: pointer;
}

.btnstyle {
  /* background: linear-gradient(to bottom, #bababa 40%, #97979c 100%); */
  background-color: #5f636e;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 3px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.btnstyle:hover {
  background-color: #97979c;
  /* background: linear-gradient(to bottom, #bababa 10%, #97979c 100%); */
  color: #ffffff;
  transform: translateY(-1px);
}

.playback-settings {
  display: flex;
  flex-direction: column;
  /* Stack vertically. Use row for horizontal. */
  gap: 1px;
  padding: 10px;
  font-family: Arial, sans-serif;
}

.config-item {
  display: flex;
  flex-direction: column;
}

.config-item label {
  font-size: 14px;
  font-weight: 500;
  color: #f0f0f0;
  /* Adjust for dark/light themes */
  margin-bottom: 5px;
}

.config-item input {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #222;
  /* Dark input background */
  color: #fff;
  outline: none;
}

.config-item input:focus {
  border-color: #4caf50;
  box-shadow: 0 0 5px #4caf50;
}

.sidebar {
  height: 29%;
  width: 0;
  position: fixed;
  top: 160;
  right: 0;
  overflow-x: hidden;
  padding: 50px 0px 0px 0px;
  z-index: 1000;
  display: none;
}

.sidebar a {
  position: absolute;
  top: 7;
  left: 20;
  font-size: 30px;
  color: #fff;
  text-decoration: none;
}

.sidebar a:hover {
  color: #4caf50;
}

.sidebar input,
.sidebar label {
  display: block;
  margin-bottom: 1px;
  color: white;
  font-size: 12px;
  width: 170;
}

.togglePlaybackduringBtn {
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #000000;
  color: white;
  padding: 10px 15px;
  border: 2px solid transparent;
  cursor: pointer;
  border-radius: 5px;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 100, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 100, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 100, 0);
  }
}

.togglePlaybackduringBtn:hover {
  background-color: #333;
  /* transform: scale(1.05); */

  /* background-color: #227634; */
  border: 1px solid #fff;
}

#btnopen {
  display: none;
  position: absolute;
  right: 0.1rem;
  top: 0.2rem;

  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background-color: #111;
  border: none;
  cursor: pointer;
  text-align: center;
  z-index: 1000;
  width: auto;
  min-width: 8vw;
  max-width: 20vw;
}

/* Hover effect */
#btnopen:hover {
  background-color: #333;
}

.time-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 20px;
}

.time-display label {
  margin: 0;
}

.styled-label {
  font-size: 14px;

  color: #000000;
  margin: 0 6px;
  display: flex;
  flex-direction: column;
  min-width: 70px;
}

/* Responsive input container */
.input-group-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.styled-input {
  width: 100%;
  max-width: 80px;
  padding: 2px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  color: #000000;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 3px;
}

/* Responsive time display */
.simulation-container {
  width: 100%;
}

#time {
  font-size: 17px;
  font-weight: bold;
  font-family: sans-serif;
}

.color-select {
  width: 100%;
  padding: 1px 3px;
  font-size: 0.75rem;
  height: 28px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
}

.select-row .col-md-2 {
  padding: 2px;
}

.select-row {
  margin-bottom: 5px;
}

#panel {
  background: #b8b8b7;
  position: fixed;
  left: 25.2%;
  top: 13rem;
  width: 18vw;
  height: auto;
  z-index: 1000;
  padding: 0px;
  transform: translateY(-20px);
  border: 2px solid #2d313f;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  font-size: 14px;
}

#togglePanelBtn {
  display: none;
  position: fixed;
  top: 9.1rem;
  left: 25.3%;
  width: auto;
  min-width: 8vw;
  max-width: 20vw;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background-color: #111;
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  z-index: 1000;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Hover effect */
#togglePanelBtn:hover {
  background-color: #333;
}

@media (max-width: 576px) {
  #togglePanelBtn {
    top: 1rem;
    left: 1rem;
    width: 80vw;
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  #panel {
    width: 90vw;
    left: 1rem;
    top: 3.5rem;
    position: fixed;
    background-color: #222;
    color: white;
    z-index: 999;
    padding: 10px;
  }
}
@media (min-width: 577px) and (max-width: 768px) {
  #togglePanelBtn {
    top: 2rem;
    left: 5%;
    width: 60vw;
    font-size: 0.8rem;
    padding: 9px 14px;
  }

  #panel {
    width: 65vw;
    left: 5%;
    top: 4.5rem;
    position: fixed;
    background-color: #222;
    color: white;
    z-index: 999;
    padding: 12px;
  }
}

.visualizer-title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  font-family: "Segoe UI", Roboto, sans-serif;

  transition: all 0.3s ease-in-out;
}

/* Responsive scaling */
@media (max-width: 768px) {
  .visualizer-title {
    font-size: 1.5rem;
  }
}

#Neurons_firing_attributes {
  font-family: "Segoe UI", sans-serif;
  background-color: #33373d;
  border-bottom: 2px solid #8a8a8a;
  border: 2px outset #bbb;
  visibility: hidden;
  color: #fff;
  position: relative;
  margin: 1px;
  height: auto;
}

.btnstyle:active {
  transform: scale(0.98);
  box-shadow: none;
}

.btnstyle:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.btnstyle:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}
.histogram-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

#histogramImage {
  display: none;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: fill;
  background-color: #33373d;
  border: 2px outset #bbb;
  margin: 2px auto;
  cursor: pointer;
}

#histChart {
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  object-fit: fill;
  background-color: #33373d;
  color: white;
  border: 2px outset #bbb;
  margin: 2px auto;
  cursor: pointer;
}

.histogram-container button {
  float: right;
}
.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
}
.btn-icon:hover {
  border-color: #586074 !important;
}

#networkspikes {
  position: fixed;
  bottom: 1.5rem;

  right: 1rem;

  z-index: 999;

  gap: 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  visibility: hidden;
}

@media (max-width: 768px) {
  #networkspikes {
    flex-direction: column;
    align-items: flex-end;
  }
}

@media (max-width: 576px) {
  #btnnetworkFileInput,
  #btnactivityFileInput {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

#spikeTableWidget {
  position: fixed; /* REQUIRED */
  transform: translateY(50%); /* center horizontally */
  top: 8rem; /* distance from bottom */

  z-index: 999;

  display: flex;
  flex-direction: row;
  align-items: center;

  visibility: visible;
}

#spikeTable {
  font-size: 0.8rem; /* smaller text */
}

#spikeTable th,
#spikeTable td {
  padding: 2px 4px; /* reduce cell padding */
}

/* Hidden by default */
#playback-container,
.playback-container {
  display: none;
}

/* Main container */
.playback-container {
  background: #b8b8b7;
  color: #000;
  position: fixed;
  top: 13rem;

  right: 0.4rem;
  width: 15vw;
  max-width: 300px;
  min-width: 200px;
  padding: 1rem;
  border: 2px solid #2d313f;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  overflow-y: auto;
  font-size: 14px;
}

/* Labels */
label {
  font-size: 0.8rem;
  display: block;
}

/* Slider + Value input */
.slider-wrapper {
  display: flex;

  align-items: center;
  gap: 0.1rem;
}

/* Range input styling */
.slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 28px;
  background: #2b2727;
  border-radius: 4px;
  outline: none;
  transition: background 0.3s ease;
}

/* Webkit Thumb */
.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 24px;
  width: 2px;
  background: #00aaff;
  border-radius: 2px;
  cursor: pointer;
}

/* Firefox Thumb */
.slider-wrapper input[type="range"]::-moz-range-thumb {
  height: 24px;
  width: 8px;
  background: #00aaff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
}

.slider-wrapper input[type="range"]::-moz-range-track {
  background: #2b2727;
  height: 8px;
  border-radius: 4px;
}

/* Value display box */
.value-box {
  background-color: #abacac;
  color: #000;
  padding: 4px 8px;
  width: 80px;
  border-radius: 4px;
  border: none;
  font-size: 0.9rem;
}

/* Custom scrollbar */
.playback-container::-webkit-scrollbar {
  width: 4px;
}

.playback-container::-webkit-scrollbar-track {
  background: #abaaa0;
}

.playback-container::-webkit-scrollbar-thumb {
  background-color: #b8b8b7;
  border-radius: 4px;
}

/* Tablet view */
@media (max-width: 768px) {
  .playback-container {
    width: 80vw;
    right: 1rem;
    padding: 0.75rem;
  }

  .value-box {
    width: 60px;
    font-size: 0.85rem;
  }
}

/* Mobile view */
@media (max-width: 500px) {
  .playback-container {
    width: 95vw;
    left: 0.5rem;
    right: 0.5rem;
    padding: 0.75rem;
    font-size: 13px;
  }

  .slider-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .value-box {
    width: 100%;
    font-size: 0.85rem;
    padding: 4px;
  }
}

/* end */

.header-icon {
  height: 24px;
  margin-left: 10px;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.header-icon:first-child {
  margin-left: 10;
  /* No margin for the first icon */
}

.header-icon-link:hover .header-icon {
  transform: scale(1.2);
  /* Slight zoom effect on hover */
}

.job-button {
  color: black !important;
  width: 100%;
  padding: 0.75rem !important;
  text-align: center;
  border: solid darkgray 2px !important;
  background-color: lightgray !important;
}

.job-success {
  background-color: #a5ffa5 !important;
}

.job-success:hover {
  background-color: #12da12 !important;
}

.job-pending {
  background-color: #fff4a3 !important;
}

.job-pending:hover {
  background-color: #e0c91d !important;
}

.job-failed {
  background-color: #ff6b6b !important;
}

.job-failed:hover {
  background-color: #d91313 !important;
}

.region-labels {
  font-size: 0.5rem; /* or try 0.5rem for extra small */

  color: #555;
}
.color-circle {
  width: 25px;
  height: 25px;
  border-radius: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  overflow: hidden;
}
.color-select-mini {
  font-size: 11px;
  padding: 2px 4px;
  height: 26px;
  line-height: 1.1;
  border-radius: 2px;
}

.color-select-mini option {
  font-size: 8px;
  padding: 2px;
}

.custom-header {
  font-family: "Segoe UI", sans-serif;

  background: linear-gradient(to bottom, #d0d0d0, #a8a8aa);

  border-bottom: 2px solid #8a8a8a;
  border: 1px outset #bbb;
}

.ncv-btn {
  width: 2rem; /* scalable instead of fixed px */
  aspect-ratio: 1 / 1; /* always square */
  padding: 0;
  background: #2d313f;
  color: #fff;
  border: 1px solid #3f4553;
  border-radius: 0.5rem;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}

.ncv-btn i {
  font-size: 90%; /* scales with button size */
  line-height: 1;
  display: block;
}

.ncv-btn:hover {
  background: #3a4050;
  border-color: #586074;
}
.ncv-btn:active {
  transform: translateY(1px);
}

/* Inputs */
.ncv-input {
  min-width: 84px;
  max-width: 96px;
  background: #3a3f4b;
  color: #e9ecef;
  border: 1px solid #454b57;
}
.ncv-input:focus {
  border-color: #000000; /* orange accent */
  box-shadow: 0 0 0 0.15rem rgb(255, 255, 255);
}

/* Range slider styled to your orange accent */
.ncv-range {
  height: 4px !important;
  background: linear-gradient(90deg, #ffffff 0%, #000000 100%) !important;
  border-radius: 999px !important;
}
.ncv-range::-webkit-slider-thumb {
  -webkit-appearance: none !important;

  border-radius: 50% !important;
  background: #ffffff !important;
  border: 2px solid #1f1d1d !important;
}
.ncv-range::-moz-range-thumb {
  border-radius: 50% !important;
  background: #ffffff;
  border: 2px solid #ffffff !important;
}

/* Typography tweaks */
.form-label-sm {
  font-size: 0.75rem;
}

/* Make the row breathe less on small screens */
@media (max-width: 576px) {
  .control-panel {
    padding: 0.5rem;
  }
}
#timebar {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  background: #33373d;
  /* white bar on dark background */
  border-radius: 6px;
  outline: none;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#timebar:hover {
  background: #e0e0e0;
}

/* Chrome/Edge/Safari Thumb */
#timebar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  /* cyan accent */
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#timebar::-webkit-slider-thumb:hover {
  background: #ffffff;
  /* hover glow */
  transform: scale(1.1);
}

/* Firefox Thumb */
#timebar::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00bcd4;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#timebar::-moz-range-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.lbljobid {
  margin: 0 auto;
  /* centers horizontally */
  width: fit-content;
  /* prevent full width */
  background-color: #2f3542;
  color: #ffffff;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px ridge #a29a9a;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .lbljobid {
    background-color: #2f3542;
    color: #f8f8f8;
  }
}

#neuron-popup {
  position: fixed;
  padding: 10px;
  z-index: 100000;
  pointer-events: none;
  font-family: Arial, sans-serif;

  bottom: 4rem;

  right: 0.5rem;

  max-width: 400px;
  width: fit-content;
  height: auto;
  overflow: auto;
  color: #fff;
  transition: opacity 0.9s ease;
  will-change: opacity;
  display: none;

  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
}
#neuron-popup.visible {
  opacity: 1;
  display: block;
}

#neuron-popup:not(:hover) {
  pointer-events: none;
  transition-delay: 0.9s;
}
.popup-content h4 {
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  color: #ffffff;
  font-size: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between; /* This will push label to left and value to right */
  margin: 4px 0;
  width: 100%; /* Ensure it takes full width */
}

.info-label {
  color: #ffffff;
  font-size: 11px;
  display: block;
  text-align: left; /* Explicitly align text to left */

  overflow: hidden;
  text-overflow: ellipsis; /* Adds "..." if text is too long */
  white-space: nowrap;
}

.info-value {
  color: #ffffff;
  font-size: 11px;
  text-align: right; /* Align text to right */

  max-width: 150px; /* Adjust as needed */
  overflow: hidden;
}
.hideable {
  display: none;
}

.connection-panel {
  visibility: hidden;
  position: fixed;

  /* Fallback (LTR): */

  right: 10rem;

  /* Logical props (for RTL-capable browsers). Keep fallbacks above. */
  inset-block-start: 9.6rem;
  inset-inline-end: 12rem;

  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0rem 0.8rem;

  /* Background + blur with safe fallback */
  background: rgba(20, 20, 20, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);

  font: 500 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  max-width: min(92vw, 720px);
  width: max-content;
  flex-wrap: wrap; /* wrap on tiny screens */
}

/* If blur isn’t supported, increase opacity for contrast */
@supports not ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  .connection-panel {
    background: rgba(20, 20, 20, 0.85);
  }
}

.connection-panel label {
  color: #ddd;
  letter-spacing: 0.2px;
  margin-inline-end: 0.25rem;
}

.connection-panel select {
  /* Normalize native styling */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 0.55rem 2.1rem 0.55rem 0.9rem; /* bigger tap target */
  min-height: 2.1rem;

  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  line-height: 1.1;
  max-width: 100%;

  /* Custom arrow via SVG (works everywhere) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 12px 8px;
}

/* Hide the old IE arrow if ever encountered (harmless elsewhere) */
.connection-panel select::-ms-expand {
  display: none;
}

.connection-panel select:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.15);
}

.connection-panel select:focus {
  box-shadow: 0 0 0 2px rgba(0, 150, 255, 0.35);
}

/* High-contrast preference */
@media (prefers-contrast: more) {
  .connection-panel {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
  }
  .connection-panel select {
    border-color: rgba(255, 255, 255, 0.6);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .connection-panel {
    transition: none !important;
  }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .connection-panel {
    /* Respect notches / iOS safe areas */
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    inset-block-start: max(0.75rem, env(safe-area-inset-top));
    inset-inline-end: max(0.75rem, env(safe-area-inset-right));

    padding: 0.45rem 0.6rem;
    gap: 0.5rem;
    font-size: 12px;
  }
  .connection-panel select {
    padding: 0.45rem 2rem 0.45rem 0.7rem;
    min-height: 2rem;
  }
}

/* Optional: clamp the inline offset so it never flies off-screen on mid sizes */
@media (max-width: 1200px) {
  .connection-panel {
    right: 1rem;
    inset-inline-end: 1rem;
  }
}

/* Run Simulation button */
#headingrunsim .accordion-button {
  background-color: #3c3d37 !important; /* EBRAINS-like blue */
  color: #fff !important;
  font-weight: bold !important;
}

/* Fetch Job button */
#headingfetchjob .accordion-button {
  background-color: #524c42 !important; /* green */
  color: #fff !important;
  font-weight: bold !important;
}

/* On hover */
#headingrunsim .accordion-button:hover {
  background-color: #3c3d37 !important;
}
#headingfetchjob .accordion-button:hover {
  background-color: #524c42 !important;
}

/* Container */
.control-panel {
  background: #696a6c;
  font-family: "Segoe UI", sans-serif;

  background: linear-gradient(to bottom, #d0d0d0, #696a6c);

  border-bottom: 2px solid #8a8a8a;
  border: 1px outset #bbb;
}

/* Small label stacked with input */
.ncv-inline-label {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
/* Select */
.ncv-select {
  background-color: #3a3f4b;
  color: #e9ecef;
  border: 1px solid #454b57;
}
.ncv-select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 0.15rem rgba(110, 168, 254, 0.25);
}

/*camera gui*/
#gui .gui-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 3px 4px;
  background: #b8b8b7;

  width: 100%;
  box-sizing: border-box;
}
#gui .gui-inline-row .cr,
#gui .gui-inline-row .controller {
  margin: 0 !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}
#gui .gui-inline-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 15px;
  padding: 3px 4px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid #3f4553;

  background: #2d313f;
  color: #fff;
  cursor: pointer;

  font-size: 10px; /* tweak if needed */
  font-weight: 200;

  overflow: visible; /* ← prevent cropping */
}
#gui .gui-inline-row button:hover {
  background: #3a4050;
  border-color: #586074;
}

/* the grid container */
#gui .cam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 3px 4px;
  width: 100%;
  box-sizing: border-box;
  background: #b8b8b7; /* optional */

  overflow: visible; /* ← avoid clipping */
}

/* make buttons roomy so text isn't cut off */
#gui .cam-grid button {
  display: inline-flex; /* center text nicely */
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 15px; /* give vertical room */
  padding: 3px 4px; /* adjust to taste */
  line-height: 1; /* avoid tight baseline */
  box-sizing: border-box;

  font-size: 10px; /* tweak if needed */
  font-weight: 200;
  white-space: nowrap;
  overflow: visible; /* ← prevent cropping */

  -webkit-appearance: none; /* macOS fix */
  appearance: none;

  border: 1px solid #3f4553;

  background: #2d313f;
  color: #fff;
  cursor: pointer;
}

#gui .cam-grid button:hover {
  background: #3a4050;
  border-color: #586074;
}
