/* Portal layout on Bootstrap 5 GRID + UTILITIES (no Reboot).
   body.zne-bs = rebuilt matrices. */

body.zne-bs {
  margin: 0;
  background-color: #e0e0e0;
  background-image: url(../gfx-zakopane/tlo-strony-gl.gif);
  background-position: left top;
  background-repeat: repeat-x;
  color: #000;
}

.zne-wrap {
  background-image: url(../gfx-portal/tlo-portal-bok.gif);
  background-position: 0 163px;
  background-repeat: repeat-x;
  min-height: 100vh;
}

/* Shell fixed like prod — no shrink that drops aside below */
.zne-shell {
  --bs-gutter-x: 0;
  width: 938px;
  max-width: 938px;
  margin: 0 auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

.zne-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  padding: 0;
  margin: 0;
  text-align: center;
  line-height: 0;
  min-height: 63px;
}
.zne-header .zne-icons {
  line-height: 1.1;
}

.zne-logo {
  flex: 0 0 160px;
  display: block;
  width: 160px;
}
.zne-logo img {
  width: 160px;
  height: 63px;
  display: block;
  border: 0;
}

.zne-ps-logo img {
  height: 63px;
  width: auto;
  border: 0;
  vertical-align: middle;
}

/* Match prod: 50px slots, first icon offset ~80px after logo */
.zne-icons {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  padding-top: 0;
  margin: 0;
  text-align: left;
  font-size: 0;
}
.zne-icons .ikona_gora {
  display: inline-block;
  vertical-align: top;
  width: 50px;
  margin: 0;
  padding: 0;
  text-align: center;
  white-space: nowrap;
  font-family: tahoma, verdana, arial, sans-serif;
  font-size: 9px;
  line-height: 1.1;
  color: #555;
  text-decoration: none;
}
.zne-icons .ikona_gora:first-child {
  padding-left: 80px; /* prod gap after logo; width stays 50px */
}
.zne-icons .ikona_gora:hover {
  color: #555;
  text-decoration: none;
  filter: alpha(opacity=40);
  opacity: 0.55;
}
.zne-icons .ikona_gora img {
  border: 0;
  display: block;
  margin: 0 auto;
}
.zne-icons .ikona_gora span {
  display: block;
  margin-top: 1px;
}

.zne-banner {
  background: #000;
  text-align: center;
  line-height: 0;
  clear: both;
  margin: 0;
  padding: 0;
}
.zne-banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Named grid: main | aside, footer always full width even if it is a sibling */
.zne-body-row {
  display: grid;
  grid-template-columns: 751px 187px;
  grid-template-areas:
    "main aside"
    "foot foot";
  width: 938px;
  margin: 0;
  padding: 0;
  align-items: start;
}

.zne-main {
  grid-area: main;
  display: block;
  width: 751px;
  vertical-align: top;
  background: #fff;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  float: none;
  max-width: none;
}
.zne-main.mx-auto {
  display: block;
  float: none;
  width: 751px;
  margin-left: auto !important;
  margin-right: auto !important;
  grid-area: auto;
}

/* Prod: beside content, aligned under logo row */
.zne-aside {
  grid-area: aside;
  display: block;
  width: 187px;
  vertical-align: top;
  background: #fff;
  box-sizing: border-box;
  padding: 63px 0 0 5px;
  overflow: hidden;
  margin: 0;
  float: none;
  max-width: none;
}

/* Classic portal head: photo left, tiles right, more tiles under photo */
table.zne-portal-head {
  width: 751px;
  max-width: 751px;
  border-collapse: separate;
  margin: 0;
  padding: 0;
}
table.zne-portal-head img {
  border: 0;
  display: block;
}
table.zne-portal-head a.menu,
table.zne-portal-head .menu,
table.zne-portal-head .menu a {
  color: #fff !important;
  text-decoration: none;
}

.zne-subnav {
  background: #fff;
  align-items: flex-start !important;
}
.zne-subnav .col-md-7 img,
.zne-subnav .col-7 img,
.zne-subnav img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
  vertical-align: top;
}

.zne-tile {
  display: block;
  color: #fff !important;
  text-decoration: none !important;
  padding: 6px 8px;
  min-height: 34px;
  font-size: 11px;
  line-height: 1.2;
  font-family: tahoma, verdana, arial, sans-serif;
}
.zne-tile:hover {
  opacity: 0.85;
  text-decoration: none !important;
  color: #fff !important;
}
.zne-tile .small {
  color: #fff;
  font-size: 9px;
}
.zne-tile img {
  border: 0;
  vertical-align: middle;
}

.zne-col-left {
  background: #fff7e6;
  padding: 10px 6px;
  min-width: 0;
}
.zne-col-right {
  background: #cccacb;
  padding: 10px 6px;
  min-width: 0;
  text-align: center;
}

.zne-pogoda {
  background: #ebd5ab;
  border-bottom: 1px solid #cdb485;
  padding: 6px;
  text-align: center;
}
.zne-promo {
  background: #eb336f;
  border-bottom: 1px solid #fff;
  padding: 6px;
  text-align: center;
}
.zne-promo img {
  max-width: 100%;
  height: auto;
}

.zne-pagefoot {
  background: #e0e0e0;
  text-align: center;
  border-top: 1px solid silver;
  padding: 8px;
}
.zne-foot {
  grid-area: foot;
  display: block;
  background: #000;
  color: #fff;
  padding: 8px;
  clear: both;
  width: 100%;
  box-sizing: border-box;
}

.zne-box,
.zne-box-sm,
.zne-fluid {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
  overflow: visible;
}
.zne-box {
  max-width: 400px;
}
.zne-box-sm {
  max-width: 320px;
}

.zne-skroty-wrap {
  background-image: url(../gfx-portal/ikony.gif);
  background-position: left center;
  background-repeat: no-repeat;
}
body.zne-bs ul.zne-skroty {
  list-style: none;
  margin: 0;
  padding: 0 0 0 36px;
  display: flex;
  flex-wrap: wrap;
}
body.zne-bs ul.zne-skroty .skroty {
  float: none !important;
  width: 33.33%;
  margin: 0 !important;
  padding: 8px 4px !important;
  box-sizing: border-box;
  white-space: normal;
  list-style: none;
}
body.zne-bs .zne-list-col {
  width: 48%;
  float: left;
  margin: 0;
  padding-left: 18px;
}

.zne-doc {
  background: #fff url(../gfx-tatry/tlo-komorki.gif) left top repeat-x;
  min-height: 200px;
  padding: 12px;
  overflow-x: auto;
}
.zne-alarm {
  background: #c00;
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 8px;
  margin: 12px 0;
  font-size: 12px;
}
.zne-alarm-nr {
  font-family: Arial, sans-serif;
  font-size: 18px;
}
.zne-blad {
  background: #fffff7;
  border: 1px solid #e5ddbc;
  padding: 8px;
  margin: 16px 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.zne-crumb {
  background: #e5e5e5;
  padding: 6px 8px;
  font-size: 12px;
}

body.zne-bs .zne-legacy {
  max-width: 100%;
  overflow-x: auto;
}
body.zne-bs .zne-legacy table[width="100%"],
body.zne-bs .zne-legacy table[width="751"],
body.zne-bs .zne-legacy table[width="750"],
body.zne-bs .zne-legacy table[width="595"],
body.zne-bs .zne-legacy table[width="580"] {
  width: 100% !important;
  max-width: 100%;
}

body.zne-bs .zne-col-right iframe {
  max-width: 100%;
}
body.zne-bs #cse-search-box input[type="text"] {
  max-width: 70%;
}

.zne-fixed-img {
  border: 0;
  vertical-align: middle;
}

/* Keep BS row children from adding phantom gutters inside portal */
body.zne-bs .row.g-0 {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin-left: 0;
  margin-right: 0;
}
body.zne-bs .row.g-0 > * {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 760px) {
  .zne-shell,
  .zne-body-row {
    width: 100%;
    max-width: 100%;
    display: block;
    padding: 0 4px !important;
    grid-template-columns: none;
    grid-template-areas: none;
  }
  .zne-main,
  .zne-aside {
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    padding-top: 0;
    margin-top: 0;
    grid-area: auto;
  }
  table.zne-portal-head {
    width: 100%;
    max-width: 100%;
  }
  .zne-header {
    flex-wrap: wrap;
    justify-content: center;
  }
  .zne-icons .ikona_gora:first-child {
    padding-left: 0;
  }
  .zne-icons {
    text-align: center;
  }
  .zne-box,
  .zne-box-sm {
    max-width: 100%;
  }
}
