/* Adjustments for button group layout */

/* Improve button group spacing and alignment */
.button-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-start;
  align-items: center;
}

/* Push submit button to the right */
.button-group .submit-btn {
  margin-left: auto;
}

/* Make the select dropdowns narrower */
.button-group .shadcn-select {
  width: auto;
  min-width: 120px;
  max-width: 120px;
}

/* Make the select trigger more compact */
.button-group .shadcn-select-trigger {
  padding: 0 10px;
  height: 36px;
}

/* Adjust the select value text */
.button-group .shadcn-select-value {
  font-size: 0.85rem;
}

/* Ensure the whiteboard button has enough space */
.button-group .action-btn#toggleCanvas {
  white-space: nowrap;
  min-width: 160px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

/* Ensure the advanced mode switch has enough space */
.button-group .shadcn-switch {
  min-width: 140px;
  white-space: nowrap;
}

/* Make the switch label more compact */
.button-group .shadcn-switch-label {
  font-size: 0.85rem;
}

/* Make the submit button more compact */
.button-group .submit-btn {
  padding: 0.6rem 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .button-group {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .button-group .shadcn-select {
    min-width: 100px;
    max-width: 100px;
  }

  .button-group .action-btn#toggleCanvas {
    min-width: 140px;
    order: -1; /* Move to the beginning */
    flex-basis: 100%; /* Full width on smaller screens */
  }

  .button-group .shadcn-switch {
    min-width: 130px;
    order: 1; /* Move after dropdowns */
  }

  .button-group .submit-btn {
    order: 2; /* Move to the end */
    margin-left: auto; /* Keep it aligned to the right */
  }
}

@media (max-width: 576px) {
  .button-group {
    gap: 0.5rem;
  }

  .button-group .shadcn-select {
    min-width: 90px;
    max-width: 90px;
    flex-grow: 1;
  }

  .button-group .action-btn#toggleCanvas {
    min-width: auto;
    padding: 0.75rem 1rem;
  }

  .button-group .shadcn-switch {
    min-width: auto;
    flex-basis: 100%;
    order: 1;
  }

  .button-group .submit-btn {
    flex-basis: auto;
    order: 2;
    margin-left: auto;
    justify-content: center;
  }
}
