@import url("components/open-sans/open-sans.css");
@import url("components/bootstrap/css/bootstrap.min.css");

@import "libs/variables";
@import "bundles/mapbendercore/sass/template/fullscreen_variables.scss";
@import "libs/mixins";
@import "libs/icons";
@import "theme/mapbender3";

.form-control-feedback {
  position: absolute;
  right: 0;
  z-index: 2;
  display: block;
  width: 34px;
  height: 31px;
  line-height: 31px;
  text-align: center;
  pointer-events: none;
  margin-top: -29px;
}

body {
  overflow: hidden;
}

.contentPane {
  // prevent invisible contained elements from gaining size; a sized contentPane breaks popup
  // positioning on drag / resize
  height: 0;
  overflow-y: hidden;
}

/*
  Override bootstrap standard declaration
*/
.modal-body {
  &.confirm-dialog{
    padding: 5px;
    text-shadow: 0px 1px 0px #fff;
  }

  .nav.nav-tabs.ui-tabs-nav {
    padding: 0;
  }

  .form-group {
    margin-bottom: 5px;
    position: relative;
  }

  label {
    margin-bottom: 0px;
    font-size: 11px;
    color: #707070;
    text-shadow: 0px 1px 0px #fff;
  }

  textarea,
  select,
  input
  {
    &:-webkit-autofill {
      background-color: #E0FBCF;
      color: #858585;
    }
  }

  textarea,
  select,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="file"] {
    font-size: 11px;
    border-radius: 0;
    &.mandatory {
      background-color: #f2b17f;
    }
  }

  input[type="checkbox"],
  input[type="radio"] {
    margin-left: -17px;
  }


  hr {
    display: block;
    clear: both;
    height: 1px;
    background-color: #c0c0c0;
    //    border-top: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .btn {
    $mainColor: #6FB536;
    border-radius: 0;
    font-size: 11px;
    padding: 4px 9px;
    border-color: #538E24;
    background-color: $mainColor;
    color: #ffffff;
    &:hover, &:focus {
      background-color: darken($mainColor, 10%);
    }
  }

  // Tab-Navigator
  .tab-content.ui-tabs-panel {
    overflow: visible;
  }
  // Vis-ui legacy construct alert: fieldsets are used as a standin of .form-inline but with
  // label placement above input.
  // Luckily, these all have the form-group class added
  fieldset.form-group {
    > .form-group {
      display: inline-block;
      padding-right: 15px;
    }
  }
}

form {
  // Form holder, needed to disable group form elements.
  // Example: <fieldset disabled="disabled">...</fieldset>
  > fieldset {
    border: none;
    padding: 0;
  }

  //  label{
  //    color: #2A2929;
  //  }

  .form-group {

    > label {
      margin-bottom: 0;
    }
  }
}

.checkbox-container {
  .checkbox-inline {
    clear: both;
    label {
      white-space: nowrap;
    }
  }
}

form {
  input[type='submit'].hidden {
    display: none;
  }
}

.has-spinner {
  &.active {
    cursor: progress;
    &.spinner {
      opacity: 1;
      width: auto; /* This doesn't work, just fix for unknown width elements */
    }
  }

  .spinner {
    display: inline-block;
    opacity: 0;
    width: 0;

    -webkit-transition: opacity 0.25s, width 0.25s;
    -moz-transition: opacity 0.25s, width 0.25s;
    -o-transition: opacity 0.25s, width 0.25s;
    transition: opacity 0.25s, width 0.25s;
  }

}

/**
* Notify JS settings
*/
.notifyjs-container {
  border-radius: 8px;
  box-shadow: -2px 2px 16px 0px rgba(0, 0, 0, 0.75);
  font-size: $uiFontSize;

  .notifyjs-bootstrap-base {
    padding: 6px 6px 4px 25px;
  }
}

.logoContainer {
  float: left;
}


.toolBar {
  opacity: 1; // avoid applying opacity twice (gradient + $toolBarOpacity)
  &.top {
    background: linear-gradient(0deg, rgba($toolBarBackgroundColor, 0.9), rgba($toolBarBackgroundColor, 0.7));
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    // scale button icons and text all to the same size, undoing .iconBig
    font-size: 1.6rem;
    .toolBarItem {
      .iconBig {
        vertical-align: initial;
        font-size: inherit;
      }
    }
  }
  &.bottom {
    background: linear-gradient(0deg, rgba($toolBarBackgroundColor, 0.7), rgba($toolBarBackgroundColor, 0.9));
    box-shadow: 0 -0.5rem 1rem rgba(0, 0, 0, 0.15);
  }
}
.toolBar.top {
  .toolBarItem {
    border-radius: 2 * $radius;
    &.logoContainer {
      border-radius: 0;
      padding: 0; // use padding pixels for more of the logo
    }
  }
  .toolBarItem + .toolBarItem {
    margin-left: 0.5rem;
  }
}


.logo {
  max-height: 29px; //HACK; =line-height + toolBarItem vertical padding
}
.map-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  .map-overlay-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    div.toolBar {
      flex: 0;
    }
    div.sidePane {
      flex: 1;
    }
    div.toolBar {
      position: initial;
    }
  }
}

.map-overlay, .map-overlay-column, .overlay-fill {
  pointer-events: none;
}
.overlay-fill > *, .toolBar {
  pointer-events: initial;
}

.collapse-toggle {
  color: #444;
  background: #ccc;
}

.sidePane {
  &:after {
    clear: both;
  }
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95));
  color: #222;
  // Make Legend and maybe other images visible against inverted background
  img {
    background: rgba(192, 192, 192, 0.85);
    padding: $radius;
    border-radius: $radius;
  }
}

html .accordionContainer .accordion {
  background-color: #777;
  color: #ddd;
  font-size: 1.6rem;
  line-height: 1.5; // @todo: undo global fixed-pixel-unit line height!
  &.active {
    color: #fff;
    &:hover {
      background-color: #888;
    }
  }
  &:hover {
    background-color: #888;
  }
  &.active, &:hover, &.active:hover {
    background-color: #888;
  }
}

.mb-element-layertree, .mb-element-basesourceswitcher {
  font-size: 1.1rem;
}
