@charset "UTF-8";

/* © DialogueTrainer */

@use 'base' as *;
$font-family: 'Open Sans', 'Frutiger', 'Helvetica', 'Arial', sans-serif;

input, select, textarea, button {
  font-family: $font-family;
}

svg {
  // Fixes SVG subpixel rendering in Firefox
  transform: scale(1);

  &.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: middle;
  }
}

kbd {
  display: inline-block;
  padding: 3px 5px;
  line-height: 10px;
  color: #444D56;
  vertical-align: middle;
  background-color: #FAFBFC;
  border: solid 1px #D1D5DA;
  border-bottom-color: #C6CBD1;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 #C6CBD1;
}

a[data-disabled] {
  text-decoration: line-through;
}

.noSelect {
  user-select: none;
}

.clickable:hover {
  cursor: pointer;
}

a.clickable {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.removedParameter {
  display: none;
}

#dragBox {
  position: absolute;
  z-index: 999;
  padding: 3px;
  margin: 0;
  font-size: 12px;
  color: $col-text-dark;
  pointer-events: none;
  cursor: move;
  background-color: $col-dragbox;
  border: 1px solid rgba(black, .25);
  border-radius: 2px;
  box-shadow: 2px 2px 10px rgba(black, .1), 1px 1px 2px rgba(black, .05);

  &.add {
    background-color: $col-dragbox-error;
  }

  &.error {
    background-color: $col-dragbox-error;
  }
}

.attachment-container {
  position: relative;
  display: none;
  height: 0;
  text-align: right;

  textarea:focus + * + &,
  input:focus + * + &,
  textarea:focus + &,
  input:focus + & {
    position: relative;
    z-index: 1;
    display: block;
    transform: translate(3px, 0);
  }

  > .markdown-tooltip {
    display: inline-block;
    padding: 5px;
    line-height: 0;
    background: rgba(white, .95);
    border: 1px solid rgba(black, .25);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(black, .15);

    svg {
      width: 10px;
      height: 10px;
      fill: rgba(black, .75);
      pointer-events: none;
    }
  }
}

.tippy-box {
  text-align: left;

  a[href] {
    color: lighten($col-editor, 25%);
  }
}

.tippy-box[data-theme~=markdown] {
  code {
    white-space: nowrap;
  }
}

#statement,
#comment {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

// For reordering
.handle {
  cursor: move;
  cursor: grab;
  user-select: none;

  .parameter-effect & {
    padding: 0 5px;
  }
}

.indicator {
  position: absolute;
  right: -25px;
  bottom: -25px;
  padding: 3px 5px;
  margin: 0 5px 5px 0;
  color: $col-text-light;
  background-color: $col-editor;
  border: 1px solid $col-editor;
  border-radius: 3px;
  box-shadow: 0 2px 1px rgba(0, 0, 0, .07);
}

.listType {
  padding-inline-start: 0;

  li {
    display: flex;
    align-items: center;
    margin-bottom: .25em;
    gap: 5px;

    &::before {
      content: '•';
      display: inline;
    }

    .control {
      flex-grow: 1;
    }
  }

  &.string {
    li {
      align-items: flex-start;
    }
  }
}

input[type=text].search {
  padding-right: $spacing-7;
  margin-bottom: $spacing-2;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid $slate-300;
  border-radius: $rounded-base;

  &:hover {
    border-color: $slate-400;
  }

  &:focus {
    background-color: $slate-100;
    outline: none;
  }
}

.ui-lasso {
  pointer-events: none;
}
