@import url("bootswatch-flatly.min.css");

/* ==== Google fonts ==== */
@import url("https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic|Montserrat:700|Merriweather:400italic");
@import url("https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700");

/* =========================
   GLOBAL / LAYOUT (critical)
   ========================= */

:root{
  --primary: #e4d078 !important;
  --success: #5b9bd5 !important;
}

html, body{
  height: 100%;
  margin: 0;
}

body{
  padding-top: 50px;   /* fixed navbar height */
  margin-bottom: 0;
  overflow: hidden;    /* app scroll is inside sidebars, not the page */
  font-family: "OpenSans";
}

/* main flex wrapper must have a real height for Leaflet */
#app.wrapper{
  height: calc(100vh - 50px - 70px); /* viewport - navbar - footer */
  overflow: hidden;
  align-items: stretch;
}

/* Leaflet map on index page */
#map-index{
  width: 100%;
  height: 100%;
  min-height: 200px;   /* safety */
  margin: 0 !important;
}

/* =========================
   TEXT / LINKS
   ========================= */

.dont-break-out{
  overflow-wrap: break-word;
  word-wrap: break-word;

  -ms-word-break: break-all;
  word-break: break-all;
  word-break: break-word;

  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

a{
  color: var(--success);
  font-weight: bolder;
}
a:visited{ color: purple; }
.footer-subregion a:visited{ color: var(--success); }
a:hover{ color: #2a5b88; }

p{ margin: 10px; }

hr{ color: lavender; }

/* =========================
   NAVBAR
   ========================= */

.bg-primary{ background-color: var(--primary) !important; }

.navbar{
  padding: 0;
  height: 50px;
}

.navbar > .container{
  justify-content: start;
}

.navbar-brand{
  color: #fff !important;
  font-size: 20px;
  line-height: 40px;
  text-transform: uppercase;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
}

.navbar-brand.secondary{
  font-size: 12px;
  margin-left: auto;
  padding: 5px 15px;
}

.navbar-brand.secondary:hover{
  background-color: #ddc249;
}

.dropdown{ margin-left: auto; }

.dropdown-menu{
  padding: 0;
  background-color: transparent;
  border: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,.175);
  background-clip: padding-box;
  left: auto;
  right: 16px;
}

.dropdown-item{
  color: #4c4c4c;
  background-color: #fff;
  padding-left: 1rem;
  padding-bottom: 14px;
  padding-top: 14px;
}
.dropdown-item:visited{ color: #4c4c4c; }
.dropdown-item:hover, .dropdown-item:focus{
  color: #fff;
  text-decoration: none;
  background-color: #ddc249;
}
.dropdown-item.active, .dropdown-item:active{
  color: #fff;
  text-decoration: none;
  background-color: #ddc249;
}
.dropdown-item.disabled, .dropdown-item:disabled{
  color: #95a5a6;
  background-color: transparent;
}

/* hide E-PRIRODA on small screens */
@media screen and (max-width: 992px){
  .navbar-brand.secondary{ display: none; }
}

#navbar-fond-logo{
  height: 40px;
  display: table-cell;
  float: left;
  margin: 0;
}

/* responsive brand + logo */
@media screen and (min-width: 992px){
  #navbar-brandps-sm{ display: none; }
  #navbar-zlogo-sm{ display: none; }
}
@media screen and (max-width: 992px){
  #navbar-brandps-lg{ display: none; }
  #navbar-brandps-sm{
    position: absolute;
    left: 10px;
  }

  #navbar-zlogo-lg{ display: none; }
  #navbar-zlogo-sm{
    position: absolute;
    left: 110px;
  }
}

/* navbar toggler */
.navbar-toggler{ border-color: rgba(0,0,0,0) !important; }
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus{
  outline: none;
}

@media screen and (max-width: 992px){
  .navbar-toggler{
    position: absolute;
    right: 0px;
  }
  .togglePsList{ display: none; }
}

/* =========================
   FOOTER
   ========================= */

#footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #4c4c4c;
  height: 70px;
  padding: 10px;
  font-size: 12px;
  color: #cccccc;
}

.footer-subregion{
  float: left;
  height: 100%;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-subregion div,
.footer-subregion span,
.footer-subregion img{
  display: table-cell;
}

#footer-copyright{
  float: right;
  padding: 0 5px;
}

#min-logo{ height: 30px; }
#fond-logo{ height: 40px; }

@media screen and (max-width: 760px){
  #fond-logo{ display: none; }
}
@media screen and (max-width: 565px){
  #min-logo{ display: none; }
}

/* =========================
   MAP (Leaflet)
   ========================= */

.leaflet-container{
  font: bold 13px/16px OpenSans;
  background: white;
}

.info{
  padding: 6px 8px;
  background: rgba(255,255,255,1);
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  border-radius: 0px;
}

.info h4, h5{
  margin: 0 0 5px;
  color: #777;
}

.legend{
  text-align: left;
  line-height: 18px;
  color: rgb(0, 0, 0);
  display: none;
}

.legend i{
  width: 20px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  font: unset;
  font-weight: bold;
  font-size: 12px;
  float: left;
  padding-right: 2px;
  margin-right: 8px;
  opacity: 1;
}

@media screen and (max-width: 992px){
  .leaflet-control-minimap{ display: none; }
}

/* your existing detail map sizing */
@media screen and (min-width: 992px){
  #map-detail{ max-width: 765px; height: 700px; }
}
@media screen and (min-width: 576px) and (max-width: 992px){
  #map-detail{ max-width: 470px; height: 450px; }
}
@media screen and (max-width: 576px){
  #map-detail{ height: 90vw; }
}

/* "map-location" block used on detail pages */
@media screen and (min-width: 1200px){
  #map-location{ width: 300px; height: 300px; }
  .main-details-container{ width: calc(100vw - 400px); }
}

#legend-button{
  font-size: 54px;
  cursor: pointer;
  color: #717171;
}

/* =========================
   DETAILS / IMAGES
   ========================= */

.main-details-container{
  width: 80%;
  margin: auto;
}

#main-img-container{
  padding-top: 20px;
  padding-bottom: 20px;
}

/* responsive ordering on details pages */
@media screen and (min-width: 600px) and (max-width: 1200px){
  .main-details-container{ width: 100vw; }
  #main-map-container{ order: 2; }
  #map-location{ height: 100vw; }
  #main-text-container{ order: 1; }
  #main-img-container{ order: 3; }
}
@media screen and (max-width: 600px){
  .main-details-container{ width: 100vw; }
  #main-map-container{ order: 1; }
  #map-location{ height: 100vw; }
  #main-text-container{ order: 2; }
  #main-img-container{ order: 3; }
}
@media screen and (max-width: 400px){
  .main-details-container{ width: 100vw; }
  #main-map-container{ order: 1; }
  #map-location{ height: 100vw; }
  #main-text-container{ order: 2; }
  #main-img-container{ order: 3; }
}

.front-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================
   BOOTSTRAP "WELL"
   ========================= */

.well{
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}

.well-lg{ padding: 24px; border-radius: 6px; }
.well-sm{ padding: 9px; border-radius: 3px; }

.well blockquote{
  border-color: #ddd;
  border-color: rgba(0,0,0,.15);
}

.ps-title{
  padding: 20px 10px;
  text-align: center;
  font-variant-caps: small-caps;
}

.ps-title span{ font-size: larger; }

.icon-info{
  margin-left: 5px;
  font-size: 20px;
  cursor: pointer;
  color: #5b9bd5;
  vertical-align: middle;
  margin-top: -3px;
}

/* =========================
   MODALS / TABLES
   ========================= */

.modal-footer{
  font-weight: bold;
  font-variant-caps: small-caps;
  justify-content: center;
}
.modal-title{ font-variant-caps: small-caps; }

td p{ margin: unset; }

/* =========================
   SIDEBARS
   ========================= */

.wrapper{
  display: flex;
  width: 100%;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: hidden;
}

@media screen and (min-width: 992px){
  #sidebar-start{
    min-width: 70px;
    margin-right: 0px;
    height: calc(100vh - 120px);
    background-color: #717171;
  }
  #sidebar-start-sm{ display: none; }

  #sidebar-start-details{
    display: block;
    flex-basis: unset;
    min-width: 100px;
    margin-right: 0px;
    height: calc(100vh - 120px);
    background-color: #717171;
  }
}

@media screen and (max-width: 992px){
  #sidebar-start-sm{
    flex-basis: unset;
    min-width: 70px;
    margin-right: 0px;
    height: calc(100vh - 176px);
    background-color: #717171;
  }
  #sidebar-start{ display: none; }

  #sidebar-start-details{
    flex-basis: unset;
    min-width: 100px;
    margin-right: 0px;
    height: calc(100vh - 120px);
    background-color: #717171;
  }
}

.sidebar-start-btns{
  width: 100%;
  height: 70px;
  line-height: 70px;
  text-align: center;
  font-size: 11px;
  margin: auto;
  margin-bottom: 1px;
  background-color: #4c4c4c;
  color: white;
  cursor: pointer;
  box-sizing: border-box;
  text-transform: uppercase;
  font-family: Montserrat, sans-serif;
}

.sidebar-start-btns:hover{
  background-color: #e4d078;
  font-weight: bolder;
}

.sidebar-start-btns.active{
  background-color: #e4d078;
  font-weight: bolder;
}

#sidebar-search{
  min-width: 250px;
  max-width: 250px;
  height: calc(100vh - 120px);
  margin-right: -250px;
  overflow-y: auto;
}

@media screen and (max-width: 992px){
  #sidebar-info{
    min-width: 100vw;
    max-width: 100vw;
    height: calc(100vh - 120px);
    margin-right: calc(0px - 100vw);
    overflow-y: auto;
  }
}

@media screen and (min-width: 992px){
  #sidebar-info{
    min-width: 450px;
    max-width: 450px;
    height: calc(100vh - 120px);
    margin-right: -450px;
    overflow-y: auto;
  }
}

@media screen and (max-width: 480px){
  #sidebar-info{ height: calc(100vh - 176px); }
  #sidebar-search{ height: calc(100vh - 176px); }
}

#sidebar-pslist{
  min-width: 1000px;
  max-width: 1000px;
  height: calc(100vh - 120px);
  margin-right: -1000px;
  overflow-y: auto;
}

#sidebar-search.active,
#sidebar-info.active,
#sidebar-pslist.active{
  margin-right: 0px;
}

a[data-toggle="collapse"]{ position: relative; }

.dropdown-toggle::after{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 992px){
  #sidebar-search,
  #sidebar-info,
  #sidebar-pslist{
    margin-left: 0px;
  }
  #sidebar-search.active,
  #sidebar-info.active,
  #sidebar-pslist.active{
    margin-left: -250px;
  }
}

/* sidebar look */
#sidebar-search,
#sidebar-info,
#sidebar-pslist{
  background: #fff;
  color: #000;
  transition: margin 0.4s ease-in;
  padding: 2px 5px;
}

#sidebar-search .sidebar-header,
#sidebar-info .sidebar-header,
#sidebar-pslist .sidebar-header{
  padding: 10px;
  background: #fff;
  color: black;
  margin-top: 10px;
  margin-bottom: -10px;
  position: relative;
}

.sidebar-content{ color: #777; }

#sidebar-search{ z-index: 100000; }
#sidebar-info, #sidebar-pslist{ z-index: 100001; }

.sidebar-header a{ color: #4c4c4c; }
.sidebar-header a:hover{ color: #777; text-decoration: unset; }

.sidebar-header .sidebar-closebtn{
  position: absolute;
  top: -15px;
  right: 10px;
  font-size: 36px;
}

/* FIX DAL field and dropdown width */
.select2-container {
    min-width: unset !important;
}

.select2-container .select2-selection--single {
    height: auto !important;
    min-height: unset !important;
}

/* PSLIST table */
.table-sidebar-pslist{
  margin-top: 10px;
}

.table-sidebar-pslist td,
.table-sidebar-pslist th{
  width: auto;
  padding: 2px 10px 2px;
}

/* details tables */
.table-details th,
.table-details td{
  padding: 0.2rem;
}

.table-details th{ width: 30%; }

.table-designation,
.table-location,
#table-info,
.table-manager,
.table-reference{
  border-top-style: hidden;
}

@media screen and (max-width: 480px){
  .table-reference th{
    max-width: 15vw;
    word-wrap: break-word;
  }
  .table-reference ul{
    padding-inline-start: 10px;
    list-style-type: none;
  }
}
@media screen and (min-width: 480px){
  .table-reference th{ max-width: 15%; }
}

.table-reference li{ padding-bottom: 10px; }

/* =========================
   FORMS
   ========================= */

.form-control{
  border-radius: 0;
  padding: 5px;
}

.form-frame{ border: 0; }

.form-group{
  font-family: "OpenSans", sans-serif;
}

/* =========================
   SEARCH RESULTS
   ========================= */

.search-results-container{
  padding: 50px 0px;
  min-width: 100%;
  max-width: 100%;
  height: calc(100vh - 120px);
  overflow-y: auto;
}

@media screen and (min-width: 992px){
  .search-result{
    width: 50%;
    margin: auto;
    border-radius: 0;
    border-color: #cccccc !important;
    display: table;
    clear: both;
  }
}

@media screen and (max-width: 992px){
  .search-result{
    width: 80%;
    margin: auto;
    border-radius: 0;
    border-color: #cccccc !important;
    display: table;
    clear: both;
  }
  .card-body{
    padding: 5px;
    float: left;
    width: 60%;
  }
  .result-img-container{
    width: 40%;
    float: left;
    padding: 5px;
    display: table-cell;
    vertical-align: middle;
  }
  .card-title{
    font-size: 1rem;
    margin: unset;
    padding: 5px;
  }
  .card-header{
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

@media screen and (min-width: 992px){
  .card-body{
    float: left;
    width: 70%;
  }
  .result-img-container{
    width: 30%;
    float: left;
    padding: 5px;
    display: table-cell;
    vertical-align: middle;
  }
}

.result-img{
  max-width: 100%;
  max-height: 100%;
}

#search-result-text-warning{
  width: 100%;
  font-weight: bold;
}