/* ========================================================= */
/*                       Tools Seite                         */
/* ========================================================= */

.tools-page {
  width: 100%;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}

.tool-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #9e764c;
  border-radius: 5px;
  background-color: #f9f1e7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.tool-panel-title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d0ad80;
}

.tool-panel-title h2 {
  margin: 0;
  color: #1f160f;
  font-size: 18px;
}

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid #d0ad80;
  border-radius: 5px;
  background-color: #fff8ec;
}

.tool-fieldset legend,
.tool-field label {
  color: #5f4229;
  font-size: 12px;
  font-weight: bold;
}

.tool-fieldset legend {
  padding: 0 4px;
}

.tool-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.tool-options-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-option {
  display: flex;
  min-width: 0;
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #d0ad80;
  border-radius: 5px;
  background-color: #f9f1e7;
  color: #1f160f;
  cursor: pointer;
}

.tool-option input {
  flex: 0 0 auto;
  accent-color: #9e764c;
}

.tool-option span {
  overflow-wrap: anywhere;
}

.tool-field {
  display: grid;
  gap: 5px;
}

.tool-field-inline {
  grid-template-columns: minmax(90px, 1fr) 110px auto;
  align-items: center;
}

.tool-field-inline label {
  align-self: center;
}

.tool-field-inline span {
  color: #5f4229;
}

.tool-field input[type="text"],
.tool-field input[type="number"],
.tool-field select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid #9e764c;
  border-radius: 5px;
  background-color: #fff8ec;
  box-sizing: border-box;
  color: #1f160f;
  font: inherit;
}

.tool-field input[readonly] {
  background-color: #fffdf8;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tool-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #9e764c;
  border-radius: 5px;
  background-color: #f9f1e7;
  color: #1f160f;
  cursor: pointer;
  font: inherit;
}

.tool-button-primary {
  background: linear-gradient(to bottom, #fff4db, #c9a06d);
  font-weight: bold;
}

.tool-button:hover,
.tool-button:focus {
  border-color: #5f4229;
  text-decoration: underline;
}

.tool-hint {
  min-height: 18px;
  margin: 0;
  color: #5f4229;
  font-size: 13px;
}

@media (max-width: 980px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .tool-panel {
    padding: 10px;
  }

  .tool-options,
  .tool-options-three,
  .tool-field-inline {
    grid-template-columns: 1fr;
  }

  .tool-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tool-button {
    width: 100%;
  }
}
