/**
 *
 * generic stuff for each SteApp
 *
 */
body
{
    /*
        fixing "Ignored attempt to cancel a touchmove event ..."
            when pan/zoom with map (openlayers)
    */
    touch-action: none !important;
    background-color: white;
}

#first_page
{
    height: 100vh;
    width: 100vw;
}

#first_page .background, #first_page .content
{
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

#first_page .background
{
    background-color: #fafafa;
}

#first_page .content
{
    text-align: center;
}

#first_page .content div.logo
{
    padding: 10px;
}

/**
 * remove default page background / make transparent
 */
ons-navigator > ons-page > .page__background
{
    background-color: transparent;
}

/* add pointer for browser */
button, .button, .tabbar__button, .toolbar-button, .back-button, .alert-dialog-button, .button-list, .fab, a, .clickable, [tappable], select, option
{
    cursor: pointer !important;
    outline:none;
}

.button-list:hover i, .clickable:hover img
{
    border-radius: 100%;
    background-color: rgba(238, 238, 238, 0.8);
    box-shadow: 0 0 0 0.5em rgba(238, 238, 238, 0.8);
    transition: border-radius 0.5s linear;
}

.button
{
    margin: 8px;
}

.hide
{
    display: none !important;
}

/**
 * outdated, migrate to fullscreen?
 */
div.fullsize
{
    position: absolute;
    height: 100%;
    width: 100%;
    text-align: center;
}
div.fullsize div.centercenter
{
    position: absolute;
    top: 50%;
    left: 50%;
    display:inline;
    transform: translate(-50%, -50%);
}

/**
 * should be the default for 1 div which fills the whole screen on mobile
 */
div.fullscreen
{
    position: relative; /* for childs to be absolute in this div */
    padding: 10px;
    max-width: 500px;
    margin: auto;
}

/**
 * round floating buttons with icon (i) in the center
 */
.roundbuttons .button, .roundbuttons .button:active, .roundbuttons .button[disabled]
{
    position: relative;
    width: 50px;
    height: 50px;
    background-color: #fafafa;
    box-shadow: 0 3px 6px rgba(0,0,0,.12);

    border: 1px solid #fafafa;
    border-radius: 100%;
}

.roundbuttons .button:active
{
    opacity: 1; /* overwrite onsen default */
    border-color: #afafaf;
    background-color: #eee;
}

.roundbuttons .button ons-icon
{
    margin: 0.2em;
    color: black;
}
.roundbuttons .button i
{
    padding: 0;
    margin: 0;
    color: black;
    position: absolute;
    top: 50%;
    left: 50%;
    display:inline;
    font-size: 1.4em;
    transform: translate(-50%, -50%);
}

.roundbuttons .button i.ri-fw::before, .roundbuttons .button .spinner
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.roundbuttons .fab.button
{
    font-size: 17px;
    margin: 8px;
}

.roundbuttons .button.mini
{
    height: 40px;
    width: 40px;
}

.roundbuttons .speed-dial__item--mini.button
{
    position: absolute;
    height: 40px;
    width: 40px;
    margin: 8px;
}

/**
 * mini float buttons
 */
.minibuttons .button
{
    padding: 2px;
    line-height: normal;
    /* offset-x | offset-y | blur-radius | spread-radius | color */
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.minibuttons .button i
{
    display: block;
}

.loading .spinner, #loading .spinner
{
    width: 6em;
    height: 6em;
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/**
 * popover
 */
.popover .button
{
    margin: 0;
}

.popover h5
{
    font-size: 1em;
    margin: 1em;
    margin-top: -0.1em;
}

.popover div.popover__content
{
    box-shadow: 0px 0px 6px 0px #717171;
}

/**
 * allow text select
 */
.selectable:not(input):not(textarea):not(select)
{
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
    user-select: all;

    width: 100%;
    overflow: hidden;
    /*text-overflow: ellipsis;*/
    word-break: break-word;
}

#splash .spinner
{
    width: 6em;
    height: 6em;
    text-align: center;
}

/**
 * close "x" for popups/modals
 */
.button.close, .button.close:active
{
    position: absolute;
}

.button.close i
{
    font-size: 1.4em;
    color: red;
}

.popover .button.close, .popover .button.close:active
{
    top: -0.1em;
    right: -0.2em;
}

.page .button.close, .page .button.close:active, .modal .button.close, .modal .button.close:active
{
    top: 10px;
    right: 10px;
}

/* close button on a fullscreen page, with background */
.page .fullscreen .button.close, .page .fullscreen .button.close:active
{
    margin: 0;
}

.progress.global
{
    opacity: 0;
    position: absolute;
    top: 85%;
    width: 100%;
}

.progress.global .progress-bar__secondary
{
    background-color: #a4aab37d;
}

/*
 * list icons
 */
#screen_settings ons-list-item .left i
{
    font-size: 1.8em;
}

/* icon size splitter */
#splitter_menu .list-item .left i
{
    font-size: 1.4em;
}

/* link to homepage on click on logo */
#splitter_menu .logo
{
    text-align: center;
    padding: 5px
}
#splitter_menu .logo img
{
    width: clamp(50px, 4vw, 200px);
}

/**
 * generic listcontainer
 */
.listcontainer
{
    background: transparent;
    will-change: opacity;
}

.listcontainer .list
{
    background-color: white;
    height: 100%;
    overflow: auto; /* browser: hidden */
}

.listcontainer div.offscreen .button
{
    margin-top: 0;
}

.listcontainer div.offscreen div.gesture
{
    position: absolute;
    top: 50%;
    margin-left: 8px;
}

.listcontainer div.offscreen div.gesture img
{
    padding: 5px;
    background-color: white;
    border-radius: 3px;
    width: 2em;
}

.listcontainer.bottom
{
    position: absolute;
    bottom:0;
    display: inline-block;

    top: 100vh; /* hidden */
    opacity: 0; /* hidden */

    transition: 0.8s;
}

.listcontainer.bottom.visible
{
    top: 50vh;
    opacity: 1;
}

.listcontainer.left
{
    left: 0;
}

.listcontainer.right
{
    right: 0;
}

.listcontainer.left div.offscreen
{
    float: right;
}

.listcontainer.right div.offscreen
{
    float: left;
}

.listcontainer.left .list
{
    border-top-right-radius: 3px;
}

.listcontainer.right .list
{
    border-top-left-radius: 3px;
}

/*
    show button
*/
.listcontainer.show
{
    opacity: 0;
    transition: 0.4s;
}

.listcontainer.show.visible
{
    opacity: 1;
}

/**
 * modal/popover/splitter background
 */
.modal, ons-splitter-mask
{
    background: rgba(0,0,0,0.5);
}
/* popover should be non-intrusive */
.popover-mask
{
    background: none;
}

.modal__content > .content
{
    text-align: center;
    padding: 3%;
}

.modal__content > .content .scrollable
{
    display: inline-block;
    height: 80vh;
    width: 80vw;
    overflow: auto;
}

.modal__content > .content p, .modal__content > .content h2, .modal .card .title
{
    color: black;
}

.modal .card p
{
    margin: 0;
    font-size: 1.1em;
}

/**
 * like_alert modal
 */
.modal.like_alert .card
{
    max-width: 400px;
    width: auto;
    display: inline-block;
}

.modal.like_alert .title, .modal.like_alert .content
{
    text-align: left;
}

.modal.like_alert .title
{
    color: #294c22;
}

.modal.like_alert .content
{
    display: flex;
    flex-flow: column;
}

.modal.like_alert .content > div
{
    flex-basis: 100%;
}

.modal.like_alert .content img
{
    width: 100%;
}

.modal.like_alert .content p
{
    padding-top: 8px;
    text-align: right;
}

.modal.like_alert .content .errors .list
{
    padding-top: 8px;
    max-height: 30vh;
}

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

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

@media (orientation: landscape)
{
    @media (max-height: 400px)
    {
        .modal.like_alert .card
        {
            max-width: 440px;
            max-height: 400px;
        }

        .modal.like_alert .content
        {
            display: flex;
            flex-flow: row;
            justify-content: space-between;
            align-items: flex-start;
        }
    }
}

.modal .list-item .expandable-content
{
    line-height: 1.5em;
    text-align: justify;
    padding-right: 5px;
    padding-left : 5px;
}

/* break button text if it is too large! */
.modal .card .button
{
    white-space: inherit;
}

/* restrict max height of card content */
/*.modal .card .content
{
    max-height: 68vh;
    overflow-y: auto;
}*/

/**
 * InfoPopover
 */
.InfoPopover ul
{
    text-align: left;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

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

.InfoPopover ul li
{
    margin-bottom: 0.6em;
}

/**
 * alert dialog restrict image to width
 */
.alert-dialog-content img
{
    width: 100%;
}

/**
 * overwrite action sheet mini text
 */
.action-sheet-title:first-child
{
    font-size: 16px;
    color: unset;
}

/**
 * generic card
 */
.card > .title
{
    opacity: 0.6;

    /* force icon=text baseline */
    display: flex;
}
