html, body, .map {margin:0; padding: 0; height: 100%;}

body {
  font-family: sans-serif;
  font-size: 12pt;
}
.navbar {
  background-color: #1F6B75;
  color: white;
  border: 0;
  border-radius: 0;
}
.navbar-brand {
  color: white;
  font-weight: bold;
  font-size: 160%;
  padding: 8px 0;
}
.navbar-brand:hover,
.navbar-brand:focus {
  color: #aae1e9;
}
.navbar-brand img {
  height: 35px;
  vertical-align: middle;
  margin-right: 5px;
  display: inline-block;
}
.nav>li>a:hover, .nav>li>a:focus, .nav>li>a.active {
  background-color: #268591;
}
.navbar-nav>li>a {
  color: white;
}
.display-table {
  display: table;
}
.version-form, .navbar-form {
  display: table-cell;
  vertical-align: middle;
}
.version-form {
  color: #333;
}

#title {
  margin-top: 0;
}

#docs {
  margin-top: 1em;
}

ul.inline,
ol.inline {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}

ul.inline>li,
ol.inline>li {
  display: inline-block;
  padding-left: 5px;
  padding-right: 5px;
}

#info {
    position: absolute;
    bottom: 0px;
    max-height: 75%;
    padding: 0;
    background: gray;
    color: #FFF;
    display: none;
    overflow: auto;
    max-width: 100%;
    min-width:210pt;
}

#info-content{
}


.info-hdr {
    position: sticky;
    top: 0;
    padding: 3pt;
    background: #686868;
}

#info a {color: #FFF;}
#info .navi {
  float: right;
}

#status-panel {
    position: absolute;
    bottom: 0px;
    height: 2em;
    width: 100%;
    background: gray;
    color: white;
}

.ol-map img { max-width: none; }

#map {
  height: 100%;
  width: 100%;
  background: white;
}

.odp_tab {
  border: 1px solid #999;
  background: black;
  border-collapse: collapse;
}

.odp_tab td, odp_tab th {
   border: 1px solid #999;
   padding: 0.2em;
   color: white;
}

.odp_pole {
  width: 100pt;
}

button {
    width: 34pt;
    height: 34pt;
    border-radius: 16pt;
    display: inline-block;
    border: 0px solid gray;
    background: rgba(0,60,136,.7);
    color: white;
}

.ol-attribution.ol-logo-only,
.ol-attribution.ol-uncollapsible {
  max-width: calc(100% - 3em);
  height: 1.5em;
}
.ol-attribution ul {
  font-size: 1rem;
}
/*.ol-control button, .ol-attribution, .ol-scale-line-inner {
  font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
}*/
.iframe-info iframe {
  width: 100%;
}

pre[class*="language-"] {
  margin-top: 20px;
  background: #FFFFFF;
}

#source-controls {
  position: absolute;
  margin-top: 20px;
  right: 40px;
}

#source-controls a {
  margin-left: 15px;
}

#copy-button {
  text-decoration: none;
  cursor: pointer;
}

#codepen-button {
  text-decoration: none;
  cursor: pointer;
}

pre {
  border: 1px solid #eee;
  border-radius: 0;
}

#tags, #shortdesc, .hidden {
  display: none;
}
#api-links ul {
  display: inline;
}
#latest-check {
  margin-top: -10px;
  margin-bottom: 10px;
}

.custom-mouse-position {
   top: 0;
   right: 50%;
   position: absolute;
}

.tohide {
  display: none
}

.ol-scale-line {
    bottom: 15px !important;
    left: 10px !important;
    background: rgba(0, 60, 136, 0.7) !important;
}

.ol-scale-line-inner {
    color: white !important;
    border-color: white !important;
}

#heading {
    position: absolute !important;
    bottom: 50px !important; 
    left: 10px !important;
    margin: 0 !important;
    padding: 2px 8px !important;
    background: #0A0 !important;
    color: white !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    /*z-index: 1000;*/
}

.custom-scale-text {
    position: absolute;
    bottom: 25px; /* Nad grafickým měřítkem */
    left: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
    font-weight: bold;
    font-size: 12px;
    font-family: Arial, sans-serif;
    pointer-events: none; /* Aby nepřekáželo v klikání do mapy */
    border: 2px solid rgb(0, 60, 136);
}

.layer-switcher li.layer.out-of-zoom input {
    cursor: not-allowed !important;
    filter: grayscale(100%);
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.layer-switcher li.layer.out-of-zoom label {
    /*o barvu textu se stará sám LayerSwitcher*/
    font-style: italic !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* --- RESET A SJEDNOCENÍ KONTEJNERŮ --- */
.ol-control, .ol-zoom, .ol-zoom-extent, .ol-rotate, .layer-switcher {
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* --- TLAČÍTKA (Zoom In, Zoom Out, Home, Rotate, Switcher, Login) --- */
/* Cílíme přímo na element button uvnitř všech těchto tříd */
.ol-zoom-in, .ol-zoom-out, .ol-zoom-extent button, .layer-switcher button, #login-toggle-btn {
    background-color: rgba(0, 60, 136, 0.8) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 4px !important;
    border: none !important;
    margin: 1px 0 !important;
    cursor: pointer;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    
    /* Zcela skryjeme původní znaky */
    color: transparent !important;
    font-size: 0 !important;
}

.ol-rotate button {
    background-color: rgba(0, 60, 136, 0.8) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 4px !important;
    border: none !important;
    margin: 1px 0 !important;
    cursor: pointer;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    
    /* Ponecháme původní znaky */
    color: white !important;
    font-size: 28px !important;   
}
.ol-compass {
    font-weight: bold;
}

/* Hover efekt */
.ol-zoom-in:hover, .ol-zoom-out:hover, .ol-zoom-extent button:hover, .ol-rotate button:hover, .layer-switcher button:hover, #login-toggle-btn:hover {
    background-color: rgba(0, 60, 136, 1) !important;
}

/* --- IKONY FONT AWESOME (Vkládáme do všech) --- */
/* Použijeme pseudo-element :before pro všechna tlačítka */

.ol-zoom-in:before, 
.ol-zoom-out:before, 
.ol-zoom-extent button:before, 
.layer-switcher button:before,
#login-toggle-btn {
    font-family: "FontAwesome" !important;
    font-style: normal !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    color: white !important;
    visibility: visible !important;
    display: block !important;
    text-align: center;
    width: 100%;
}

.layer-switcher button {
    background-image: none !important; /* Klíčové: odstraní původní SVG */
    background-position: center !important;
    background-repeat: no-repeat !important;
    text-indent: -9999px !important; /* Odstraní případný skrytý text */
    overflow: hidden !important;
}

/* Ujistíme se, že Font Awesome ikona je jediná viditelná */
.layer-switcher button:before {
    text-indent: 0 !important; /* Vrátí textovou ikonu zpět do viditelného pole */
    line-height: 34px !important; /* Vycentrování výškově */
}

/* --- DEFINICE KONKRÉTNÍCH SYMBOLŮ --- */
.ol-zoom-in:before { content: "\f067" !important; }      /* plus */
.ol-zoom-out:before { content: "\f068" !important; }     /* minus */
.ol-zoom-extent button:before { content: "\f015" !important; } /* home */
.layer-switcher button:before { content: "\f278" !important; } /* layers */

/* --- POZICE NA MAPĚ --- */

/* LEVÁ STRANA (Zoom + Home + Login) */
.ol-zoom {
    top: 10px !important;
    left: 10px !important;
}
.ol-zoom-extent {
    top: 85px !important;
    left: 10px !important;
}

#login-control { 
    position: absolute; 
    top: 125px; 
    left: 10px; 
}

/* PRAVÁ STRANA (Rotate + Switcher) */
.ol-rotate {
    top: 10px !important;
    right: 10px !important;
}
.layer-switcher {
    top: 50px !important;
    right: 10px !important;
}

/* --- PANEL VRSTEV --- */
.layer-switcher .panel {
    border: 3px solid rgba(0, 60, 136, 0.8) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 4px !important;
    margin-top: 5px;
}

/* Pokud je panel otevřený (má třídu .shown), skryjeme tlačítko */
.layer-switcher.shown button {
    display: none !important;
}

.layer-switcher.shown .panel {
    display: block !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* --- PŘIHLAŠOVACÍ PANEL --- */
#login-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    width: 300px;
    font-family: Arial, sans-serif;
}

#login-panel * { box-sizing: border-box; }
#login-panel input, #login-panel button, .logout-btn {
    width: 100%; display: block; margin-bottom: 12px; padding: 10px; border-radius: 4px; border: 1px solid #ccc;
}

#submit-btn { background-color: #003c88; color: white; font-weight: bold; cursor: pointer; border: none; }
#close-panel { background-color: #f4f4f4; cursor: pointer; color: gray; }
.logout-btn { background-color: #d9534f; color: white; text-decoration: none; text-align: center; font-weight: bold; }

#login-error-msg { color: #d9534f; font-size: 12px; margin-bottom: 10px; text-align: center; display: none; }

/* HS POPUP */
.hs-mpopup {
}
.mpopup-route {
    max-width: 340px;
    background-color: #000000;
    padding: 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 2px white solid;
}
.mpopup-cable {
    max-width: 340px;
    background-color: #0000c8;
    padding: 4px;
    margin-top: 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 2px white solid
}
.mpopup-protector {
    max-width: 340px;
    background-color: #aa5000;
    padding: 4px;
    margin-top: 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 2px white solid
}
.mpopup-microtube {
    background-color: #aa5000;
    padding: 4px;
    margin-top: 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 1px white solid
}
.mpopup-object {
    max-width: 550px;
    background-color: #000000;
    padding: 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 2px white solid
}

.mpopup-unit {

    background-color: #d8b800;
    padding: 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 2px white solid
}

.mpopup-unit-int {

    background-color: #d8b800;
    padding: 4px;
    margin-top: 2px;
    margin-bottom: 2px;
    border-radius: 3px;
    border: 1px white solid
}

.mpopup-photo {
    vertical-align: middle;
    text-align: center;
}
.mpopup-photo img {
    background-color: silver;
    padding: 4px;
    border-radius: 3px;
    border: 1px darkgray solid;
}

.mpopup-column-left {
    float: left;
    width: 60%;
    white-space: nowrap;
}

.mpopup-column-right {
    float: left;
    width: 40%;
    text-align:right;
    white-space: nowrap;
}

/* Clear floats after the columns */
.mpopup-container:after {
    content: "";
    display: table;
    clear: both;
}
