

.index{
    height: var(--main-height);
    overflow-y: auto;
    width: 100%;
    color: var(--lil-text);
    background-color: var(--page);
    margin: auto;
    border-bottom: 1px solid var(--soft-border);
    padding: 0px 18px;
}

.searchy{
  position: relative;
  align-items: center; 
  justify-content: center;
  align-content: center;
  padding: 8px 18px 4px;
  border-bottom: 1px solid var(--soft-border);
  width: 100%;

  background-color: var(--page);
}

.section-row{
  padding: 1px;
  display: flex;
  border-radius: 4px;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--tiny-text);
}
.section-row:hover{
  background-color: var(--hover);
}
.collapse-chevron{
  height: 18px;
  width: auto;
  margin-bottom: -1px;
  display: none;
}

.magnifying-glass{
  pointer-events: none; 
  color: var(--tiny-text); 
  width: 24px;
  margin-left: 10px;
  height: auto;
  margin-top: -1px;
}
.mini-instruction{
  color: var(--tiny-text);
  display: flex;
  border: 1px solid var(--border-1);
  font-size: 11px;
  flex-direction: row;
  align-items: center;
  letter-spacing: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  margin-right: 7px;
}

.searchbar{
  width: 100%;
  border-radius:6px;
  margin: auto auto 8px auto;
  display: flex;
  align-items: center;
  flex-direction: row;
  height: 34px;
  border: 1px solid var(--border-1);
  transition: all 0.05s;
  background-color: var(--page);
}
.searchbar:hover{
  background-color: var(--hover);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);

}
.searchinput::placeholder{
  font-size: 13px;
  font-weight: 460;
  color: #bebebe;
  transition: all 0.05s;

}

.searchbar:focus-within{
  border: 1px solid var(--link-sel);
  background-color: var(--page);
}

.searchinput{
  padding: 0px 10px;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter';
  background: none;
  border: none;
  color: black;
  cursor: default;
  transition: all 0.05s;

}
.searchinput:focus{
  outline: none;
  background-color:var(--page);
  color: none;
}






.mi-list {
  list-style: none;
  padding: 8px 0px 4px 0px;
}
.index:hover{
  color: var(--lil-text);
}

.mi-list button {
  all: unset;
  box-sizing: border-box;
  height: 27.5px;
  padding-left: 8px;
  width: 100%;
  font-weight: 440;
  color: var(--lil-text);
  font-size: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  opacity: 1;
  border-bottom: 1px solid var(--border-2);
  font-family: 'Inter' , sans-serif;
}

.mi-list button:hover {
  color: var(--big-text);
  background-color: var(--hover);
  border-radius: 4px;
  cursor: pointer;
}
.mi-list button.is-active {
  color: var(--link-sel);
  background-color:#0085f92e;
  border-radius: 4px;
  pointer-events: none;
  font-weight: 500;
}

.searchbar:focus-within { opacity:1;}


.mm-sep10{
  height: 1px;
  margin: 10px auto;
  background-color: var(--border-2);
}


/* --- Sidebar view toggle (Categories / All) --- */
.view-toggle{
  display: none;
  gap: 2px;
  padding: 3px;
  background-color: #dfddd4;
  border: 1px solid var(--border-1);
  border-radius: 8px;
  width: 97%;
  margin: auto;
}
.view-toggle button{
  flex: 1;
  border: 1px solid #00000000;
  background: none;
  padding: 3px 9px;
  font-weight: 500;
  color: var(--lil-text);
  border-radius: 5px;
  cursor: default;
  display: flex;
  justify-content: center;
  align-items: center;
}

.view-toggle svg{
  height: 17px;
  width: auto;
}
.view-toggle button:hover{
  color: var(--link-sel);
}
.view-toggle button.is-active{
  background-color:var(--page);
  color: var(--big-text);
  border: 1px solid var(--border-1);
  box-shadow: 0 2px 2px rgba(0,0,0,0.04);
  display: flex;
  justify-content: center;
  align-items: center;
}


/* --- Grouped category sections --- */
.mi-list > li.group{
  border-bottom: 1px solid #85858512;
}
.mi-list > li.group > details > summary{
  list-style: none;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 6px 9px 4px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 480;
  color: var(--lil-text);
  height: 30px;

}
.mi-list > li.group > details > summary:hover{
  background-color: var(--hover);
  color: var(--big-text) !important;
}
.mi-list > li.group > details > summary::-webkit-details-marker{
  display: none;
}
.mi-list > li.group > details > summary::before{
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  color: var(--tiny-text);
  border-right: 1px solid var(--tiny-text);
  border-bottom: 1px solid var(--tiny-text);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.mi-list > li.group > details[open] > summary::before{
  transform: rotate(45deg);
}
.mi-list > li.group > details > summary .group-name{
  flex: 1;
  color: var(--lil-text);
  font-weight: 480;
}
.mi-list > li.group > details > summary .group-count{
  color: var(--tiny-text);
  font-weight: 440;
  font-family: monospace;
  font-size: 10px;
  background-color: #0ac05000;
  padding: 2px;
  border-radius: 3px;
  border: 0px solid #0395561e;
}
.group-list{
  list-style: none;
}
.group-list button{
  padding-left: 20px;
}


.item-sec{
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: center;
  margin-bottom: 6px;
}
.filtuh p{
    color: var(--tiny-text);
    font-size: 11px;
    font-weight: var(--lil-text);
    margin: 8px 0px 4px 4px;
    align-items: center;
    display: flex;
  letter-spacing: 0.2px;
  display: none;

}
.filtuh p svg{
    color: var(--tiny-text);
    height: 11px;
    width: auto;
    margin-top: -0.5px;
    margin-right: 5px;
}

.filter-items{
  cursor: default;
  border: 1px solid var(--border-1);
  font-size: 11px;
  font-weight: 450;
  padding: 3px 5px;
  border-radius: 6px;
  width: 100%;
  margin: auto;
  background-color: var(--page);
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.03);
  font-family: 'Inter';
  color: var(--lil-text);
}

.filter-items:hover{
  background-color: var(--hover);
  color: var(--big-text);
}

.sidebar{
  justify-content: center;
  align-items: center;
  padding: 0px 0px;
  height: var(--main-height);
  border-right: 1px solid var(--border-1);
  border-radius: var(--radius);
  background-color: var(--page);

  transition: width 0.3s ease, min-width 0.3s ease, border-color 0.3s ease;
  width: 18.8vw;
  min-width: 230px;
  overflow: hidden;
}
.sidebar.collapsed {
  width: 0;
  min-width: 0;
  border-right-color: transparent;
}

.sidebar .searchy,
.sidebar .index {
  transition: opacity 0.2s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateX(0);
}

.sidebar.collapsed .searchy,
.sidebar.collapsed .index {
  opacity: 0;
  transform: translateX(-24px);
  pointer-events: none; /* Prevents clicking invisible elements */
}
.sidebar.filter-items{
    display: none;
}

/* ===========================================================
   Model controls panel (Figma-style property rows)
   =========================================================== */
.sidebar{
  display: flex;
  flex-direction: column;
}
.sidebar .searchy{
  flex: 0 0 auto;
}
.sidebar .index{
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  margin-bottom: 10px; /* room for the absolutely-positioned credit badge */
}

.model-panel{
  display: flex;
  flex-direction: column;
  padding-top: 2px;
  margin-bottom: -6px;
}
.mp-header{
  font-size: 10px;
  font-weight:540;
  display: flex;
  gap: 3px;
  align-items: center;
}

.mp-header svg{
  height: 13px;
  margin-bottom: -0.5px;
  width: auto;
  display: none;
}

.mp-row{
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 30px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 480;
  cursor: default;
  color: #4e4e4e;
}
.mp-row:hover{
  background-color: var(--hover);
}
.mp-row:focus-visible{
  outline: 2px solid var(--link-sel);
  outline-offset: -2px;
}

.mp-icon{
  height: 21px;
  background-color: var(--color2);
  border: 1px solid var(--border-1);
  color:var(--tiny-text);
  padding: 1px;
  border-radius: 4px;
  width: auto;
  flex-shrink: 0;
}


.mp-label{
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--lil-text);
}

.mp-range{
  flex: 1;
  min-width: 0;
  height: 18px;
}
.sidebar .mp-range::-webkit-slider-runnable-track{
  height: 12px;
  background: var(--border-1);
  border: none;
  border-radius: 4px;
}
.sidebar .mp-range::-webkit-slider-thumb{
  width: 12px;
  height: 12px;
  margin-top: 0px;
  background: var(--tiny-text);
  border: 0px solid var(--border-1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sidebar .mp-range::-moz-range-track{
  height: 4px;
  background: #d6d4cc;
  border-radius: 2px;
}
.sidebar .mp-range::-moz-range-thumb{
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid var(--border-1);
}
.sidebar .slider-value{
  flex-shrink: 0;
  width: 32px;
  text-align: right;
  font-family: monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--tiny-text);
}
.mp-row:has(.mp-range:disabled) .mp-icon,
.mp-row:has(.mp-range:disabled) .slider-value{
  opacity: 0.45;
}

/* Toggle rows: pill switch reflects .is-active (set by existing JS) */
.mp-switch{
  position: relative;
  flex-shrink: 0;
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: #d6d4cc;
  transition: background-color 0.15s ease;
}
.mp-switch::after{
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.mp-toggle.is-active .mp-switch{ background: #02b065; }
.mp-toggle.is-active .mp-switch::after{ transform: translateX(11px); }



/* ===========================================================
   Collapsible sections (.searchy.is-collapsed, toggled in brain_index.js)
   =========================================================== */
.section-row{ cursor: default; user-select: none; }
.section-row:focus-visible{ outline: 2px solid var(--link-sel); outline-offset: 1px; }
.collapse-chevron{ transition: transform 0.15s ease; }

.searchy.is-collapsed .collapse-chevron{ transform: rotate(-90deg); }
.searchy.is-collapsed .section-row{ margin-bottom: 0; }

/* Hide everything in a collapsed section except its header row */
.searchy.is-collapsed > :not(.section-row):not(.model-panel),
.searchy.is-collapsed .model-panel > :not(.section-row){
  display: none;
}
.searchy.is-collapsed .model-panel{ gap: 0; }

/* Collapsing the Index section also hides the list below it */
.searchy.is-collapsed + .index{ display: none; }
