/* Read by the page's visitor report (site_stats.report_script): a page only counts once its stylesheet is applied,
   which headless scrapers (they don't load CSS) never do. Keep this rule in every stylesheet a counted page links. */
:root {
    --stylesheet-applied: 1;
}

/* The overview page (templates/core/overview.html): a bar with buttons above a canvas that fills the window */
html, body {
    background-color: #D3CDC1;  /* as the family tree pages (general.css) */
    color: #000;
    font: 13px "Segoe UI", Arial, sans-serif;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

#bar {
    align-items: center;
    background: rgba(211, 205, 193, 0.92);
    display: flex;
    font-size: 14px;  /* as the header of the family tree pages (general.css) */
    gap: 8px;
    height: 40px;
    left: 0;
    padding: 0 12px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 2;
}

#bar button {
    background: transparent;
    border: none;
    color: #B80000;  /* the colour of everything clickable */
    cursor: pointer;
    font: inherit;
    padding: 4px 6px;
    text-decoration: underline;
}

/* How to move around, in the top right corner, in the size of the buttons; cut off with '…' when the window is
   narrow (the whole text is in its tooltip) */
#bar .hint {
    color: #5a5348;
    margin-left: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#bar button {
    flex-shrink: 0;  /* the buttons stay whole; the hint gives way */
}

/* On a phone the hint gets its own line(s) under the buttons, one empty line lower, and is shown whole */
@media screen and (max-width: 600px) {
    #bar {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 12px;
        row-gap: 1.4em;
    }

    #bar .hint {
        flex-basis: 100%;
        margin-left: 0;
        padding: 0 6px;  /* in line with the text of the buttons */
        white-space: normal;
    }
}

canvas {
    cursor: grab;
    display: block;
    touch-action: none;  /* the page handles pinching and dragging itself */
}

#tip {
    background: #fff;
    border-radius: 4px;
    box-shadow: 2px 2px 4px #888;
    display: none;
    line-height: 1.4;
    padding: 4px 8px;
    pointer-events: none;
    position: fixed;
    white-space: pre;
    z-index: 3;
}
