/* ---------------------- fonts ---------------------- */
@font-face {
  font-family: 'Akkurat Regular';
  src: url('font/Akkurat.eot');
  src: url('font/Akkurat.eot?#iefix') format('embedded-opentype'),
    url('font/Akkurat.woff2') format('woff2'),
    url('font/Akkurat.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Akkurat Bold';
  src: url('font/Akkurat-bold.woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------- Header / Suchleiste (Basis-Overrides) ---------------------- */
#header > .inner {
  padding: 10px 10px 2px 10px;
}

#header .inner #headerbar #search-area .search-wrapper {
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
}

.search-wrapper input#search {
  padding-left: 40px;
  padding-right: 40px;
}

/* resetBtn: left:525px wurde weiter unten durch left:auto!important überschrieben. */

#header .inner #headerbar #search-area button#searchBtn,
#header .inner #headerbar #search-area button#resetBtn {
  top: 25px;
  bottom: auto !important;
  transform: translateY(-50%);
}

#header .inner #headerbar #search-area button#searchBtn {
  left: 30px !important;
  right: auto !important;
  position: absolute;
}

#header .inner #headerbar #search-area button#resetBtn {
  left: auto !important;
  right: 35px !important;
}

/* ===================== GRID-CSS für Logo-Zeile + Suchleiste ===================== */

:root {
  --logo-height: 70px;
  --header-gap: 20px;
  /* --logomaz-aspect wurde weiter unten im Datei-Verlauf erneut auf 10.861 gesetzt; */
  --logomaz-aspect: 10.861;
  --logomaz-subtitle-ratio: 0.3833;
  --logo-row-height: 70px;
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "logo   logomaz claim"
    ".      search  .";
  align-items: end;
  column-gap: var(--header-gap);
  row-gap: 10px;
  width: 100%;
  min-height: var(--logo-height);
  box-sizing: border-box;
}

#logo,
#logo-maz,
#title-claim {
  height: var(--logo-height);
  max-height: var(--logo-height);
  width: auto;
  display: flex;
  align-items: flex-end;
}

#logo {
  grid-area: logo;
  justify-content: flex-start;
}

#logo-maz {
  grid-area: logomaz;
  justify-content: center;
}

#title-claim {
  grid-area: claim;
  justify-content: flex-end;
  padding-right: 25px;
  padding-bottom: 0px;
}

#logo img,
#logo-maz img,
#title-claim img {
  height: var(--logo-height);
  width: auto;
  max-width: none;
  max-height: none;
  display: block;
}

#search-area {
  grid-area: search;
  width: 100%;
  max-width: calc(var(--logo-height) * var(--logomaz-aspect));
  justify-self: center;
  margin: 0 auto;
}

#header .inner #headerbar #search-area input {
  width: 100% !important;
  box-sizing: border-box;
  margin: 5px 0 10px 0 !important;
  padding: 8px 90px 8px 50px;
}

@media screen and (max-width: 1600px) {
  :root {
    --logo-height: 55px;
  }
}

@media screen and (max-width: 1400px) {
  #logo,
  #title-claim {
    display: none;
  }
  .header-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logomaz"
      "search";
    justify-items: center;
  }
  #logo-maz {
    justify-content: center;
  }
}

@media screen and (max-width: 600px) {
  :root {
    --logo-height: 40px;
  }
}

@media screen and (max-width: 380px) {
  :root {
    --logo-height: 32px;
  }
}

/* ---------------------- Toolbar ---------------------- */

#headerbar .col_12 .inner.row,
#toolbar .inner.row {
  padding: 0;
}
/*
@media screen and (min-width: 663px) {
  #view-buttons {
    height: 28px !important;
  }
  #toolbar {
    margin-top: 2px !important;
  }
}*/

@media only screen and (max-width: 960px) {
  #header .inner #headerbar #toolbar { 
    margin-top: 60px !important; }
}

/* ---------------------- Menü-Titel Farb-Badges ---------------------- */

.menuTitle.lehm.open {
  background: #d98957;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.ton.open {
  background: #a64532;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.kalk.open {
  background-color: #64888f;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.zement.open {
  background-color: #7ba5b0;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.trass.open {
  background-color: #a8d2e0;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.holz.open {
  background: #68ad7e;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.naturstein.open {
  background: #73648f;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.gras.open {
  background-color: #b24772;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.hanf.open {
  background: #de83a8;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

.menuTitle.stroh.open {
  background: #e08c83;
  color: #fff !important;
  padding: 0px 10px;
  border: 1px solid #fff;
  border-radius: 15px;
}

/* ---------------------- other Styles ----------------------*/

html,
body {
  overflow: hidden;
  height: 100%;
}

input[type="checkbox"] {
  display: none !important;
}

/* ----------------------  Galerie scrollbar, wenn #map versteckt ---------------------- */

.mainwindow:has(#map[style*="display: none;"]) {
  overflow: auto;
  height: auto;
}

body:has(#map[style*="display: none;"]) {
  overflow: auto;
}

.block:has(#map[style*="display: none;"]) {
  overflow: visible;
}

#main:has(#map:not([style*="display: none;"])),
#article-1:has(#map:not([style*="display: none;"])),
#article-1:has(#map:not([style*="display: none;"])) > .inside,
#content-wrapper:has(#map:not([style*="display: none;"])),
#maz-wrapper:has(#map:not([style*="display: none;"])) {
  height: 100%;
  overflow: hidden;
}

.mainwindow:has(#map:not([style*="display: none;"])) {
  height: calc(100vh - 191px);
  overflow: hidden;
  padding-bottom: 0;
}

.mainwindow:has(#map:not([style*="display: none;"])) > .inner.row {
  height: 100%;
  overflow: hidden;
}

#map {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100%;
}

#menuContainer {
  position: fixed;
  top: 231px;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 191px);
  min-height: unset;
}

#menuContainer .menu-section {
  overflow: visible;
  height: auto;
  max-height: none;
  margin-bottom: 70px;
}

#menuContainer .menu-section ul {
  max-height: none;
  padding-left: 28px;
  padding-right: 5px;
}

#menuContainer span.menuTitle:not(.open)::before,
#menuContainer span.menuTitle.open::before {
  flex-shrink: 0;
  padding-right: 0;
  margin-top: 0.1em;
}

#menuContainer span.menuTitle {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

#header .inner #headerbar #toolbar .row #menuContainerPreFilter ul li span.active,
#menuContainer .menu-section ul li span.open {
  text-decoration: none;
}

#menuContainer .menu-section ul li span:hover {
  font-weight: 700;
}

/* Popup der PDF */
#popup-wrapper .popup-wrapper-inner .close {
  background-image: none !important;
}

/* ---------------------- Popup ---------------------- */
#map .leaflet-popup-content-wrapper .leaflet-popup-content .address,
#map .leaflet-popup-content-wrapper .leaflet-popup-content .website {
  margin-bottom: 20px;
}

.popup a img {
  display: block;
  height: 50px;
  padding: 0 12px 10px 40px;
}

/* ===================================================
   Responsive Anpassungen
   =================================================== */

@media only screen and (max-width: 1600px) {
  .mainwindow {
    height: calc(100vh - 191px);
  }
  #menuContainer {
    top: 191px;
  }
}

@media only screen and (max-width: 960px) {
  #header .inner #breadcrumb {
    margin-left: var(--menu-width, 200px);
  }
  .mainwindow {
    height: calc(100vh - 252px);
    padding-top: 250px;
    padding-bottom: 0;
  }
  #menuContainer {
    top: 270px;
  }
}

@media only screen and (max-width: 662px) {
  #header .inner #breadcrumb {
    margin-left: var(--menu-width, 0px);
  }
  .mainwindow {
    height: calc(100vh - 225px);
    padding-top: 225px;
    padding-left: 0;
    padding-bottom: 0;
  }
  #menuContainer {
    top: 225px;
  }
  #header .inner #headerbar #view-buttons {
        top: -15px;
        width: 25%;
    }
}

/* ---------------------- Breadcrumb ---------------------- */

#header .inner #breadcrumb {
  margin-left: var(--menu-width, 375px);
  height: auto;
  min-height: 50px;
}

#header .inner #breadcrumb ul {
  flex-wrap: wrap;
  align-items: center;
}

#header .inner #breadcrumb ul li {
  margin: 0.1rem 0 0.1rem -30px !important;
  padding-right: 33px;
  position: relative;
  min-width: 50px;
}

#header .inner #breadcrumb ul li:first-child {
  margin-left: 0; /* Hinweis: bleibt derzeit ohne Wirkung, weil obige
                      margin-Kurzschreibweise !important nutzt und
                      damit margin-left ebenfalls fixiert. Unverändert
                      gelassen, um das aktuelle (Bestands-)Verhalten
                      nicht zu verändern. */
  z-index: 1;
}

#breadcrumb li.lehm {
  background-color: #d98957;
  color: #fff;
}

#breadcrumb li.ton {
  background-color: #a64532;
  color: #fff;
}

#breadcrumb li.kalk {
  background-color: #64888f;
  color: #fff;
}

#breadcrumb li.zement {
  background-color: #7ba5b0;
  color: #fff;
}

#breadcrumb li.trass {
  background-color: #a8d2e0;
  color: #fff;
}

#breadcrumb li.default {
  background: #585858;
  color: #fff;
}

#breadcrumb li.holz {
  background-color: #68ad7e;
  color: #fff;
}

#breadcrumb li.naturstein {
  background-color: #73648f;
  color: #fff;
}

#breadcrumb li.gras {
  background: #b24772;
  color: #fff;
}

#breadcrumb li.hanf {
  background-color: #de83a8;
  color: #fff;
}

#breadcrumb li.stroh {
  background-color: #e08c83;
  color: #fff;
}


/* z-index-Staffelung der Breadcrumb-Elemente (überlappende Badges) */
#header .inner #breadcrumb ul li:nth-child(1) { z-index: 1; }
#header .inner #breadcrumb ul li:nth-child(2) { z-index: 2; }
#header .inner #breadcrumb ul li:nth-child(3) { z-index: 3; }
#header .inner #breadcrumb ul li:nth-child(4) { z-index: 4; }
#header .inner #breadcrumb ul li:nth-child(5) { z-index: 5; }
#header .inner #breadcrumb ul li:nth-child(6) { z-index: 6; }
#header .inner #breadcrumb ul li:nth-child(7) { z-index: 7; }
#header .inner #breadcrumb ul li:nth-child(8) { z-index: 8; }
#header .inner #breadcrumb ul li:nth-child(9) { z-index: 9; }
#header .inner #breadcrumb ul li:nth-child(10) { z-index: 10; }
#header .inner #breadcrumb ul li:nth-child(11) { z-index: 11; }
#header .inner #breadcrumb ul li:nth-child(12) { z-index: 12; }
#header .inner #breadcrumb ul li:nth-child(13) { z-index: 13; }
#header .inner #breadcrumb ul li:nth-child(14) { z-index: 14; }
#header .inner #breadcrumb ul li:nth-child(15) { z-index: 15; }
#header .inner #breadcrumb ul li:nth-child(16) { z-index: 16; }
#header .inner #breadcrumb ul li:nth-child(17) { z-index: 17; }
#header .inner #breadcrumb ul li:nth-child(18) { z-index: 18; }
#header .inner #breadcrumb ul li:nth-child(19) { z-index: 19; }
#header .inner #breadcrumb ul li:nth-child(20) { z-index: 20; }
#header .inner #breadcrumb ul li:nth-child(21) { z-index: 21; }
#header .inner #breadcrumb ul li:nth-child(22) { z-index: 22; }
#header .inner #breadcrumb ul li:nth-child(23) { z-index: 23; }
#header .inner #breadcrumb ul li:nth-child(24) { z-index: 24; }
#header .inner #breadcrumb ul li:nth-child(25) { z-index: 25; }
#header .inner #breadcrumb ul li:nth-child(26) { z-index: 26; }
#header .inner #breadcrumb ul li:nth-child(27) { z-index: 27; }
#header .inner #breadcrumb ul li:nth-child(28) { z-index: 28; }
#header .inner #breadcrumb ul li:nth-child(29) { z-index: 29; }
#header .inner #breadcrumb ul li:nth-child(30) { z-index: 30; }
#header .inner #breadcrumb ul li:nth-child(31) { z-index: 31; }
#header .inner #breadcrumb ul li:nth-child(32) { z-index: 32; }
#header .inner #breadcrumb ul li:nth-child(33) { z-index: 33; }
#header .inner #breadcrumb ul li:nth-child(34) { z-index: 34; }
#header .inner #breadcrumb ul li:nth-child(35) { z-index: 35; }
#header .inner #breadcrumb ul li:nth-child(36) { z-index: 36; }
#header .inner #breadcrumb ul li:nth-child(37) { z-index: 37; }
#header .inner #breadcrumb ul li:nth-child(38) { z-index: 38; }
#header .inner #breadcrumb ul li:nth-child(39) { z-index: 39; }
#header .inner #breadcrumb ul li:nth-child(40) { z-index: 40; }
#header .inner #breadcrumb ul li:nth-child(41) { z-index: 41; }
#header .inner #breadcrumb ul li:nth-child(42) { z-index: 42; }
#header .inner #breadcrumb ul li:nth-child(43) { z-index: 43; }
#header .inner #breadcrumb ul li:nth-child(44) { z-index: 44; }
#header .inner #breadcrumb ul li:nth-child(45) { z-index: 45; }
#header .inner #breadcrumb ul li:nth-child(46) { z-index: 46; }
#header .inner #breadcrumb ul li:nth-child(47) { z-index: 47; }
#header .inner #breadcrumb ul li:nth-child(48) { z-index: 48; }
#header .inner #breadcrumb ul li:nth-child(49) { z-index: 49; }
#header .inner #breadcrumb ul li:nth-child(50) { z-index: 50; }

@media only screen and (max-width: 960px) {
  #header .inner #breadcrumb {
    min-height: 40px;
  }
  #header .inner #breadcrumb ul li {
    margin-left: -8px;
  }
  #header .inner #breadcrumb ul li:first-child {
    margin-left: 0;
  }
  #header .inner #breadcrumb ul {
    padding-left: 10px;
    padding-right: 1rem;
  }
}

@media only screen and (max-width: 662px) {
  #header .inner #breadcrumb {
    min-height: 36px;
  }
  #header .inner #breadcrumb ul {
    padding-left: 8px;
    padding-right: 0.5rem;
    justify-content: flex-start;
  }
  #header .inner #breadcrumb ul li {
    margin-left: -6px;
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
  }
  #header .inner #breadcrumb ul li:first-child {
    margin-left: 0;
  }
}

@media only screen and (max-width: 580px) {
  #header .inner #breadcrumb {
    min-height: 32px;
  }
  #header .inner #breadcrumb ul {
    padding-left: 6px;
    padding-right: 0.25rem;
  }
  #header .inner #breadcrumb ul li {
    margin-left: -5px;
    font-size: 0.7rem;
    padding: 2px 4px;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
  }
  #header .inner #breadcrumb ul li:first-child {
    margin-left: 0;
  }
}

/* ===================================================================== */

.firstrow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  width: 100%;
}

#logo {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
}

#logo img {
  height: var(--logo-row-height);
  width: auto;
  display: block;
}

#logo-schrift {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
}

#logo-schrift img {
  height: var(--logo-row-height);
  width: auto;
  display: block;
}

#title-claim {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
}

#title-claim img {
  height: calc(var(--logo-row-height) * var(--logomaz-subtitle-ratio));
  width: auto;
  max-height: none;
  display: block;
}

#search-area {
  margin-left: auto;
  margin-right: auto;
  max-width: calc(var(--logo-row-height) * var(--logomaz-aspect));
  width: 100%;
}

.search-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  position: relative;
}

@media screen and (max-width: 1600px) {
  #logo,
  #title-claim {
    display: none;
  }
  #logo-schrift {
    grid-column: 1 / -1;
    justify-self: center;
  }
}