$main: #007bff;
$primary1: adjust-color(
  $color: $main,
  $saturation: -30%,
  $lightness: +20%,
);
$primary0: adjust-color(
  $color: $primary1,
  $lightness: -8%,
);
$primaryblack: adjust-color(
  $color: $primary1,
  $lightness: -35%,
);
$primarygray: adjust-color(
  $color: $primary1,
  $lightness: -20%,
);

$primary2: adjust-color(
  $color: $primary1,
  $lightness: +12%,
);
$primary3: adjust-color(
  $color: $primary2,
  $lightness: +12%,
);

$mainsecondary: adjust-color(
  $color: $main,
  $hue: 240deg,
);
$secondary1: adjust-color(
  $color: $mainsecondary,
  $saturation: -30%,
  $lightness: +10%,
);
$secondary2: adjust-color(
  $color: $secondary1,
  $lightness: +12%,
  $saturation: -30%,
);
$secondary3: adjust-color(
  $color: $secondary2,
  $lightness: +15%,
);

.pkt-name {
}

.pkt-top-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 7rem;
  flex-basis: 1px;
}

.pkt-top-level label {
  margin-bottom: unset;
}

.pkt-form-items {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.el-container {
  position: relative;
  width: 100%;
  // width: 65vh;
}

.edit-mode .pkt-form-editing > .pkt-form-items > .el-container {
  margin-top: 0;
  margin-bottom: 0;
}

.pkt-form-items > .el-container {
  margin-top: 0.5rem;
}

.pkt-form-items > .el-container:first-child {
  margin-top: 0;
}

.pkt-form-section-header {
  text-align: left;
  // width: 100%;
  width: 60vh;
}

.pkt-el {
  border: 2px black solid;
  border-radius: 5px;
  padding: 0.5rem;
  background-color: $primary1;
}

.pkt-el .pkt-el {
  background-color: $primary2;
}

.pkt-el .pkt-el .pkt-el {
  background-color: $primary3;
}

// This is here so that, when you drag the corner of a spinner el
// to resize it, it stays centered while growing both to the left
// and to the right.
.pkt-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pkt-spinner {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: left;
  resize: horizontal;
  overflow: hidden;
}

.pkt-spinner-list-editing {
  table-layout: fixed;
  border-spacing: 1px;
  border-collapse: separate;
  width: 100%;
}
.pkt-spinner-list-editing th {
  text-align: left;
  padding: 3px;
}
// This column is just checkboxes, and the label should be centered over them
.pkt-spinner-list-editing th.pkt-spinner-required-column {
  text-align: center;
}

.spinner-option-input-name {
  height: 90%;
  margin-top: 4%;
  width: 80%;
  display: inline-block;
  padding: 4px;
}
.spinner-option-input {
  width: 90%;
  display: inline-block;
  padding: 4px;
}

.spinner-option-input-td {
  width: 50%;
  padding: 3px;
}
.add-spinner-option-button {
  border-color: transparent;
  border-radius: 3px;
  border-style: solid;
  width: 100%;
}
.add-spinner-option-button:hover {
  background-color: $primary0;
}
.pkt-spinner-delete-column {
  width: 32px;
  text-align: center;
}
.pkt-container {
  display: flex;
}
.pkt-spinner-required-column {
  width: 5rem;
  text-align: center;
}
.delete-spinner-option-button {
  border-color: transparent;
  border-radius: 3px;
  border-style: solid;
  background-color: transparent;
  padding-left: 2px;
  padding-right: 2px;
  margin-right: -6px; /* Hack to make it appear centered */
}
.delete-spinner-option-button:hover {
  background-color: $primary0;
}

ul.checklist-preview {
  list-style: none;
  padding-left: unset;
  margin-left: unset;
  margin-bottom: unset;
}
.checklist-preview li label {
  margin-left: 3px;
}

.pkt-el > * {
  margin-top: 0.5rem;
}

.pkt-el > *:first-child {
  margin-top: 0;
}

.pkt-el > .children > .el-toggles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: left;
  gap: 0.5rem;
}
.pkt-el > .children > * {
  margin-top: 0.5rem;
}
.pkt-el > .children > *:first-child {
  margin-top: 0;
}
.pkt-el > .children > .el-toggles label > input {
  margin-left: 0.3rem;
}
.pkt-el > .children > .el-toggles > *:first-child {
  margin-left: 0;
}
.pkt-el > .children > .el-toggles > * {
  margin-left: 0.5rem;
  white-space: nowrap;
}
.pkt-txt {
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: space-between;
}
.pkt-txt > span {
  margin-right: 0.5rem;
}
.pkt-spinner select,
.pkt-txt .input-field {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.pkt-txt-inptyp-input {
  padding: 3px;
  width: 100%;
}

.pkt-numeric {
  @extend .pkt-txt;
}

.hint-field:not(:focus) {
  color: #777;
}

.min-max-inputs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1rem;
}
.min-max-inputs > * {
  flex-basis: 0;
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
  // max-width: 5rem;
  margin-left: 2rem;
}
.min-max-inputs > *:first-child {
  margin-left: 0;
}

.text-field-side {
  display: flex;
  align-items: center;
}
.text-field-side > input {
  width: 100%;
  display: inline-block;
  flex-basis: 0;
  flex-grow: 1;
  min-width: 0;
  margin-left: 0.25rem;
}

.text-field-top-input {
  width: 100%;
}

.pkt-media {
}

.required-asterisk::before {
  color: red;
  content: '*';
}

.pkt-form-item {
  display: flex;
  flex-direction: column;
  justify-content: left;
  align-items: center;
  max-width: max-content;
}

.pkt-form-item-actions {
  display: flex;
  flex-direction: row;
  justify-content: left;
  flex-grow: 0;
  margin: 1rem;
  align-items: center;
  border-radius: 30px;
  background-color: $primary1;
  padding: 0.5rem;
  height: fit-content;
  //   width: fit-content;
}

.pkt-form-item-actions > * {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.preview-mode .edit-element {
  display: none !important;
}

.debug-pane {
  white-space: pre-wrap;
  font-family: monospace;
  margin-right: 2rem;
}
.debug-info-buttons {
  display: flex;
  margin-left: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.top-level-buttons {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.top-level-buttons .btn {
  width: 4em;
}
.top-level-buttons > * {
  margin-top: 0.5rem;
}
.top-level-buttons > *:first-child {
  margin-top: 0;
}

.insert-el-actions-wrapper {
  position: relative;
  width: calc(100% - 2rem);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  height: 0;
  // background-color: $primary0;
}

.insert-el-actions {
  zoom: 0.97;
  margin-top: 10px;
  position: absolute;
  //display: none;
  gap: 3px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  // height: 1.5rem;
  border-radius: 30px;
  font-size: 0px;
  // height: 0;
  display: flex;
  height: unset;
}

.insert-el-actions-wrapper:hover > .insert-el-actions {
  font-size: unset;
  background-color: transparent;
  padding: 0.5rem;
}

.insert-el-actions > button {
  color: $primary0;
  background-color: inherit;
  border-color: transparent;
  border-radius: 5px;
  border-style: solid;
  border-width: 2px;
}

.insert-el-actions > button:first-child {
  margin-left: 0;
}
.insert-el-actions-wrapper button {
  background-color: $secondary3;
  border-color: $primarygray;
  font-size: unset;
  color: #000;
}

.insert-el-actions-wrapper:hover > .insert-el-actions > button {
  // height: 2rem;
  transition: 0.1s;
}

.insert-el-actions-wrapper:hover > .insert-el-actions > button:hover {
  background-color: $secondary2;
  border-color: $primaryblack;
}

.el-top-bar {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.el-actions {
  white-space: nowrap;
}

.toggle-edit-button {
  border: 2px solid transparent;
  border-radius: 5px;
  background-color: transparent;
  padding-left: 2px;
  padding-right: 2px;
}
.toggle-edit-button:hover {
  background-color: $primary0;
}

.delete-button {
  @extend .toggle-edit-button;
}

.el-name {
  margin-right: auto;
  display: flex;
}

.pkt-top-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 7rem;
  flex-basis: 1px;

  @media (max-width: 1200px) {
    margin-right: 5rem;
  }

  @media (max-width: 992px) {
    margin-right: 3rem;
  }

  @media (max-width: 768px) {
    margin-right: 1rem;
  }
}

.top-level-el {
  width: 60vh;

  @media (max-width: 1200px) {
    width: 50vh;
  }

  @media (max-width: 992px) {
    width: 40vh;
  }

  @media (max-width: 768px) {
    width: 30vh;
  }
}

.top-level-el > .el-container > .el-top-bar .delete-button {
  display: none;
}

.click-to-edit {
  cursor: pointer;
}
.click-to-edit:hover {
  background-color: $secondary3;
}

.save-status-tooltip {
  visibility: hidden;
  position: absolute;
  z-index: 1;
  text-align: center;
  background-color: black;
  color: #fff;
  width: 20rem;
  right: 0;
}
.save-status:hover .save-status-tooltip {
  visibility: visible;
}

#zeitControl  {
  margin-left: 0.5rem;
}
