#toolbar-wrapper {
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
}

#toolbar-buttons {
	width: 100%;
	background-color: #333;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box; /* ✅ important */
}


.toolbar-left {
	display: flex;
	gap: 5px;
}

.toolbar-right {
	color: white;
	font-size: 1.7rem;
	padding-right: 20px;
	white-space: nowrap;
}
.toolbar-btn {
  margin-right: 5px;
  width: 50px;
  height: 50px;
  border-radius: 20%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  display: flex;                 /* Add this */
  align-items: center;          /* Vertically center */
  justify-content: center;      /* Horizontally center */
}

.toolbar-btn .icon-svg {
  width: 35px;
  height: 35px;
  display: block; 
  object-fit: contain;
}


#toolbar {
    position: absolute;
    top: 100%;
    left: 20px;
    z-index: 100;
}
.toolbar-btn:hover,
.tool-btn:hover {
    background-color: #eec447; /* or any "hover" color you like */
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Optional highlight */
.toolbar-btn.highlight {
    background-color: #ffc107;
    color: black;
}

.toolbar-btn:focus {
	outline: none; /* or something more subtle */
}


.grid-break {
	grid-column: 1 / -1; /* Forces next element to start on new row */
	height: 0;
	padding: 0;
	margin: 0;
}

/* Default 1-unit wide */
.tool-btn {
  display: inline-flex;         /* aligns icon + text */
  align-items: center;          /* vertical centering */
  justify-content: center;      /* horizontal centering */
  gap: 4px;                     /* spacing between icon and text */
  width: 100%;
  min-width: 0;
  height: 50px;
  border-radius: 10px;
  grid-column: span 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;          /* keep only one */
  padding: 0 10px;              /* horizontal padding */
  font-size: 20px;  
  line-height: 1; 
  font-family: 'Roboto', sans-serif;
}


.tool-btn span.material-symbols-outlined {
  font-size: 24px;             /* scale relative to text */
  line-height: 1;              /* avoid baseline shifts */
  vertical-align: middle;      /* optional safety */
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 200,
  'opsz' 24
}


.tool-btn.active {
    background-color: #ffc107;
    color: black;
  }
  

/* Dynamic width classes (up to 5 units as example) */
.tool-btn.wide-2 { grid-column: span 2; }
.tool-btn.wide-3 { grid-column: span 3; }
.tool-btn.wide-4 { grid-column: span 4; }
.tool-btn.wide-5 { grid-column: span 5; }

/* Each panel just takes the size it needs */
/* .toolbar-panel {
	display: none;
	background-color: rgba(73, 71, 71, 0.9);
	color: white;
	padding: 10px;
	border-radius: 0 0 5px 5px;
	pointer-events: auto;


	width: max-content;
	min-width: unset;
	max-width: 1000px;

	max-height: 800px;       
	overflow-y: auto;
	overflow-x: auto;

	white-space: normal;     
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	margin-top: 2px;


	transition: opacity 0.2s ease, transform 0.2s ease;
} */
.tool-btn:disabled {
	opacity: 0.75;              /* Less faded */
	cursor: default;            /* More neutral than 'not-allowed' */
	filter: grayscale(40%);     /* Just a touch of desaturation */
	pointer-events: none;       /* Still prevents interaction */
  }

.toolbar-panel {
	display: grid;
	gap: 5px;

	background-color: rgba(73, 71, 71, 0.9);
	color: white;
	padding: 10px;
	border-radius: 0 0 5px 5px;
	pointer-events: auto;

	width: fit-content;
	max-width: 1000px;

	max-height: 800px;
	overflow-y: auto;
	overflow-x: auto;

	white-space: normal;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	margin-top: 2px;

	transition: opacity 0.2s ease, transform 0.2s ease;
}


/* toggle button */


  .apply-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	font-weight: bold;
	cursor: pointer;
	font-size: 1rem; /* make the whole button text larger */
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  #apply_toggle_mode {
	background-color: #1b407a;
	height: 30px;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	border-radius: 5px;
	font-size: 0.95rem;
	font-weight: 700;
	padding: 0 5px; /* horizontal only */
	line-height: 1;
  }
  
  
  .apply-toggle:hover {
	background-color: #eec447;
  }
 
  

/* 
For tree
*/

.freq-entry {
  display: inline-block;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}

.freq-index {
  display: inline-block;
  width: 2.0em;
  text-align: right;
  padding-right: 0.5em;
}

.freq-value {
  display: inline-block;
  width: 4.0em;
  text-align: right;
}

.imaginary-flag {
  color: #000000;
  font-weight: bold;
  margin-left: 0.75em;
}
