/* Common styles for neuron_classes.html and smith_2024.html */

body, * {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

nav * {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
nav button, nav a {
  font-weight: 500;
}

.tooltip {
  position: absolute;
  padding: 8px 12px;
  background: #000;
  color: #fff;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  font-size: 20px;
  white-space: nowrap;
  z-index: 999;
}

button {
  position: relative;
  font-size: 24px;
  margin-right: 10px;
  cursor: pointer;
  padding: 1px 8px;
}

#left-sidebar {
  /*position: fixed;*/
  left: 0;
  top: 50px;
  width: 300px;
  height: fit-content;
  background: #f7f7f7;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  border-top: 1px solid #ddd;
  border-bottom-right-radius: 8px;
  border-top-right-radius: 8px;
  overflow-y: auto;
  padding: 20px;
  z-index: 999;
}
.left-sidebar_neurons {
  position: fixed;
  height: calc(100vh - 50px) !important;
  border-bottom: 0 !important;
  border-bottom-right-radius: 0 !important;
  padding: 25px 15px !important;
}

.btn-3D {
  display: inline-block;
  background-color: #667eea;
  color: white;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 1rem;
}
.btn-3D:hover {
  background-color: #764ba2;
}

#mn-control-panel, #neuron-search-container {
  padding: 10px 14px;
  background: #f7f7f7;
  border-radius: 8px;
  font-family: sans-serif;
  font-size: 14px;
  width: 100%;
  margin: 25px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#mn-control-panel h4 {
  margin: 4px 0 8px 0;
  font-size: 15px;
  color: black;
}

#mn-control-panel input {
  margin-right: 5px;
  cursor: pointer;
}

#mn-control-panel label {
  cursor: pointer;
  font-weight: bold;
}

#diagramContainer {
  position: relative;
  /*margin-left: 300px;*/
  margin-top: -9%;
  width: calc(100% - 300px);
  height: auto;
}
.diagramContainer_neurons {
  aspect-ratio: 2304 / 1440;  /* keeps proportions */
  margin-left: 300px;
}
.diagramContainer_hyp7 {
  margin-top: 0% !important;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}
.diagramContainer_hyp7 > div {
  width: 80%;
}
.diagramContainer_hyp7 svg {
  width: 100% !important;
  height: auto;
  display: block;
  margin: 0 auto;
}

.diagramContainer_neurons img,
.diagramContainer_neurons svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.diagramContainer_neurons svg {
  z-index: 2;
}

.diagramContainer_neurons img {
  z-index: 1;
}

:root {
  --sub-1: #ff0000;   /* subclass 1 */
  --sub-2: #0051ff;   /* subclass 2 */
  --sub-3: #ffaa00;   /* subclass 3 */
  --sub-4: #00af43;   /* subclass 4 */
  --sub-5: #9000b4;   /* subclass 5 */
  --sub-6: #a54200;   /* subclass 6 */
  --sub-7: #eaee00;   /* subclass 7 */
  --sub-8: #ff00ff;   /* subclass 8 */
  --sub-0: #cccccc;   /* subclass 0 for Smith 2024 */
}

.highlight-persistent, .highlight-hover, path[data-name]:hover {
  cursor: pointer;
  stroke-width: 2.1;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.7);
}

#neuron-search-container {
  padding: 10px 14px;
  background: #f7f7f7;
  border-radius: 8px;
  font-family: sans-serif;
  font-size: 14px;
  width: 100%;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#neuron-search-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: sans-serif;
  box-sizing: border-box;
  margin-bottom: 8px;
}

#neuron-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 4px rgba(102, 126, 234, 0.3);
}

#neuron-dropdown {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  display: none;
}

#neuron-dropdown.show {
  display: block;
}

.neuron-option {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.neuron-option:hover {
  background-color: #e8f0ff;
}

.neuron-option:last-child {
  border-bottom: none;
}

.neuron-option.selected {
  background-color: #667eea;
  color: white;
}

@keyframes flicker {
  0%, 100% {
    stroke-width: 2.1;
    opacity: 1;
  }
  50% {
    stroke-width: 2.1;
    opacity: 0.3;
  }
}

path.highlight-search {
  cursor: pointer;
  stroke-width: 2.1;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.7);
  animation: flicker 0.6s infinite;
}

footer {
  position: fixed;
  bottom: 0;
  z-index: 1000;
  margin: 0;
  padding: 7px;
  font-size: 14px;
  color: #1d1d1d;
  background: #f7f7f7;
  width: 100%;
}

footer p {
  margin: 0;
  text-align: center;
}
