:root
{
    /* apply to onsen */
    --popover-radius: var(--main-border-radius);

    --radarprofi-blue: 57, 167, 215;
}

#map_lock, #map_loop
{
    /*
        fixing "Ignored attempt to cancel a touchmove event ..."
            when pan/zoom with map (openlayers)
    */
    touch-action: none !important;
}

/**
 * add default background
 */
ons-navigator > ons-page > .page__background.landscape, .background.landscape
{
    background-image: url('../img/landscape.svg');
    background-position: bottom;
    background-repeat: repeat-x;
    background-size: auto 80%;
    background-attachment: fixed;
    background-color: rgba(var(--radarprofi-blue), 1);
}

/**
 * big play/pause icon in the middle of the app on play/pause start
 */
.maxfadeout
{
    will-change: transform, opacity;
    animation: blob 0.5s linear forwards;
}

.indicator_play, .indicator_pause, .indicator_stop
{
    opacity: 0;
    font-size: 8em;
    color: rgba(var(--main-font-color-opposite), 1);

    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes blob {
    0% {
/*
        font-size: 8em;
*/
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
/*
        font-size: 28em;
*/
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/**
 * used in map_openlayers
 */
.map_layer_background
{
    filter: grayscale(100%) brightness(0.6) contrast(130%);
    -webkit-filter: grayscale(100%) brightness(0.6) contrast(130%);
}
.map_layer_borders
{
    filter: grayscale(60%) invert(30%) contrast(4.5); /* build:platforms="android,browser" */
    mix-blend-mode: multiply;
}
.map_layer_borders canvas
{
    /* in safari, mixing filter and mix-blende-modes does not work, but this does */
    -webkit-filter: grayscale(60%) invert(30%) contrast(4.5);
}
.map_layer_topo
{
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
}

.map_layer_radar
{
/*
    filter: drop-shadow(5px 5px 0 rgb(100, 100, 100));
*/
    image-rendering: pixelated;
/*
    display: none;
*/
}

#map .datetimecontainer, #map .datetimecontainerinfo
{
    opacity: 1;
    top:0;
    left:0;
    position: absolute;
    display: inline-block;

    cursor: help;
    padding: 0.5em;
    width: 3.5em;
    height: 3.5em;

    background-color: rgba(var(--main-bg-color), 1);

    /* same as roundbuttons */
    border-style: solid;
    border-width: 3px;
    border-color: rgba(var(--main-border-color), 1);
    border-radius: 100%;
    box-shadow: 0 3px 6px rgba(var(--main-shadow-color), 0.12);
    margin: 8px;
}

#map .datetimecontainer:active, #map .datetimecontainerinfo:active
{
    opacity: 1; /* overwrite onsen default */
    background-color: rgba(var(--second-bg-color), 1);
}

#map .datetimecontainerinfo
{
    top: 3.6em;
    left: 0.4em;
    height: 1.6em;
    width: 1.5em;

    border-width: 0;
    padding: 2px;
    margin: 0;
}
#map .datetimecontainerinfo i
{
    font-size: x-large;
}

#map .datetimecontainer.noradarloaded, #map .datetimecontainerinfo.noradarloaded
{
    opacity: 0;
}

#map .datetimecontainer:disabled, #map .datetimecontainer[disabled], #map .datetimecontainerinfo:disabled, #map .datetimecontainerinfo[disabled]
{
    pointer-events: none;
    opacity: 0.3; /* same as roundbuttons */
}

#map .datetimecontainer.small
{
    width: 3em;
    height: 3em;
}

#map .datetimecontainer .value_radar_datestr
{
    display: inline-block;
    white-space: nowrap;
    transform: translateX(-50%);
    position: absolute;
    top: 0.7em;
    left: 50%;
    font-size: smaller;

    opacity: 0.8; /* just for another font color */
}

#map .datetimecontainer .value_radar_datestr.small
{
    top: 0.6em;
}

#map .datetimecontainer .value_radar_timestr
{
    display: inline-block;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    position: absolute;
    top: 51%;
    left: 50%;
    line-height: 1em;
}

#map .datetimecontainer .value_radar_timediffstr
{
    display: inline-block;
    white-space: nowrap;
    transform: translateX(-50%);
    position: absolute;
    bottom: 0.5em;
    left: 50%;
    font-size:smaller;
    border-bottom-right-radius: var(--main-border-radius);
    border-bottom-left-radius: var(--main-border-radius);
    padding: 0.2em;

    opacity: 0.8; /* just for another font color */
}

#map .datetimecontainer .value_radar_timediffstr.small
{
    bottom: 0.3em;
}

#map .become_vip
{
/*
    position: absolute;
    display: inline;
    padding: 0.2em;
    right: 0;
*/
    text-align: right;
}

.become_vip ons-button
{
    margin: 0;
    padding: 0.2em;
}

/**
 * shortcut cheatsheet
 */
.modal.cheatsheet
{
    background-color: rgba(var(--main-bg-color), 0.3);
}

.cheatsheet .left, .cheatsheet .center, .cheatsheet .right
{
    height: 100vh;
    background-color: rgba(var(--main-bg-color), 0.6);
    transition: background-color 400ms linear;
}

/* must be after the background color */
.cheatsheet .transparent
{
    background-color: transparent;
}

.cheatsheet [data-slide]
{
    display: flex;
}

.cheatsheet .left
{
    flex-basis: 25%;
}

.cheatsheet .center
{
    flex-basis: 50%;
    flex-grow: 1;
}

.cheatsheet .right
{
    flex-basis: 25%;
}

.cheatsheet .text
{
    flex: none;
    position: absolute;
    text-align: center;
    top: 60vh;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
}

.cheatsheet div.arrow
{
    position: relative;
    top: 50%;
    font-size: xxx-large;

    transform: translateY(-50%);
    /*color: rgba(var(--main-font-color), 0.7);*/
}

/**
 *
 */
.marker_setLocation
{
    position: absolute;
    top: 50%;
    left: 50%;
    /* for icons with element center/center (e.g. circle):
     * -50%, -50%
     * for icons with element bottom/center (e.g. pin):
     * -50%, -100%
     */
    transform: translate(-50%, -100%);
    font-size: 1.8em;

    color: rgba(var(--main-color-white), 0.8);

    --filter: drop-shadow(2px 2px 4px rgba(var(--main-shadow-color), 0.8));
    filter: var(--filter);
    -webkit-filter: var(--filter);

    pointer-events: none;
}

/**
 * current location marker
 */
.marker_userLocation
{
    border-radius: 50%;

    background-color: rgba(var(--main-color-white), 0.8);

    height: 0.6em;
    width: 0.6em;
}

.marker_userLocation.animated
{
    opacity: 0.8;
    animation: pulse 8s infinite;
    animation-delay: 2s;

    will-change: transform, opacity;
}

@keyframes pulse
{
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    17% {
        opacity: 0;
        transform: scale(6);
    }

    18% {
        transform: scale(1);
    }
    /*
        simulating a pause :)
    */
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.marker_viewDirection
{
/*
    visibility: hidden;
    position: absolute;
*/
    position: relative;
    opacity: 0.8;
    filter: invert(1);
    -webkit-filter: invert(1);

/*
    top: -13px;
*/
    width: 38px;

/*
    top: -1.0em;
    left: -0.7em;
    display: inline-block;
*/
    transform: translateY(-45%) rotate(50deg);
    transform-origin: center bottom;
}

/**
 * captcha card
 */
#captcha .actions
{
    display: flex;
}

#captcha .actions .button
{
    flex: 1;
    padding: 0;
    margin: 0;
    font-size: clamp(50px, calc(1.5rem + 6vw), 80px);
    background-color: transparent;
    line-height: unset;
    text-align: center;
}

#captcha .content .attempts
{
    font-size: small;
    text-align: right;
}

#captcha div.body
{
    position: relative;
    display: inline;
}

#captcha div.body div.copyright
{
    position: absolute;
    right: -2px;
    bottom: 3px;
    padding: 3px;
    font-size: 0.8em;
    transform: translate(100%) rotate(-90deg);
    transform-origin: left bottom;
    opacity: 0.6;

    background-color: rgba(var(--main-bg-color), 1);
}

#captcha div.copyright a
{
    text-decoration: none;
}

img.logo
{
    position: absolute;
    top: 0;
    left: 50%;
    height: 40vh;
    padding: 10px;

    transform: translateX(-50%);
    transition: 0.5s;
}

img.logo.minimize
{
    /*height: 15vh;*/
    height: 100px;
}

img.logo.top.left
{
    top: 0;
    left: 0;
    transform: none;
}

img.logo.left
{
    left: 0;
}

img.logo.top.center
{
    /*top: 50%;*/
    left: 50%;
    transform: translateX(-50%);
}

/**
 * colorscale
 */
#colorscale.list
{
    border-top-right-radius: 0;
}

#colorscale.list
{
    border-collapse: collapse;
    border: none;
    max-height: 50vh;
}

#colorscale.list .item
{
    font-size: 16px;
}

#colorscale.list .item .color
{
    padding: 1px;
    width: 10px;
}
#colorscale.list .item .value
{
    padding-left: 8px;
    text-align: right;
}
#colorscale.list .item .explain
{
    white-space: nowrap;
    padding-left: 8px;
    padding-right: 8px;
    font-style: italic;
}

/**
 * Playlist
 */
#playlist.list
{
    max-height: 50vh;
}

#playlistcontainer div.gesture
{
    margin-left: 16px; /* double of button margin */
}

#playlistcontainer div.gesture img
{
    transform: scaleX(-1);
}

/**
 * openlayers map attribution size and position
 * @NOTE the extra div.map_attributions is because of all the layers above the openlayers layers
 *      ("i" is not clickable without this)
 */
.ol-attribution
{
    font-size: 0.8em;
    right: 50%;
    transform: translateX(50%);
    opacity: 0.6;
}

.map_control_zoom
{
    position: fixed;
    bottom: 0;
    left: 0;

    opacity: 1;
    transition: left 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.map_control_zoom.hide
{
    left: -5em;
    opacity: 0;
    display: block !important; /* don't let global .hide overwrite */
}

.map_control_zoom .ol-control
{
    background: none;
    position: unset;
}

.map_control_zoom .ol-control .button
{
    margin: 8px;
}

/* highlight subscriber, title */
#screen_mainmap .center .subscriber_highlight
{
    display: inline-block;
    line-height: normal;
    position: absolute;
    right: -0.6em;
    left: unset;
    top: -0.4em;
    opacity: 0.8;

    color: rgba(var(--main-glow-color), 1);
    text-shadow: 0px 0px 10px rgba(var(--main-glow-color), 1);
}

#tutorial.modal, .transparent
{
    background: transparent;
}

/**
 * seasonal greetings
 */
.christmas::before
{
    content: "🎅";
}

.newyearseve::before
{
    content: "🎆";
}

.newyearsday::before
{
    content: "🍾";
}

/**
 * products select list
 */
.list.products .list-item.product
{
    border-width: 2px;
    border-style: solid;
    border-radius: var(--main-border-radius);
    border-color: rgba(var(--main-border-color), 1);

    margin-bottom: 10px;
    /* transition for border is done by default */
}

.list.products .list-item.product .right
{
    display: block;
    text-align: right;
}

.list.products .list-item.product.selected
{
    border-color: rgba(var(--main-color-green), 1);
}

#page_packages ons-bottom-toolbar
{
    height: auto; padding-right: 10px; padding-left: 10px;
}
#page_packages ons-bottom-toolbar > div
{
    max-width: 500px; text-align: center; margin: auto;
}
#page_packages ons-bottom-toolbar .button
{
    margin: 0;
}
#page_packages ons-bottom-toolbar .button.restore_purchases
{
    /*display: block;*/
    padding: 0;
    font-size: smaller;
    text-align: right;

    color: rgba(var(--main-font-color-opposite), 1);
}

#page_packages .price
{
    white-space: nowrap;
}

#page_packages .reason
{
    display: flex;
    align-items: end;
}

#page_packages .reason .main
{
    width: 100%;
    font-size: large;
}

#page_packages .reason .icon
{
    padding-right: 8px;
}

#page_packages .reason .icon i
{
    font-size: x-large;
}

#page_packages .reason .main .title
{
    color: rgba(var(--main-color-black), 1);
}

#page_packages .reason .main .subtitle
{
    font-size: smaller;
    color: rgba(var(--main-color-white), 1);
}

/**
 * about page
 */
#page_about .list-item .center
{
    align-items: baseline;
}

/**
 * purchase_verifying modal
 */
#purchase_verifying .content .errors .list
{
    padding-top: 8px;
    max-height: 30vh;
}

#purchase_verifying .content .errors .list .list-item
{
    display: inline-block;
    padding-bottom: 4px;
}

#purchase_verifying .content .errors .list .list-item > div
{
    display: inline;
    padding: 0;
}

/**
 * weatherstation values
 */
#weatherstation
{
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block !important; /* don't let global .hide overwrite */
    opacity: 0.9;
    /*transition: opacity 0.5s ease-in-out;*/
    transition: 0.5s ease-in-out;

    padding: 0.5em;
    border-radius: var(--main-border-radius);

    /* same as roundbuttons */
    background-color: rgba(var(--main-bg-color), 1);
    box-shadow: 0 3px 6px rgba(var(--main-shadow-color), 0.12);
    border-width: 3px;
    border-style: solid;
    border-color: rgba(var(--main-border-color), 1);
    margin: 8px;
}

#weatherstation.hide
{
    pointer-events: none;
    opacity: 0;
}

#weatherstation .close
{
    top: -1em;
    right: -1em;
}

#weatherstation .weatherstation .name
{
    font-weight: 600;
}

#weatherstation .weatherstation .time
{
    line-height: 2em;
    text-align: right;
}

#weatherstation .weatherstation .unit
{
    opacity: 0.6;
}

#weatherstation .weatherstation table
{
    width: 100%;
    text-align: left;
    white-space: nowrap;
}

#weatherstation .weatherstation .values
{
    overflow-y: auto;
    touch-action: pan-y;
    max-height: 40vh;
}

#weatherstation .weatherstation table td:nth-child(2),
#weatherstation .weatherstation table td:nth-child(3)
{
    padding-left: 0.5em;
    text-align: right;
}

#weatherstation .time_of_value
{
    text-align: right;
    font-size: small;
    opacity: 0.6;
}

/**
 * info bars (bottom, stacked)
 */
#infobars
{
    color: rgba(var(--main-font-color), 1);
}

#infobars.right
{
    pointer-events: none;
    position: fixed;
    right: 0;
    bottom: 0;
    text-align: right;
}

#infobars.right .infobar
{
    background-color: rgba(var(--main-bg-color), 1);
}

#infobars .infobar .button
{
    padding: 0;
    margin: 0;
}

#infobars.right .wrapper
{
    opacity: 0.1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out, opacity 0.5s;
}

#infobars.right .infobar
{
    pointer-events: auto;
    display: inline-flex;
    align-items: center;

    width: auto;
    max-width: 75vw;
    border-top-left-radius: var(--main-border-radius);
    border-bottom-left-radius: var(--main-border-radius);
    padding: 8px 16px;
    margin-bottom: 8px;
}

#infobars.right .infobar i
{
    font-size: larger;
    padding-right: 8px;
}

#infobars .wrapper.show
{
    transform: scaleX(1) !important;
    opacity: 0.9 !important;
}

/**
 * progress / spinner
 */
#map .loading
{
    height: 100%;
    width: 100%;
    position: absolute;
    opacity: 0.8;
    background-color: rgba(var(--main-bg-color), 0.8);
    z-index: 2000;
}

/* icon/text in the middle of the loading spinner */
.loading .spinner i
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* for an icon: font-size: 4em;*/
    font-size: 1.4em;
    white-space: nowrap;
    /*color: rgba(var(--main-font-color), 0.7);*/
}

.blocking.loading .spinner, .loading .spinner
{
    position: relative;
    top: unset;
    left: unset;
    transform: unset;
}

/* BlockingProgress modal */
.blocking.loading
{
    z-index: 20 !important; /* don't go over other alerts, etc pp */
    background-color: rgba(var(--main-bg-color), 0.3);
}

.blocking .section, .loading .section
{
    margin-bottom: 2em;
    text-align: center;
}

.blocking .section div, .loading .section div
{
    opacity: 1;
    transition: all 200ms ease 0s;

    display: inline-block; /* !important; don't let global .hide overwrite */
}

.blocking .info
{
    border-radius: var(--main-border-radius);
    padding: 5px;
    /*color: rgba(var(--main-font-color), 0.7);*/
    background-color: rgba(var(--main-bg-color), 0.8);
}

/*
 * @TODO easy (css centered?) helper funcs for fade out/in elements
 * would be nice to have a nice fade out/in, but display: none is necessary to free the used space (for centered positioning)
 * for the moment
.blocking .section .hide
{
    opacity: 0;
}
*/

/**
 * generic map menu
 */
div.map_menu
{
    position: absolute;
    text-align: right;
    z-index: 2000;
}

/**
 * is remove after the child elements have finished transition (on closing)
 */
div.map_menu.max-width
{
    width: 70vw;
}

div.map_menu div.left > .button, div.map_menu div.down > .button, div.map_menu div
{
    transition: all .2s ease-out;
    transition-delay: 100ms;
}

/* closed */
div.map_menu div.left > .button, div.map_menu div.down > .button
{
    transform: scale(0);
    opacity: 0.5;
}
div.map_menu div.left > .button
{
    margin-right: -20px;
}
div.map_menu div.down > .button
{
    margin-top: -20px;
}

/* disable buttons */
div.map_menu div.left > .button:disabled, div.map_menu div.left > .button[disabled],
div.map_menu div.down > .button:disabled, div.map_menu div.down > .button[disabled]
{
    opacity: 0.3 !important; /* restore onsen default */
}

/* open */
div.map_menu.open div.left > .button, div.map_menu.open div.down > .button, div.map_menu div.down.shortcut.open > .button
{
    transform: scale(1);
    opacity: 1;
}
div.map_menu div.down.shortcut.open > .button
{
    opacity: 0.7;
}

div.map_menu.open div.left > .button
{
    margin-right: 8px;
}
div.map_menu.open div.down > .button, div.map_menu div.down.shortcut.open > .button
{
    margin-top: 8px;
}

/* left of main button */
div.map_menu div.left
{
    position: absolute;
    right: 61px;
    top: 5px;
}

/* down of main button */
div.map_menu div.down
{
    position: absolute;
    top: 61px;
    width: 57px;
    right: 5px;
    display: inline-block;
}

/* icon+text: move the whole p to left*/
div.map_menu div.down > .button p
{
    left: 33%;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 5%;
}

/*  icon+text: positioning the extra text right from icon */
div.map_menu div.down > .button p small
{
    position: relative;
    left: 15px;
    top: -5px;
}

div.map_menu.top
{
    top: 0.2em;
}

div.map_menu.right
{
    right: 0.2em;
}

/* do not be overwritten by using disabled=true, do it yourself: */
div.map_menu #WeatherStationsLayer_select .button.disabled
{
    opacity: 0.3 !important;
    pointer-events: none !important;
    touch-action: none !important;
}

.glow
{
    /*border-color: rgba(var(--main-glow-color), 1) !important;*/
    box-shadow: 0px 0px 14px 2px rgba(var(--main-glow-color), 1) !important;
}

/*
 * settings list of options
 */
.settings_theme_mode.list-item .expandable-content
{
    text-align: right;
    width: 100%;
}

.settings_theme_mode.list-item .expandable-content ons-list
{
    display: inline-block;
}

@keyframes delayed_fadein
{
    0% { opacity: 0; }
    80% { opacity: 0; }
    100%   { opacity: 1; }
}

.InfoPopover ul.tt
{
    /*list-style-type: '🌡️';*/
    padding: unset;
    margin: unset;
    padding-left: 1em;
}

.sizeof1em, .sizeof1rem
{
    position: absolute;
    top: 0;
    left: 0;
    height:1em;
    width:0;
    outline:none;
    border:none;
    padding:none;
    margin:none;
    box-sizing:content-box;
    display: inline-block;
    pointer-events: none;
    touch-action: none;
}

.sizeof1rem
{
    height:1rem;
}

ul.sourceInfo
{
    text-align: left;
    list-style-type: none;
    padding-left: 0;
    hyphens: auto;
}

ul.sourceInfo i
{
    font-style: normal;
}
