.text-tool-designer {
  width: 100%;
  height: 700px;
  background-color: #635d5c;
  color: white;
  padding-top: 2rem;
  margin-bottom: 5rem;
}
.text-tool-designer .color-palette {
  display: block;
  justify-content: center;
  width: 100%;
}
.text-tool-designer .color-palette .color-palette-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 260px;
  height: 40px;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.text-tool-designer .color-palette .color-palette-wrapper .bg-color-1, .text-tool-designer .color-palette .color-palette-wrapper .bg-color-2, .text-tool-designer .color-palette .color-palette-wrapper .bg-color-3, .text-tool-designer .color-palette .color-palette-wrapper .bg-color-4, .text-tool-designer .color-palette .color-palette-wrapper .bg-color-5, .text-tool-designer .color-palette .color-palette-wrapper .bg-color-chooser {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  background-color: red;
  border-width: 3px;
  border-style: solid;
  border-color: white;
}
.text-tool-designer .color-palette .color-palette-wrapper .bg-color-1 {
  background-color: #635d5c; /* Example color */
}
.text-tool-designer .color-palette .color-palette-wrapper .bg-color-2 {
  background-color: rgb(147, 112, 219); /* Example color */
}
.text-tool-designer .color-palette .color-palette-wrapper .bg-color-3 {
  background-color: #3357FF; /* Example color */
}
.text-tool-designer .color-palette .color-palette-wrapper .bg-color-4 {
  background-color: purple; /* Example color */
}
.text-tool-designer .color-palette .color-palette-wrapper .bg-color-5 {
  background-color: salmon;
}
.text-tool-designer .color-palette .color-palette-wrapper #bgColorPicker {
  background-color: red;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}
.text-tool-designer .text-designer-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
}
.text-tool-designer .tool-panel-switch {
  display: none;
}
.text-tool-designer .text-controls {
  display: flex;
  flex-direction: column;
  margin: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  max-width: 260px;
  width: 100%;
  border-radius: 8px;
  max-height: 400px;
  overflow: scroll;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.text-tool-designer .display-text {
  text-align: center;
  margin-top: 30px;
  max-width: 50%;
  font-size: 32px;
}
.text-tool-designer .slider-container {
  width: 196px;
  margin: 0 2rem 2rem 2rem;
  text-align: center;
  font-family: sans-serif;
}
.text-tool-designer input[type=range] {
  width: 100%;
  margin: 10px 0;
  appearance: none;
  background: transparent;
}
.text-tool-designer input[type=range]::-webkit-slider-runnable-track {
  height: 8px;
  background: #ddd;
  border-radius: 4px;
}
.text-tool-designer input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #8729d4;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -6px;
}
.text-tool-designer input[type=range]::-moz-range-track {
  height: 8px;
  background: #ddd;
  border-radius: 4px;
}
.text-tool-designer input[type=range]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #8729d4;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.text-tool-designer .value-display-panel {
  float: right;
  width: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem;
  max-height: 400px;
  overflow: scroll;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.text-tool-designer .value-display-panel .text-code-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.text-tool-designer .value-display-panel .text-code-mode,
.text-tool-designer .value-display-panel .text-copy-button {
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  cursor: pointer;
}
.text-tool-designer .value-display-panel .text-code-mode.is-active,
.text-tool-designer .value-display-panel .text-copy-button:hover {
  background: #8729d4;
}
.text-tool-designer .value-display-panel .value-display {
  margin: 0;
  overflow: auto;
  white-space: pre;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
}
.text-tool-designer #textToolDesignerTextInput {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  width: 92%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.text-tool-designer #textToolDesignerTextInput:focus {
  outline: none;
  border-color: #8729d4;
}
.text-tool-designer .visually-hidden {
  display: none;
}
.text-tool-designer select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  margin: 1rem 0;
}
.text-tool-designer select:focus {
  outline: none;
  border-color: #8729d4;
}
.text-tool-designer .input-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  margin-bottom: 1rem;
}
.text-tool-designer .input-container input, .text-tool-designer .input-container input[type=checkbox] {
  flex: 1;
  margin-right: 0.5rem;
  float: right;
}
@media screen and (max-width: 920px) {
  .text-tool-designer {
    height: auto;
    min-height: 0;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
  .text-tool-designer .text-designer-content-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  .text-tool-designer .tool-panel-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    margin: 0 auto;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  .text-tool-designer .tool-panel-switch-button {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
  }
  .text-tool-designer .tool-panel-switch-button.is-active {
    background: #8729d4;
  }
  .text-tool-designer .text-controls {
    order: 3;
    flex-direction: row;
    gap: 0.75rem;
    max-width: none;
    width: auto;
    max-height: none;
    margin: 0 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .text-tool-designer .text-input-container,
  .text-tool-designer .text-controls > .collapsible {
    flex: 0 0 min(280px, 78vw);
    scroll-snap-align: start;
  }
  .text-tool-designer .text-controls .collapsible-content,
  .text-tool-designer .text-controls .nested-collapsible-content {
    max-height: 210px;
    overflow-y: auto;
  }
  .text-tool-designer .display-text {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: calc(100% - 2rem);
    min-height: 70px;
    margin: 1rem auto;
  }
  .text-tool-designer .value-display-panel {
    order: 3;
    display: none;
    width: auto;
    max-width: none;
    max-height: 260px;
    margin: 0 1rem;
    float: none;
  }
  .text-tool-designer.show-code .text-controls {
    display: none;
  }
  .text-tool-designer.show-code .value-display-panel {
    display: block;
  }
}

.collapsible {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  font-family: sans-serif;
  margin-bottom: 1rem;
}
.collapsible .collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.collapsible .collapsible-label {
  font-weight: bold;
}
.collapsible .collapsible-arrow {
  transition: transform 0.2s ease;
}
.collapsible .collapsible-content {
  padding: 10px 10px 2px 2px;
  display: none;
}
.collapsible .nested-collapsible {
  margin-top: 10px;
  padding-left: 20px;
  border-left: 2px solid #ddd;
}

.collapsible.open .collapsible-content {
  display: block;
  padding: 1rem;
}

.collapsible.open .collapsible-arrow {
  transform: rotate(180deg);
}

.nested-collapsible-content {
  display: none;
}

.nested-collapsible.open .nested-collapsible-content {
  display: block;
  padding: 10px;
}
