/* Set theme colors up here and get a nice retheming of the PIM interface.
 */

:root {
    --primary: #0a72ba;
    --secondary: #fcb315;
    --accent: #b54d00;
    --success: #1d611d;
    --warning: #C04947;
    --error: #e91e63;
    --light: #dae6fd;
}

body,
#map {
    font-family: Verdana, Arial, sans-serif;
    font-size: .75rem;
}
 
#content-root {
    display: none !important;
}

body #map {
    position: absolute !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* .location-toggle {
    width: 26px;
    height: 26px;
    right: 10px;
    bottom: 75px;
    padding: 4px;
    z-index: 999;
}
 */
#map .info.legend {
    position: absolute;
    bottom: 0;
    right: 3rem;
    margin: 0;
    min-width: 280px;
    padding: 1rem 3.5rem 1rem 1rem;
    background: #efefef;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

#map .info.legend .brand img {
    width: 6rem;
    height: auto;
    /* margin: 0 0 1rem 0; */
}

#map .info.legend .brand span {
    display: none;
    font-weight: bold;
    margin: .5rem  0 0 0;
}

#map .info.legend .legend-wrap {
    margin: 1rem 0 0 0;
}

#map .info.legend h4 {
    margin-bottom: 0;
}

#map .info.legend ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#map .info.legend li {
    margin: .5rem 0;
    padding: 0;
    display: flex;
    align-items: center;
}

#map .info.legend img {
    width: 30px;
    height: 30px;
    margin: 0 14px 0 0;
}

#map .info.legend svg {
    width: 30px;
    height: 30px;
    margin: 0 14px 0 0;
}

#map .leaflet-marker-icon {
    margin: -14px 0 0 -14px;
}

#map .marker-label {
  /* background: transparent; */
  border: 0;
  box-shadow: none;
  font-size: .75rem;
  color: #fff;
  /* text-shadow: 0 0 1px rgba(255,255,255,.5); */
  padding: .1rem .3rem;
    border-radius: 2px;
    background: rgba(0,0,0,.5);
}

#map .marker-label::before {
  border: none;
}

#map .leaflet-popup-content-wrapper {
    padding: 1rem;
    background: #fff;
    border-radius: 4px;
    border: 0;
    box-shadow: none;
    color: #222;
}

#map .leaflet-popup-content {
    margin: 0;
}

#map .map-popup-content .labels {
    display: flex;
    align-items: flex-start;
}

#map .map-popup-content .icon {
    margin: 0 1rem 0 0;
    width: 53px;
    height: auto;
}

#map .map-popup-content .btn {
    display: block;
    color: var(--primary);
    background: #eee;
    margin: .25rem 0 0 0;
    padding: .5rem;
    border-radius: 4px;
    text-align: center;
    transition: all .25s;
}

#map .map-popup-content .btn:hover {
    color: var(--primary);
    background: #ddd;
}

body:not(.home) #map .map-popup-content .btn {
    display: none;
}

body.via #map .map-popup-content .subtitle {
    display: none;
}

.leaflet-popup-content-wrapper .title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 400;
    white-space: nowrap;
}

.leaflet-popup-content-wrapper .title span {
    display: block;
    font-weight: 600;
}

.leaflet-popup-content-wrapper .subtitle {
    margin: 0.35rem 0;
    font-size: .85rem;
    font-weight: normal;
    max-width: 10rem;
}

.leaflet-container .leaflet-popup-tip-container,
.leaflet-container a.leaflet-popup-close-button {
    display: none;
}

@media (max-width: 640px) {

#map .info.legend {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 3rem;
    /* width: 100vw; */
    border-radius: 0;
    font-size: .85rem;
    background: rgba(255,255,255,.85);
}

#map .info.legend.collapsed .brand span {
    display: block;
}

#map .info.legend img {
    width: 30px;
    height: 30px;
}

#map .info.legend svg {
    width: 30px;
    height: 30px;
}

#map .leaflet-popup-pane {
   /* position: fixed; */
   /* top: auto;
   bottom: 0; */
}
#map .leaflet-popup {
     position: absolute;
     top: 0 !important;
     left: 0 !important;
     transform: none !important;
     width: 100vw;
}

#map .leaflet-popup-content-wrapper {
    background: rgba(255,255,255,.85);
}
}
    
.layer-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    font-size: 24px;
    font-weight: 100;
    height: 30px;
}

.info.legend.leaflet-control.collapsed .legend-wrap {
    display: none;
}

html[lang="so"] #map .info.legend .legend-wrap .link-rail-station img,
html[lang="vi"] #map .info.legend .legend-wrap .link-rail-station img {
    margin-left: 2px;
    margin-right: 17px;
}

h5.subtitle {
    width: 100%;
    display: inline;
}

.map-popup-content .details  hr {
    margin-top: 1em;
    margin-bottom: 1em;
    border-bottom: 1px solid #ccc;
}

.subtitle.block {
    display: flex;
    flex-direction: column;
    border: 1px solid #aaa;
    width: 100% !important;
    max-width: unset !important;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

html[lang="zh"] .subtitle.block,
html[lang="ko"] .subtitle.block {
	font-size: 1.25rem;
}

.subtitle.block strong {
    border-bottom: 1px solid #aaa;
    background-color: #eee;
    color: #000;
    padding: 5px;
    text-align: center;
}

.subtitle.block em {
    padding: 5px;
    text-align: center;
    font-style: normal;
}

@media only screen and (max-width: 768px) {
    
    #map .map-popup-content .labels {
        flex-grow: 1;
        width: 100%;
    }
    
    #map .map-popup-content .labels .details {
        flex-grow: 1;
        width: 100%;
    }

}


@media only screen and (max-width: 640px) {
    .leaflet-control-zoom.leaflet-bar.leaflet-control {
        margin-bottom: 120px;
    }
}
