/**
 * The MIT License (MIT)
 *
 * Copyright (c) Camptocamp SA
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

@import 'gmf/sass/vars.scss';

$table-height: $displayquerygrid-height - $app-margin - 2 * $map-tools-size;

.panel.gmf-displayquerygrid {
  padding: $half-app-margin;
  border-top: solid 0.06rem black;
  background-color: white;
  height: $displayquerygrid-height;
  position: fixed;
  width: 100%;

  .ngeo-grid-table-container {
    height: $table-height;
    overflow: auto;
  }

  .table {
    background-color: white;
    width: 100%;
  }

  .table th {
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
  }

  .table > tbody > tr.ngeo-grid-active > td {
    background-color: #c9c9c9;
  }

  .nav-pills {
    padding-bottom: $half-app-margin;
    font-size: $font-size-small;
  }

  .nav-pills > li > a {
    padding: 0.12rem 0.44rem;
    margin-right: 0rem;
  }

  table > tbody > tr > td,
  table > tbody > tr > th,
  table > tfoot > tr > td,
  table > tfoot > tr > th,
  table > thead > tr > td,
  table > thead > tr > th {
    padding: 0.12rem;
  }

  .gmf-displayquerygrid-message {
    width: 18.75rem;
    text-align: center;
    font-style: italic;
    margin-left: auto;
    margin-right: auto;
    margin-top: $app-margin;
  }

  .spinner-grid {
    width: 100%;
    i {
      fill: black;
      margin-top: 2rem;
      margin-left: 50%;
      margin-right: 50%;
    }
  }

  .floatThead-container {
    z-index: initial !important;
  }
}

.gmf-query-grid-active main {
  height: calc(100% - #{$displayquerygrid-height});
}

.gmf-query-grid-too-many {
  font-style: italic;
  position: relative;
  top: 50%;
}
