/* Head of every page skeleton (Components/SkeletonPageHead.razor) and the "ghost" helpers that page skeletons use to
   hold the page's real content unseen, so a skeleton takes exactly the room of the page in every language and width.
   The shapes themselves come from app-ui.css (app-skel). Each site loads this file on every page, because its layout
   shows the page skeletons before a page and its own CSS are loaded. */

/* ===================================================================
     page head (SkeletonPageHead.razor): unseen real content (ghosts)
   =================================================================== */

/* The head's text holds the page's real text unseen (its height); the three shapes sit over it from the top, the same
   distance apart on every page however many lines the title and lead take. The column takes all the room beside the
   actions (on the page it is only as wide as its text), so the shapes do not change with the page's text or language;
   the text still wraps exactly as on the page, since it only wraps at that same room. */
.pskel-head-text {
    position: relative;
    flex: 1 1 auto;
}

.pskel-head-bars {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.pskel-head-bars > .app-skel {
    max-width: 100%;
}

/* A text element of the page (e.g. <p class="apg-lead">) holding its real text unseen, so it is exactly as high as on
   the page however the text wraps; one solid shape sits across the middle of it */
.pskel-ghost-line {
    position: relative;
}

/* Adds no box of its own, so the text and icons inside lay out exactly as they do in the page's element */
.pskel-ghost-hold {
    display: contents;
    visibility: hidden;
}

/* The shape keeps its own width even where the element is only as wide as its text (the eyebrow) */
.pskel-ghost-line > .app-skel {
    position: absolute;
    top: 50%;
    left: 0;
    max-width: none;
    transform: translateY(-50%);
}

/* The page's real control, unseen inside a shape of exactly its size (a switch, a button, a badge). The box carries the
   page's own layout classes and sets no display or width of its own, so the page's rules for the control apply to it
   (hidden on phones, stretched across a row); in the page's flex rows it is as wide as the control inside. */
.pskel-ghost-box {
    height: auto;
}

/* The control keeps its own display (inline-flex, inline-grid), so it lays out exactly as on the page; set at the top of
   its line, it adds no space under itself, so the box is exactly as high as the control */
.pskel-ghost-box > * {
    vertical-align: top;
    visibility: hidden;
}

/* A glass toolbar's filters (css/app-toolbar.css) drawn as one pill shape over the real, unseen options; in two rows
   (data-app-toolbar-fit="3", phones) they span the bar as on the page */
.pskel-toolbar-filters {
    flex: none;
}

.pskel-toolbar-filters > .app-toolbar-filters {
    width: 100%;
}
