// GN Styles
@import "../lib/style/font-awesome/less/font-awesome.less";
@import "gn_bootstrap.less";
@import "gn_infolist.less";
@import "gn_badge_categories.less";

@import "../lib/bootstrap.ext/tagsinput/bootstrap-tagsinput.less";
// import the css files as less files so they are included in the final output of wro4j
@import (less) "../lib/bootstrap.ext/datepicker/datepicker.css";
@import (less) "../lib/style/datetimepicker.css";
@import (less) "../lib/angular.ext/colorpicker/angularjs-color-picker.min.css";

@import (less) "inspire/iti.css";
// Import this CSS to have INSPIRE themes translations
//@import (less) "inspire/iti-i18n.css";

@import "gn.less";
@import "gn_viewer.less";

@fa-version: '4.1.0';
@fa-font-path: '../catalog/lib/style/font-awesome/fonts';

@panel-heading-height: 2.8em;


.gn-facet-list {
  .fa-lg {
    font-size: 1.2em;
  }
  a:hover, a:focus {
    text-decoration: none;
  }
}
.gn-facet {
  h4 {
    font-size: 14px;
    text-transform: uppercase;
  }
  .list-group {
    border-left: 1px dotted rgba(0, 0, 0, 0.2);
    margin-left: .5em;
    padding-left: 1em;
    margin-bottom: 0;
    font-size: 13px;

    .list-group {
      margin-left: 0.2em;
    }
  }
  .list-group-item {
    padding: 0.1em;
    color: #555555;
    border: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
    * { flex-shrink: 0; }

    [data-gn-facet-dimension-category] {
      width: 100%;
    }

    label {
      margin-bottom: 0px;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      flex-direction: row;
      min-width: 0px;
      flex-shrink: 1;
      &.gn-facet-active {
        color: @gray-darker
      }
    }
    input {
      margin: 0px;
      margin-top: 1px;
    }
    button {
      margin: 0px;
      padding: 0px;
      font-size: 13px;
    }
    .gn-facet-label {
      flex-shrink: 1;
      flex-grow: 0;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
    .badge {
      margin: 0px 6px;
    }
  }
  .gn-facet-count, .list-group-item > span.fa {
    color: @gray-light;
  }
  .gn-facet-toggle {
    cursor: pointer;
  }
  .list-group-item:hover {
    color: @brand-primary;
  }
  .input-daterange {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .gn-graph {
    overflow-x: hidden;
    max-height: none;
    position: relative;
  }
  .gn-graph-buttons {
    position: absolute;
    left: 1em;
    top: 0;
  }

}
.gn-facet-breadcrumb {
  margin-top: 8px;
  li > a:hover {
    color: darkred;
    text-decoration: line-through;
  }
}

/*HOME*/
.search-over {
  color: #aaa;
  text-align: center;
  margin-top: 5px;
}
.gn-form-any {
  input.input-lg {
    height:45px;
    border-radius: 3px;
  }
  .input-group-btn a {
    border-radius: 3px;
  }
  .dropdown-menu {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    li a {
      .text-overflow();
    }
  }
}
.gn-icon-bg {
  height: 130px;

  text-align: center;
  .gn-icon-label {
    font-size: 70%;
  }
  .badge {
    background-color: #428BCA;
  }
  :hover {
    color: #fff;
    background-color: #428BCA;
    text-decoration:none;
    .badge {
      background-color: #ffffff;
      color: #428BCA;
    }
  }
}

span.gn-facet-label {
  display: inline-block;
}

.gn-select ul.dropdown-menu > li > a:first-letter,
.gn-sort-by ul.dropdown-menu > li > a:first-letter,
[data-gn-period-chooser] ul > li > a:first-letter,
span.gn-facet-label:first-letter {
  text-transform: uppercase;
}

// fix sort-by combo case
.gn-sort-by .btn.dropdown-toggle {
  text-transform: lowercase;
  &:first-letter {
    text-transform: uppercase;
  }
}

/* TODO: Deprecate due to change in gn-pager and gn-sort-by */
[sortby-combo], [hitsperpage-combo] {
  display: inline-block;
  vertical-align: top;
  select {
    .input-sm;
  }
}

.top-buffer {
  margin-top: 2em;
}

[data-gn-facet-list] {
  h4 {
    font-size: 14px;
  }
}

/* typeahead styles */
.twitter-typeahead {
  width: 100%;
}

.tt-query {
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.tt-hint {
  color: #999;
  pointer-events: none;
}

.tt-menu {
  margin-top: 7px;
  margin-left: -7px;
  padding: 8px 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
  -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
  box-shadow: 0 5px 10px rgba(0,0,0,.2);
  max-height: 350px;
  overflow-y: auto;
  width: calc(~"100% + 14px");
}

.tt-suggestion {
  padding: 3px 10px;
}


.tt-suggestion p {
  margin: 0;
  margin-top:2px;
  line-height: normal;

}
.tt-hint {
  color: #999;
  width: 100% !important;
  border: none !important;
}
.bootstrap-tagsinput .tt-input {
  width: 100% !important;
  border: none !important;
}
/** Enf of typeahead styles */
.bootstrap-tagsinput {
  width: 100%;
  .tag-content {
    display: inline-block;
    max-width: 10em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.tagsinput-clear,
.tagsinput-trigger {
  position: absolute;
  top: 4px;
  right: 26px;
}
.tagsinput-trigger {
  top: .575em;
  right: 20px;
  font-size: 16px;
  font-weight: normal;
}

[gn-bootstrap-datepicker].input-group[class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
}

[gn-collapsible], [data-gn-collapsible] {
  cursor: pointer;
}
.gn-searchform {
  .backtonormal {
    margin-bottom: -20px;
  }
  font-size: 90%;
  label {
    font-weight: normal;
  }
  input[type='text'], select {
    .input-sm;
  }
  .form-group {
    margin-bottom: 10px;
  }
  .bootstrap-tagsinput {
    padding: 0;
  }
  .advanced .bootstrap-tagsinput {
    margin-bottom: 0;
  }
  .tt-menu {
    left: 6px !important;
    width: 100%;
  }
  legend {
    font-size: 1em;
    font-style: italic;
    padding-top: .4em;
    margin-bottom: 12px;
  }
  .bootstrap-tagsinput {
    .label {
      .label-primary;
      font-size: 12px;
      font-weight: normal;
      margin: 2px;
    }
  }
}

[gn-selection-widget] {
  display: inline-block;
  position: relative;
  .md-checkbox {
    position: absolute;
    z-index: 10;
    top: 0.7em;
    left: 0.9em;
  }
  .btn-group [type=checkbox] {
    visibility: hidden;
    pointer-events: none;
  }
}

[ngeo-map] {
  width: 100%;
  height: 250px;
}


.collapse-text-toggle {
  color: grey;
}


[search-results] {
  h4 {
    font-size: 15px;
  }
  .list-group {
    margin-bottom: 0;
  }
  .list-group-item {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    &:first-of-type {
      border-top-width: 0;
    }
    &:last-of-type {
      border-bottom-width: 0;
    }
  }
}

.gn-resultview {
  .gn-md-links {
    background: rgba(0,0,0,.02);
    line-height: 3em;
    font-size: 90%;
    margin: 0;
    //margin-left: 6em;
    .dropdown-menu {
      max-width: 500px;
      li a {
        padding-top: 1px;
        padding-bottom: 1px;
        line-height: normal;
        .text-overflow();
      }
    }

  }
  h4 {
    font-size: 14px;
  }
  p {
    font-size: .9em;
  }
  blockquote {
    padding: 6px 20px;
    margin:0;
    font-size: 90%;
    color: #666;
  }
  li:hover {
    background: lighten(spin(@state-info-bg, -10), 7%);
    cursor: pointer;
    background-color:  #428bca;
  }
  .gn-md-edit-btn {
    //position: absolute;
    //bottom: 0px;
    //right: 0px;
    //margin: 2px;
    //z-index: 10;
    //float: right;
  }
  .invisible {
    display: none;
  }
  .gn-md-thumbnail {
    float:left;
    width: 140px;
    height: 140px;
    margin-right: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    .gn-img-thumbnail {
      margin: 0;
      min-height: 100%;
    }
  }
  .gn-md-no-thumbnail {
    background-image: url(../catalog/views/default/images/no-thumbnail.png);
  }
}


.gn-top-records {
  .well();

  /* Make a wide div with an horizontal scroll */
  [data-gn-results-container] {
    overflow-x: scroll;
    overflow-y: hidden;

    .gn-resultview {
      display: flex;
    }

    /* to loop over results */
    li.gn-grid {
      width: 200px;
      min-width: 200px;
      height: 200px;
      text-align: center;

      .gn-md-thumbnail {
        display: inline-block;
        float: none;
        margin-right: 0px;
        .gn-img-thumbnail {

        }
      }
    }
  }
}

.gn-img-thumbnail-caption {
  text-align: center;
  font-size: 90%;
  font-style: italic;
  color: @text-muted;
}

.gn-md-edit-btn {
  .btn();
  .btn-primary();
}
.gn-md-delete-btn {
  .btn();
  .btn-danger();
}

/* Add space between button when pulled right */
.gn-md-edit-btn.pull-right,
.gn-md-delete-btn.pull-right,
.gn-md-actions-btn.pull-right.btn-group,
.gn-md-actions-btn.pull-right {
  margin-right: 5px;
}

[data-ng-search-form],
[ng-search-form],
.gn-search-page {
  .whidden,
  [class*=col-md] {
    transition: width ease .25s;
    transition-property: width, margin;
  }
  .whidden {
    width: 0;
    overflow-x: hidden;
  }

  .filter {
    .pull-right();
    margin: .8em -.3em 0 .8em;
  }

  .panel-heading {
    padding: 0 15px;
    height: @panel-heading-height;
    line-height: @panel-heading-height;
    [sortby-combo], [hitsperpage-combo] {
      vertical-align: middle;
    }
  }

  [gn-map-field],
  [data-gn-map-field] {
    .gn-draw-btn,
    .btn-group-vertical {
      top: 4px;
      position: absolute;
      z-index: 10;
    }
    .btn-group-vertical {
      right: 4px;
    }

    .gn-draw-btn {
      left: 4px;
    }
  }
}

.dropdown-submenu {
  position:relative;
}
.dropdown-submenu>.dropdown-menu {
  top:0;
  left:100%;
  margin-top:-6px;
  margin-left:-1px;
  -webkit-border-radius:0 6px 6px 6px;
  -moz-border-radius:0 6px 6px 6px;
  border-radius:0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
  display:block;
}
.dropdown-submenu>a:after {
  display:block;
  content:" ";
  float:right;
  width:0;
  height:0;
  border-color:transparent;
  border-style:solid;
  border-width:5px 0 5px 5px;
  border-left-color:#cccccc;
  margin-top:5px;
  margin-right:-10px;
}
.dropdown-submenu:hover>a:after {
  border-left-color:#ffffff;
}
.dropdown-submenu.pull-left {
  float:none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
  left:-100%;
  margin-left:10px;
  -webkit-border-radius:6px 0 6px 6px;
  -moz-border-radius:6px 0 6px 6px;
  border-radius:6px 0 6px 6px;
}

.relatedMd {
  .relatedRecord {
    float:left;
    padding:8px;
    cursor: pointer;
  }
}

.cookie-warning {
  text-align: center;
  width: 100%;
  span {
    font-weight: bolder;
    font-color: #428bca;
    cursor: pointer;
  }
}

button:focus [role=tooltip],
button:hover [role=tooltip] {
  clip: auto;
  right: 2.8em;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  padding: .2em .5em;
  margin-top: -.2em;
  border-radius: .2em 0 0 .2em;
  text-shadow: 0 0 1px #000;
  z-index: 9000;
}
button.active [role=tooltip] {
  display: none;
}

.gn-close-btn {
  cursor: pointer;
  &:hover {
    color: grey;
  }
}

[gn-share] {

  @media (min-width: @screen-md) {
    min-width: 600px;
  }
  .gn-searchgroup-input {
    padding-left: 0;
    max-width: 400px;
  }
  .gn-share-grid {
    table {
      width: auto;
    }
    thead, tbody {
      display: block;
    }
    tbody {
      max-height: 400px;
      overflow-y: auto;
      overflow-x: hidden;
    }
    td,th {
      text-align: center;
      width: 7em;
      &:first-child {
        width: 15em;
        text-align: left;
      }
      td {
        padding-top: 2px;
        padding-bottom: 2px;
      }
    }

  }
}
.gn-privileges-popup {
  position: fixed !important;
  max-width: 750px;
  .gn-popup-content {
    vertical-align: top;
    max-height: 750px;
    .gn-share-grid {
      tbody {
        max-height: 45vh;
      }
    }
  }
}
.gn-popup-title {
  span {
    display: inline-block;
    max-width: 660px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

.gn-required > label:after,
.gn-mandatory > label:after {
  content: " *";
  color: #a94442;
  font-weight: normal;
}

//datepicker highlight
.gn-date-hl {
  text-decoration: underline;
}
.datepicker-dropdown.datepicker-orient-bottom:before {
  border: none;
}
.gn-related-list {
  padding: 0;
  list-style: none;
  > li {
    padding-left: 25px;
    &:hover {
      text-decoration: none;
      color: #262626;
      background-color: #f5f5f5;
    }
    &.gn-related-type {
      padding-left: 15px;
      padding-bottom: 1px;
      min-width: 250px;
      &:hover {
        background-color: transparent;
        cursor: default !important;
      }
      &:first-letter {
        text-transform: uppercase;
      }
    }
    &:not(.gn-related-type) {
      font-size: 12px;
    }
  }
}

.gn-baselayer-switcher-menu {
  > li {
    cursor: pointer !important;
  }
}

.gn-baselayer-switcher-content {
  overflow-y:auto;
  max-height: 350px;
}
