@import 'fonts/font.css';

#map {
  width: 100%;
  height: 100%;
}

#app #map {
  margin: 0;
  height: 100%;
  font-family: graphic-regular, sans-serif;
  color: #4f1c23;
}

.ol-zoom,
.ol-geobt,
.ol-geolocation,
.ol-full-screen,
.ol-attribution {
  left: .5em;
  z-index: 1;
}

.ol-zoom {
  top: 4.5em;
}

.ol-geobt,
.ol-full-screen,
.ol-attribution {
  right: auto;
}

.ol-scale-line {
  bottom: 0.5em;
  left: 0.5em;
}

.ol-attribution {
  bottom: 2.5em;
}

.ol-rotate {
  top: 8em;
  left: .5em;
}

.ol-geolocation {
  left: .5em !important;
  right: auto !important;
  top: 2.5em !important;
  bottom: auto !important;
}

.ol-geobt {
  left: .5em !important;
  right: auto !important;
  top: 8em !important;
  bottom: auto !important;
  display: none;
}

.ol-control.ol-geolocation button {
  background-color: rgba(0,60,136,0.7) !important;
}

.ol-control.ol-geolocation .ol-geolocation-false {
  background-color: #aaa !important;
}

.ol-zoom .ol-zoom-in,
.ol-zoom .ol-zoom-out {
  border-radius: 0;
}

.ol-control.ol-bar.ol-right .ol-group .ol-control:last-child > button {
  border-radius: 0;
}

.loading {
  display: none;
  background: #fff;
  border: 2px solid #369;
  left: 50%;
  margin: -2em -100px;
  padding: 0.5em;
  position: fixed;
  text-align: center;
  top: 50%;
  width: 200px;
  z-index: 1;
  box-sizing: border-box;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn {
  border-radius: 0;
  box-shadow: none;
  border: none;
  background-color: #b2b019;
  color: #fff;
  margin: 2px;
  padding: 6px 12px;
}
.btn:hover {
  background-color: #868484;
  color: #fff;
  border: none;
  text-decoration: none;
  cursor: pointer;
}

/*
 * menu
 * ************************/
.ol-control {
  padding: 0;
}
.ol-control.ol-bar {
  min-height: 0;
  min-width: 0;
}
.ol-control.ol-toggle button {
  cursor: pointer;
}
.ol-control.ol-bar.ol-right .ol-group {
  margin: 0;
}
.menuBar.ol-control.ol-bar.ol-top.ol-right {
  top: 0;
  right: 0;
  border: none;
  border-radius: 0;
  width: 0;
  max-width: 95%;
  background: #b2b019;
}
.ol-touch .ol-control.ol-bar.ol-top.ol-right, .ol-touch .ol-control.ol-bar.ol-top.ol-right {
  top: .5em;
}
.menuBar.ol-control.ol-bar.ol-right .ol-control,
.menuBar.ol-control.ol-bar.ol-right .ol-control {
  display: inline-block;
}
.menuBar.ol-control.ol-bar .ol-control.ol-toggle {
  margin: 6px;
}
.menuBar.ol-bar .ol-control button {
  background-color: transparent;
}
.menuBar.ol-control.ol-bar .ol-toggle.ol-active > button,
.menuBar.ol-control.ol-bar .ol-toggle.ol-active button:hover i {
  background-color: transparent;
  color: white;
}
.ol-control.ol-bar .ol-toggle.ol-active > button {
  background-color: white;
}
.ol-control button i {
  pointer-events: none;
  color: #4f1c23;
}

.logo button {
  width: auto;
  height: auto;
}
.logo img {
  width: 180px;
}
.logo2 img {
  width: 90px;
  margin-left: 20px;
}

.langBar {
  float: right;
  /*display: none !important;*/
}

.lang button {
  color: black;
}

.ol-control button {
  cursor: pointer;
  background-color: #aaa;
  border-radius: 0;
}
.ol-control button:hover {
  background-color: #777;
}
.ol-group .ol-bar .ol-control button {
  background-color: transparent;
}
.menuBar.ol-bar .ol-control button:hover i, 
.menuBar.ol-bar .ol-control button:focus i {
  color: white;
  background-color: transparent;
}

/*
 * overlays
 * ************************/
.ol-overlay.window { 
  width: 0;
  max-width: 95%;
  background: #fff;
  color: #333;
  padding: 0.5em;
  -webkit-transition: all 0.25s;
  transition: all 0.25s;
  top: 2em;
  height: auto;
  min-height: 500px;
  max-height: 100%;
  bottom: unset;
}

.ol-overlay.window {
  right: 0;
  left: auto;
  padding: 0;
}
.ol-overlay.infoWindow {
  left: 3em;
  padding: 0;
  border: 2px solid #b2b019;
}
.ol-touch .ol-overlay.infoWindow {
  left: .5em;
  right: auto;
}

.ol-overlay.window .ol-closebox { 
  color: #fff;
  right: 5px;
  top: 5px;
}
.ol-overlay.window .ol-closebox:before { 
  content: "\f00d";
  font-family: FontAwesome;
}
.ol-overlay.window.layersWindow .ol-closebox { 
  display: none;
}
#menu { 
  padding-top: 1.5em;
  font-size: 0.9em;
}

.window h2 {
  color: #ffffff;
  background-color: #b2b019;
  margin: 0;
  padding: .3em;
  font-size: 16px;
  font-family: graphic-semibold, sans-serif;
  text-transform: uppercase;
  position: relative;
}

h3 {
  font-size: 16px;
  font-family: graphic-semibold, sans-serif;
  border-bottom: 1px solid #4f1c23;
}

.dataTables_wrapper .link {
  text-decoration: underline;
  cursor: pointer;
}

.window .content {
  padding: 20px;
}

.window .content p {
  margin-top: 0;
}

.window .title {
  margin-left: 5px;
}

.window.layersWindow {
  height: calc(100% - 35px);
  z-index: 12;
}

#windowLayers {
  height: 100%;
  border: 2px solid #b2b019;
}

#windowLayers .content {
  height: calc(100% - 135px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 10px;
}

.window.tableWindow,
.window.infoWindow {
  width: calc(100% - 400px);
  max-width: 1000px;
  top: 20px;
  left: 50px;
  z-index: 12;
  border: 2px solid #b2b019;
}
#pois-table,
#rutas-table {
  width: 100% !important;
}
.window.tableWindow .content,
.window.infoWindow .content {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 600px;
}

a.button, #exportPdf {
  background-color: #b2b019;
  color: white;
  padding: 5px;
  text-decoration: none;
}
#exportPdf {
  border: none;
  cursor: pointer;
}

/*
 * layer switcher
 * ************************/
.layer-control {
  right: 0.5em;
  top: 1em;
  transition: right 500ms;
}
.layer-control.open {
  right: 344px;
}

.menuBar,
.layersWindow {
  transition: right 500ms;
}
.menuBar.open,
.layersWindow.open {
  width: 344px !important;
}

.menuBar .langBar {
  width: 0;
}
.menuBar.open .langBar {
  width: auto;
}

.layer-switcher {
  position: relative;
  top: auto;
  right: auto;
}
.layer-switcher ul {
  margin: 0;
}
.layer-switcher ul ul {
  padding-left: 0;
}
.layer-switcher li.group + li.group {
  margin-top: 1em;
}
.layer-switcher li.group > label {
  font-family: graphic-semibold, sans-serif;
  border-bottom: 1px solid #4f1c23;;
  display: block;
}
.layer-switcher li.layer {
  width: 100%;
  display: table;
}
li.layer label {
  display: unset;
}
li.layer i {
  float: right;
  cursor: pointer;
}
img.legend {
  padding-left: 20px;
  display: none;
  max-width: 100%;
}
li.poiLayer {
  cursor: pointer;
}
li.group.off,
li.poiLayer.off {
  color: #aaa;
}
li.poiLayer.off img {
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
  opacity: 0.5;
}

li.layer img.legend,
li.layer._nivell-de-protecci__00f3-d__2019espais-oberts img.legend:nth-of-type(2) {
  position: relative;
  margin-top: -10px;
  z-index: -1;
}
li.layer._nivell-de-protecci__00f3-d__2019espais-oberts img.legend:nth-of-type(2) {
  z-index: -2;
}
li.layer._planejament-urban__00edstic img.legend,
li.layer._cadastre img.legend {
  margin-top: 0;
}
li.layer._limit-administratiu img.legend:nth-of-type(2) {
  z-index: -2;
}
li.layer._limit-administratiu img.legend:nth-of-type(3) {
  z-index: -3;
}

#layerSwitcher input {
  display: none;
}

.layer-switcher li input {
  left: 0;
}
.layer-switcher li label {
  padding-left: 25px;
  margin-left: -20px;
}
.layer-switcher li.group > label {
  padding-left: 20px;
}
.layer-switcher li.base-group > label {
  padding-left: 0;
}
.hidden {
  display: none;
}

.group.layer-switcher-fold button:hover,
.group.layer-switcher-fold label:hover {
  cursor: pointer;
}

.fa-eye.off,
.fa-eye-slash,
.layer-switcher label.off {
  color: #aaa;
}

.layer-switcher .group button {
  right: 0;
  left: auto;
}
.layer-switcher .group.layer-switcher-close button {
  transform: rotate(90deg);
  -webkit-transform: rotate(90deg);
}

.layer-switcher .group.fold.layer-switcher-close > ul {
  overflow: hidden;
  height: 0;
}

.leyenda {
  width: 20px;
  height: 20px;
}

img.leyenda.off {
  -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
  filter: grayscale(100%);
  opacity: 0.5;
  z-index: -1;
  position: relative;
}

.ol-control.ol-layerswitcher-image {
  bottom: 4.5em;
  top: auto !important;
  left: 0.1em;
  right: auto;
}

.ol-control.ol-layerswitcher-image button {
  display: none;
}

.layer._punts-de-inter__00e8s,
.layer._topogr__00e0fic-__0028_i_c_g_c__0029,
.layer._ortofoto-__0028_i_c_g_c__0029,
.layer._openstreetmap {
  display: none !important;
}

.autor {
  float: right;
  margin-right: 20px;
}

.logos {
  position: absolute;
  bottom: 10px;
  right: 30px;
}

.logo1 img {
  width: 180px;
}

.logo2 img {
  width: 90px;
}

.logox img {
  margin-left: 20px;
}

.layer-switcher._rutes {
  margin-top: 1em;
}

#layerSwitcher ._punts-de-inter__00e8s, #layerSwitcher ._puntos-de-inter__00e9s, #layerSwitcher ._points-of-interest, #layerSwitcher ._points-d__0027int__00e9r__00eat {
  margin-top: 1em;
}

.layer-switcher._museos ul ul, .layer-switcher._rutes ul ul {
  list-style:circle;
}

.layer-switcher._museos ul ul li, .layer-switcher._rutes ul ul li {
  margin-left: 18px;
}

.layer-switcher._museos {
  margin-top: 1em;
}

/*
 * tooltip, popup
 * ************************/
.ol-popup {
  display: none;
  position: absolute;
  background-color: white;
  border: 1px solid #cccccc;
  bottom: 12px;
  left: -50px;
}

.featureTooltip .ol-popup:after, .featureTooltip .ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.featureTooltip .ol-popup:after {
  border-top-color: white;
  border-width: 10px;
  left: 48px;
  margin-left: -10px;
}

.featureTooltip .ol-popup:before {
  border-top-color: #cccccc;
  border-width: 11px;
  left: 48px;
  margin-left: -11px;
}

.ol-popup .ol-popup-content {
  min-width: 200px;
  max-height: 450px;
  overflow-x: auto;
  padding: 0;
}

.ol-popup-content h2 {
  text-align: center;
  line-height: 1;
}

.featurePopup {
  transform: none !important;
  top: 20px;
  left: 100px;
  z-index: 12;
  width: calc(100% - 200px);
  max-width: 660px;
}
.featurePopup .ol-popup {
  position: relative;
  min-height: 500px;
  border: 2px solid #b2b019;
}

.featurePopup .ol-popup .padding {
  padding-top: 25px;
  padding: 15px;
}

.featureTooltip {
  z-index: 13;
}

/*.featureTooltip .ol-popup-content {
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}*/

.featurePopup img {
  max-width: 600px;
}
.featureTooltip .imgDiv {
  display: inline-block;
  position: relative;
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 50%;
}
.featureTooltip img {
  width: auto;
  height: 100%;
}

.featurePopup .ol-popup-content {
  min-width: 570px;
  max-height: 600px;
  overflow-x: hidden;
  overflow-y: scroll;
}

.featurePopup .ol-popup-closer {
  position: absolute;
  top: 5px;
  right: 20px;
  font-size: 2em;
  padding: 0 4px;
  color: #4f1c23;
  text-decoration: none;
}

.featurePopup .ol-popup-closer:after {
  content: "\2716";
}

.ol-popup div.infoResult {
  min-width: 130px;
}

.ol-popup div.infoResult p {
  padding: 0.1em;
  margin: 0;
}

.ol-popup-content h3 {
  margin: 0.25em 0;
}

.ol-popup.marker {
  margin-bottom: 30px;
}

/*
 * accordion
 * ************************/
.accordion-header {
  background-color: #b2b019;
  padding: 8px;
  margin: 0 auto 1px;
  cursor: pointer;
  text-align: left !important;
  font-size: 1.5em;
}

.accordion-header i {
  margin-right: 5px;
}

.accordion-content {
  padding: 15px;
}

.accordion-pois {
  display: none;
}

/*
 * responsive
 * ************************/
.ol-touch .ol-control.ol-bar.ol-top.ol-right, .ol-touch .ol-control.ol-bar.ol-top.ol-right {
  top: 0;
}

@media only screen and (max-width: 420px) {
  .menuBar.ol-control.ol-bar.ol-top.ol-right {
    max-width: 85%;
  }

  .featurePopup {
    left: 0;
    width: 100%;
    top: 120px;
  }
  .featurePopup .ol-popup {
    left: 0;
    min-height: auto;
  }

  .featurePopup .ol-popup-content {
    min-width: 100%;
  }

  .featurePopup img {
    max-width: 90%;
  }

  .ol-overlay.window {
    top: 3em;
    max-width: 100%;
  }

  .ol-overlay.window.open {
    width: 100%;
  }

  .menuBar,
  .layer-control {
    right: 0;
  }
  .menuBar.open,
  .layer-control.open {
    left: 0;
    z-index: 13;
  }
  .layersWindow.open {
    width: 100% !important;
  }
  .menuBar {
    height: 3em;
  }

  /*.menuBar.ol-control.ol-bar.ol-top.ol-right {
    width: 100%;
    max-width: 100%;
  }*/

  .ol-full-screen {
    top: 3.5em;
  }

  .ol-geolocation {
    top: 5.5em !important;
    right: 0.5em !important;
    left: auto !important;
  }

  .ol-geobt {
    top: 12.5em !important;
    right: 0.5em !important;
    left: auto !important;
  }

  .ol-zoom {
    top: 7.5em;
    right: 0.5em;
    left: auto;
  }

  .ol-scale-line {
    bottom: 2.5em;
  }

  .ol-attribution {
    bottom: 5.5em;
    right: 0.5em;
    left: auto;
  }

  .ol-rotate {
    top: 12em;
    right: 0.5em;
    left: auto;
  }

  .ol-full-screen {
    display: none;
  }

  #windowLayers .content {
    height: calc(100% - 195px);
  }

  .logos {
    bottom: 70px;
  }

  #pois-table .descripcio, 
  #pois-table .imatge,
  #pois-table .ruta,
  #pois-table .tematica,
  #pois-table .tipus,
  #rutas-table .descripcio,
  #rutas-table .imatge,
  #rutas-table .desnivell,
  #rutas-table .dificultat,
  #rutas-table .distancia,
  #rutas-table .tipologia,
  #rutas-table .modalitat {
    display: none;
  }

  .window.tableWindow {
    width: 100%;
    right: auto;
  }

  a.button {
    line-height: 2;
  }
}