@use "variables" as *;
@use "mixins";

.silex-workspace {
  @include mixins.silex-ui-full;
  display: flex;
  a {
    color: inherit;
  }
  h2 {
    font-size: 18px;
    background: $lighterPrimaryColor;
    border-radius: 8px 8px 0 0;
    padding: 8px;
    margin: 0;
    font-weight: normal;
  }
  h3 {
    margin: 10px 0;
    font-size: 18px;
    font-weight: normal;
  }
}

.full-width {
  width: 100%;
}

// full screen settings
.settings-dialog > div {
  max-width: none;
  width: 100%;
  max-height: 100vh;
  overflow: auto;
  form.silex-form {
    padding-bottom: 100px; // leave space for fixed footer
  }
  .silex-form__element {
    padding: 10px 5px;
    border: 1px solid $lighterPrimaryColor;
    margin: 10px 0;
    width: 98%;
  }
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: $primaryColor;
    &>*:last-child {
      margin-right: 30px;
    }
    .silex-version {
      float: left;
      padding: 0 15px;
      font-size: x-small;
    }
  }
}

button.silex-button,
input.silex-button[type="button"],
input.silex-button[type="submit"] {
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e9ebeb;
  border-bottom-color: #e1e3e3;
  border-radius: 4px;
  box-shadow: 0 2px 4px 0 rgba(14, 30, 37, .12);
  background-color: $lighterPrimaryColor;
  border-color: transparent;
  padding: 5px;
}

.silex-button[disabled] {
  opacity: .8;
  cursor: unset;
}

.silex-button.silex-button--primary {
  background-color: $lighterPrimaryColor;
}

.silex-button.silex-button--secondary {
  background-color: $primaryColor;
}

.silex-button--size {
  max-height: 30px;
}

.silex-button--small {
  font-size: .7em;
  padding: 0 5px;
}

.silex-input {
  appearance: initial;
}

.silex-label {
  display: block;
}

.silex-bar {
  display: flex;
  &>* {
    margin: 5px;
  }
}

ol.silex-list,
ul.silex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: #575757;
  &>li {
    padding: 5px;
    border-bottom: 1px solid #575757;
    background-color: #444;
    margin: 5px;
  }
  fieldset {
    border-color: #575757;
  }
  h4 { // badge-like
    display: inline-block;
    padding: 5px;
    padding-bottom: 2px;
    margin: 10px 5px;
    font-weight: normal;
    color: #3d3d3d;
    background-color: #c4c4c4;
  }
  .silex-list__item__body {
    display: flex;
  }
  .silex-list__item__footer {
    display: flex;
    justify-content: flex-end;
    button {
      padding: 5px;
      margin: 5px;
      padding-top: 8px;
    }
  }
}

form.silex-form {
  display: flex;
  flex-direction: column;
  footer {
    text-align: right;
    border-top: 1px solid $lighterPrimaryColor;
    padding: 20px 0 10px;
    margin: 20px 0 0;
  }
  button, input, optgroup, select, textarea {
    background-color: $darkerPrimaryColor;
    color: $secondaryColor;
    padding: 5px;
    border: none;
  }
  input[type=checkbox] {
    margin: 5px;
  }
  textarea {
    width: 98% !important;
  }
  .silex-form__element {
    display: inline-flex;
    flex-direction: column;
  }
  .silex-form__group.col2 {
    column-count: 2;
  }
}
