/* The picker fills the visible area through its fixed edges, never through vh: on an iPhone
   100vh is taller than what Safari shows, so the widget's own "Vybrat" button at the bottom
   of the iframe ended up below the screen. */
#cpost-container {
    z-index: 999999;
    position: fixed;
    -webkit-backface-visibility: hidden;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    box-sizing: border-box;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    overscroll-behavior: contain;
}

.cpost-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 15px;
    background-color: white;
    box-shadow: 0 2px 10px rgb(0 0 0 / 20%);
    box-sizing: border-box;
}

.cpost-wrapper-header {
    display: flex;
    flex: none;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f3f3;
    padding-bottom: 13px;
    margin-bottom: 8px;
}

.cpost-wrapper-header-left {

}

.cpost-wrapper-header-center {

}

.cpost-wrapper-header-right {

}

.cpost-wrapper-header-right .fa {
    padding: 10px;
    margin: -10px;
}

#cpost-widget {
    display: block;
    flex: 1 1 0%;
    width: 100%;
    min-height: 0;
    border: 0;
    padding: 10px 5px;
    box-sizing: border-box;
}

/* The page behind stays still while the picker is open, so Safari's bars do not move. */
html.cpost-open,
html.cpost-open body {
    overflow: hidden;
}

/* Phones use the whole screen for the map and the list. */
@media (max-width: 575.98px), (max-height: 575.98px) {
    #cpost-container {
        padding: 0;
    }

    .cpost-wrapper {
        padding: 8px 10px max(8px, env(safe-area-inset-bottom));
        box-shadow: none;
    }

    .cpost-wrapper-header {
        padding: 0 4px 8px;
        margin-bottom: 0;
    }

    #cpost-widget {
        padding: 0;
    }
}
