﻿.gm-style {
    font-size: inherit;
    font-family: inherit;
}

    .gm-style .ol-attribution {
        bottom: 1em;
    }

        .gm-style .ol-attribution.ol-logo-only {
            bottom: 1em;
        }

.ol-mouse-position_custom {
    bottom: 12px;
    right: 35px;
    position: absolute;
}

.oltooltip {
    position: relative;
    padding: 3px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font: 10pt sans-serif;
    max-width: 400px;
}

.ol-popup {
    position: absolute;
    background-color: white;
    -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 31px;
    left: -50px;
    max-width: 250px;
    min-width: 150px;
}

    .ol-popup:after, .ol-popup:before {
        top: 100%;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
    }

    .ol-popup:after {
        border-top-color: white;
        border-width: 10px;
        left: 48px;
        margin-left: -10px;
    }

    .ol-popup:before {
        border-top-color: #cccccc;
        border-width: 11px;
        left: 48px;
        margin-left: -11px;
    }

.ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;
}

    .ol-popup-closer:after {
        content: "✖";
    }

/* Fullscreen + layer-switcher controls styled like the new "tracks" map buttons:
   plain white 38x38 squares with a soft shadow and the same icons. */
.ol-full-screen,
.layer-switcher.ol-control,
.layer-switcher.shown.ol-control {
    background: transparent;
    padding: 0;
}

/* Stack the two controls with a gap (like the tracks map controls). */
.ol-full-screen {
    top: 10px !important;
    right: 10px !important;
}

.layer-switcher.ol-control {
    top: 58px !important;
    right: 10px !important;
}

    /* !important: OpenLayers' ol.css is injected by the Angular bundle after this static
   file, so it would otherwise win on source order and keep the blue ⤢ glyph. */
    .ol-full-screen button,
    .layer-switcher.ol-control button {
        width: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        background-color: #fff !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 20px 20px !important;
        box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.2) !important;
        color: transparent !important;
        font-size: 0 !important;
        line-height: 0 !important;
        cursor: pointer;
    }

.ol-full-screen button {
    background-image: url('/assets/icons/full-screen-map.svg') !important;
}

.layer-switcher.ol-control button {
    background-image: url('/assets/icons/map-layers.svg') !important;
}

    .ol-full-screen button:hover,
    .ol-full-screen button:focus,
    .layer-switcher.ol-control button:hover,
    .layer-switcher.ol-control button:focus {
        background-color: #f3f5f7 !important;
    }

/* Layer dropdown panel styled like the "tracks" layer panel: white, soft shadow, no border. */
/* Open the layer list as a dropdown BELOW the button instead of replacing it
   (the default layerswitcher hides the button and grows upward, covering the controls). */
.layer-switcher.shown.ol-control {
    bottom: auto !important;
}

.layer-switcher.shown button {
    display: block !important;
}

/* Scoped to .shown — an unscoped ".layer-switcher .panel" would match the base
   layerswitcher.css rule's specificity and, loading after it, always win, forcing
   the panel to display:flex (visible) even when the control isn't shown. */
.layer-switcher.shown .panel {
    position: absolute;
    top: 42px;
    right: 0;
    min-width: 200px;
    background: #fff;
    border: none;
    box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.2);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.layer-switcher ul {
    padding-left: 0;
    margin: 0;
}

.layer-switcher li.layer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 15px;
}

    .layer-switcher li.layer:hover {
        background-color: #f2f2f6;
    }

    .layer-switcher li.layer label,
    .layer-switcher li.layer input {
        display: inline-flex;
        cursor: pointer;
    }

    .layer-switcher li.layer label {
        font-size: 15px;
    }

.layer-switcher input {
    margin: 0;
    width: 16px;
    height: 16px;
}
