/*** BORDER BOX SIZING ***/

html {
  font-family: sans-serif;
  box-sizing: border-box;
  color: #555;
}

*, *:before, *:after {
  box-sizing: inherit;
}


/*** GLOBAL ***/

html, body {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    font-family: sans-serif;
}

#map {
    width: 100%;
    /* Map height is adjusted dynamically via JS */
    padding: 0;
    margin: 0;
}

.nowrap {
    display: inline-block;
}

/*** HEADER ***/

#header, .metapage header {
    /* Required so that full height is reported for calculation of the
     * map height. See http://stackoverflow.com/a/19235907/857390.
     */
    overflow: auto;

    margin: 0;
    padding: 0.5em;
    position: relative;

    border-bottom: 1px solid #aaa;
}

.metapage header {
    margin-top: 3em;
}

#header h1, .metapage header h1 {
    font-size: 110%;
    margin: 0 1em 0 0;
    display: inline;
}

#header label {
  position: relative;
  cursor: pointer;
}

#header label.disabled {
  cursor: not-allowed;
}

#header label > * {
    vertical-align: middle;
}

#header label input {
    margin: 0 2px 0 2.25em;
}

#header label span {
    margin: 0 10px 0 0;
}

#header label .awesome-marker {
  display: inline-block;
  margin-top: -0.8em; /* compensate offset */
  transform: scale(0.75);
}

#header label .awesome-marker i {
    margin-top: 9px;
}

#header :disabled + span {
    color: #999;
}

#header form {
    margin: 0.25em 0 0 0;
    display: inline-block;
}

#btnToggleHeader {
    float: right;
    position: relative;
    top: -0.1em;
    outline: none;
    margin: 0 0 0 0.5em;
    cursor: pointer;

    /* The styling matches that of the select2 dropdown box */
    background: none;
    border: 2px solid #aaa;
    border-radius: 4px;
    padding: 0.2em 0.5em;
}

#btnToggleHeader:hover {
    background-color: #f4f4f4;
}

#btnToggleHeader::before {
    display: inline-block;
    content: '';
    width: 1em;
    height: 1em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' aria-hidden='true' focusable='false' width='1em' height='1em' style='-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);' preserveAspectRatio='xMidYMid meet' viewBox='0 0 15 15'%3E%3Cg fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.5 3a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1h-12zM1 7.5a.5.5 0 0 1 .5-.5h12a.5.5 0 0 1 0 1h-12a.5.5 0 0 1-.5-.5zm0 4a.5.5 0 0 1 .5-.5h12a.5.5 0 0 1 0 1h-12a.5.5 0 0 1-.5-.5z' fill='%23626262'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: 1px;
}

#details {
    clear: both;
    display: none;
    overflow: auto;
    margin: 0;
}

#details p {
    margin: 1em 0 0 0;
}

/*** MAP LOCATE ***/

.icon.locate::before {
    display: inline-block;
    content: '';
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' aria-hidden='true' focusable='false' width='0.67em' height='1em' style='-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);' preserveAspectRatio='xMidYMid meet' viewBox='0 0 1024 1536'%3E%3Cpath d='M768 512q0-106-75-181t-181-75t-181 75t-75 181t75 181t181 75t181-75t75-181zm256 0q0 109-33 179l-364 774q-16 33-47.5 52t-67.5 19t-67.5-19t-46.5-52L33 691Q0 621 0 512q0-212 150-362T512 0t362 150t150 362z' fill='%23626262'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}


/*** MAP ATTRIBUTION ***/

.leaflet-control-attribution {
    text-align: end;
}

/*** MAP POPUPS ***/

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background-color: #fafafa;
}

.leaflet-popup-content {
    margin: 1em;
}

.leaflet-popup-content h1 {
    font-size: 120%;
    margin-bottom: 0.25em;
}

.leaflet-popup-content p {
    margin: 0;
}

.leaflet-popup-content a {
    /* display: block along with line-height is use to make the 
    clickable/touchable area bigger. This provides a better experience on touch interfaces */
    display: block;
    line-height: 2em;
}

.leaflet-popup-content p.unclassified {
    margin-top: 0.5em;
    font-style: italic;
}

.awesome-marker i {
    font-size: 16px;
    margin-top: 6px;
    margin-left: -1px;
}

table.times, p.times {
    margin-top: 0.75em;
}

table.times th {
    font-weight: normal;
    font-style: italic;
    padding-left: 0;
    padding-right: 0.75em;
}

table.times tr.today * {
    font-weight: bold;
}

/*** CITY DROPDOWN ***/

#dropDownCitySelection {
    width: 8em;
}

.select2 {
    top: -2px;
    margin: 0 4px 0 2px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #555;
}

.select2-dropdown {
    font-size: 80%;
}


/*** META PAGES ***/


.metapage {
    background: #F5F5F3;
    padding: 2em;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.metapage header {
    padding: 0.5em 0 !important;
}

.metapage h1 {
    font-size: 2.5em !important;
}

.metapage h2 {
    font-size: 1.8em;
    margin-bottom: 0em;
}

.metapage p {
    line-height: 1.5em;
}

.metapage button {
    margin: 2em 0;
}
