/*
http://locman.pg/javascript/openlayers-2.13.1/examples/accessible-panel.html
http://locman.pg/javascript/openlayers-2.13.1/examples/panel.html
http://locman.pg/javascript/openlayers-2.13.1/examples/mobile-drawing.html
http://locman.pg/javascript/openlayers-2.13.1/examples/navtoolbar.html
http://locman.pg/javascript/openlayers-2.13.1/examples/navtoolbar-outsidemap.html

Неон
https://wp-lessons.com/effekt-neonovogo-teksta-s-pomoshhyu-css
http://nisnom.com/veb-razrabotki/effekt-neonovogo-svecheniya-teksta-s-pomoshhyu-css/
*/

#main_map {
    /* карта */
    position: absolute;
    left: 0;
    top: 50px;
    height: calc(100% - 50px);
    width: 100%;
    margin: 0;
    padding: 0;
}

div.olControlMousePosition {
    /* позиция мыши */
    bottom: 0;
    right: 3px;
    display: block;
    position: absolute;
    font-family: Arial;
    font-weight: bold;
    font-size: 12px;
    color: #000000;
}

.olControlScaleLine {
    color: #000000;
}

div.olControlAttribution {
    /* надпись о картографических данных */
    bottom: 2px;
    left: 2px;
    color: #000000;
}

div.olControlAttribution a {
    color: initial;
}

/* popup-menu OpenLayers
div.olPopupContent, div.olFramedCloudPopupContent {
    color: #000000;
    background-color: #FFFFFF;
}
*/
div.olFramedCloudPopupContent {
    color: #000000;
}

div.olControlPanel {
    /* панель кнопочек "Поиск", "Расстояние" и т.п. */
    position: absolute;
    top: 0;
    right: 1px;
    background: rgba(255,255,255,.4);
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    padding: 2px;
}

div.olControlPanel .olButton {
    display: block;
    min-width: 5em;
    float: left;
    margin: 1px;
    padding: 4px;
    color: white;
    font-family: "Lucida Grande", Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    background: #00008B; /* fallback for IE - IE6 requires background shorthand*/
    background: rgba(0, 0, 139, .4);
    filter: alpha(opacity=80);
}

div.olControlPanel .olButton:hover {
    background: #130085; /* fallback for IE */
    background: rgba(0, 0, 139, .7);
    filter: alpha(opacity=100);
}

@media only screen and (max-width: 600px) {
    div.olControlPanel .olButton:hover {
        background: rgba(0, 0, 139, .5);
    }
}

div.olControlPanel.vertical .olButton {
    float: none;
}

div.olControlPanel .olButton:first-child {
    border-radius: 4px 0 0 4px;
    -webkit-border-radius: 4px 0 0 4px;
    -moz-border-radius: 4px 0 0 4px;
}

div.olControlPanel .olButton:last-child {
    border-radius: 0 4px 4px 0;
    -webkit-border-radius: 0 4px 4px 0;
    -moz-border-radius: 0 4px 4px 0;
}

div.olControlPanel.vertical .olButton:first-child {
    border-radius: 4px 4px 0 0;
    -webkit-border-radius: 4px 4px 0 0;
    -moz-border-radius: 4px 4px 0 0;
}

div.olControlPanel.vertical .olButton:last-child {
    border-radius: 0 0 4px 4px;
    -webkit-border-radius: 0 0 4px 4px;
    -moz-border-radius: 0 0 4px 4px;
}

.olControlPanel.vpanel {
    /*вертикальная панель кнопок*/
    top: 8px;
    right: 8px;
    left: auto;
}

.olControlPanel.hpanel {
    /*горизонтальная панель кнопок*/
    top: 2px;
    bottom: auto;
    left: auto;
    right: 2px;
}

.button1ItemInactive:after, .button1ItemActive:after {
    content: "Линейка";
}

.button2ItemInactive:after, .button2ItemActive:after {
    content: "Button 2";
}

.button3ItemInactive:after, .button3ItemActive:after {
    content: "Зона";
}

.button4ItemInactive:after, .button4ItemActive:after {
    content: "Button 4";
}

.button5ItemInactive:after, .button5ItemActive:after {
    content: "Button 5";
}

/* контекстное меню на карте */
.contextdiv {
    min-width: 130px;
    background-color: rgba(0, 0, 139, .8);
    border-color: rgba(0, 0, 139, 1);  /* #00008B */
    padding: 1px;
}

.contexttable {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
    list-style: none;
    padding: 0;
}

.contexttable th, .contexttable li:first-child, .contexttable li:first-child:hover {
    font-size: 10pt;
    font-weight: bold;
    color: #FFFFFF;
    background-color: rgba(0, 0, 139, .6);
    padding: 4px 4px;
    text-align: center;
    white-space: nowrap;
}

.contexttable td, .contexttable li {
    font-size: 10pt;
    font-weight: bold;
    vertical-align: middle;
    padding: 4px 4px;
    color: #ddd;
}

.contexttable td:hover, .contexttable li:hover {
    background-color: #DBDBDB;
    color: #000000;
}

.delimiter {
    border: none;
    background-image: url(img/menupixel.gif);
    background-repeat: repeat-x;
    background-position: left;
}

.contexttable hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 2px solid rgba(0, 0, 139, .6);
    margin: 3px 0;
    padding: 0;
}

/* панель управления картой
https://habr.com/sandbox/48925/
https://ru.stackoverflow.com/questions/656180/%D0%9A%D0%B0%D0%BA-%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C-%D0%BF%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE-%D0%B2%D1%8B%D0%B5%D0%B7%D0%B6%D0%B0%D1%8E%D1%89%D0%B8%D0%B9-%D0%B1%D0%BB%D0%BE%D0%BA

https://processwire.com/talk/topic/10448-css-only-responsive-multi-level-menu/
http://timpietrusky.com/advanced-checkbox-hack
*/
#main_map > #show_button {
    display: none;
}

#show_button:checked + #main_map_control {
    width: 16em;
    right: 0;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    overflow-x: hidden;
    overflow-y: scroll;
    border-color: rgba(0, 0, 139, .8);
    z-index: 10000;
}

#show_button:checked + #main_map_control #show_button_label {
    background-color: rgba(0, 0, 139, .8);
    background-image: url(img/double-angle-pointing-to-right.svg);
}

#main_map_control {
    position: absolute;
    float: right;
    top: 65px;
    right: 0;
    height: 540px;
    max-height: 540px;
    width: 18px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 3px solid;
    border-left-width: 0;
    border-radius: 8px 0 0 8px;
    -webkit-border-radius: 8px 0 0 8px;
    -moz-border-radius: 8px 0 0 8px;
    z-index: 1000;
    font-size: 14px;
    background-color: rgba(0, 0, 139, .6);
    border-color: rgba(0, 0, 139, .1);  /* #00008B */
    color: #eee;
    transition: all .2s linear;
    -moz-transition: all .2s linear;
    -o-transition: all .2s linear;
    -webkit-transition: all .2s linear;
}

/* https://mediag.com/news/popular-screen-resolutions-designing-for-all/ */
@media screen and (max-width: 991px) {
    #main_map_control {
        height: 100px;
    }

    #show_button:checked + #main_map_control {
        top: 36px;
        height: calc(100% - 60px);
    }
}

#main_map_control #show_button_label {
    float: left;
    top: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    width: 18px;
    max-width: 18px;
    min-width: 18px;
    border-radius: 8px 0 0 8px;
    -webkit-border-radius: 8px 0 0 8px;
    -moz-border-radius: 8px 0 0 8px;
    text-align: center;
    cursor: pointer;
    color: white;
    background-color: rgba(0, 0, 139, .1);
    background-image: url(img/double-left-chevron.svg);
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center 50%;
}

table.gps-menu {
    float: left;
    border-collapse: collapse;
    margin: 0;
    width: 188px;
    max-width: 188px;
    min-width: 188px;
}

#main_map_control input, #main_map_control select {
    border: 1px solid #00008B;
    background-color: rgba(0, 0, 139, .7);
    color: white;
    width: auto;
}

#main_map_control input[type="button"], #main_map_control input[type="submit"] {
    border: 2px solid #00008B;
    padding: 0 1em;
    letter-spacing: .05em;
    cursor: pointer;
}

#main_map_control input[type="button"]:disabled, #main_map_control input[type="submit"]:disabled {
    color: #D4D0C8;
}

#main_map_control label {
    font-weight: 500;
}

#main_map_control .caption {
    border-top: 1px solid;
    border-top-color: #666666;
    border-bottom: none;
    font-weight: 600;
    letter-spacing: .08em;
    color: #fff;
    background-color: rgba(0, 0, 139, .8);
}

#main_map_control .caption label {
    font-weight: 600;
    letter-spacing: .08em;
    color: #fff;
}

#main_map_control table {
    border-collapse: collapse;  /* эквивалент 'cellspacing' */
    margin: 0;
}

#main_map_control table tr {
    display: table-row;
    margin: 0;
}

#main_map_control td, #main_map_control th {
    display: table-cell;
    width: auto;
    margin: 0;
    padding: 3px 3px; /* эквивалент 'cellpadding' */
}

#main_map_control td td, #main_map_control td th, #main_map_control th td, #main_map_control th th {
    padding: 0;
}

#main_map_control #lbKlients, #main_map_control #lbTracker, #main_map_control #lbRep {
    width: 100%;
}

#main_map_control #trups_table {
    background-color: #CCCCFF;
    vertical-align: middle;
}

/* <div> в котором <select> точек трека */
#main_map_control #trackdiv {
}

/* <select> точек трека */
#main_map_control #seltrack {
    margin-top: 4px;
    background-color: rgba(0, 0, 139, .4);
}

/* для проверки существования метода calc
https://stackoverflow.com/questions/14125415/how-can-i-check-if-css-calc-is-available-using-javascript
*/
#css3-calc {
    width: 1px;
    width: calc(1px + 1px);
    margin: 0;
    padding: 0;
    border: none;
}
