#toolbar {
  display: flex;
  gap: 8px;
  background: #ffffff;
  padding: 10px;
  border-bottom: 1px solid #eee;
  justify-content: center;
}

#toolbar button,
#header-controls button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background-color: #eee;
  cursor: pointer;
  font-weight: bold;
  position: relative;
  border-radius: 5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Font family dropdown styling */
#toolbar .font-family-select , #toolbar .font-size-select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  background-color: #fff;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

#toolbar .font-family-select:focus, #toolbar .font-size-select:focus {
  border-color: #3399ff;
  outline: none;
  box-shadow: inset 0 0 0 2px #3399ff33;
}

#toolbar button:hover,
#header-controls button:hover {
  background-color: #ddd;
}



/* Text color */
.color-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 4px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.color-dropdown.visible {
  /* display: flex;
  flex-wrap: nowrap; */
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-left: -65px;
  margin-top: 3px;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
}

.color-option {
  width: 20px;
  height: 20px;
  margin: 2px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ccc;
  cursor: pointer;
  border-radius: 3px;
}

.color-option.selected {
  box-shadow: 0 0 0 2px #3399ff;
}
#toolbar button:disabled,
#header-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Active state for toggled formatting buttons */
#toolbar .mdi-button.active {
  background-color: #cce5ff;
  box-shadow: inset 0 0 0 2px #3399ff;
}

#custom_toolbar{
  display: flex;
  justify-content: center;
  margin: 5px 40px;
}

.submenu-wrapper {
  position: relative;
  display: inline-block;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 4px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.submenu.visible {
  display: flex;
  gap: 4px;
}

.submenu .mdi-button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.save-btn{
  height: 40px;
  background-color: #000 !important;
  width: 90px;
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border-radius: 6px;
}
.download-btn{
  height: 40px;
  width: 120px;
  border: 2px solid black;
  color: black;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border-radius: 6px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  /* z-index: 9999; */
  background: rgb(79, 186, 79);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.toast.visible {
  opacity: 1;
}