/* The small parts every list and gallery of the platform shares (the page list, the files, the search settings, the
   menu editor, the page view): status chips, the tick box of a thing being chosen, the empty state, the progress ring,
   the quiet note above a list and the cards' entrance. Pages only place these parts (margins, which corner); they never
   restyle their size, colours or states. */

/* ---------- status chips: a row of small pills naming a state ---------- */
.app-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.app-chip i {
    font-size: 14px;
}

/* Live, published: green */
.app-chip-live {
    background: var(--app-success-soft);
    color: var(--app-success);
}

/* Needs a look (unpublished changes, missing, deleted soon): amber */
.app-chip-changed {
    background: var(--app-warning-soft);
    color: var(--app-warning);
}

/* Not out yet (a draft, in the trash): grey with a thin edge */
.app-chip-draft {
    border: 1px solid var(--app-line);
    background: var(--app-surface-soft);
    color: var(--app-text-muted);
}

/* A side note (not in the menu, unused, hidden): only a dashed edge */
.app-chip-quiet {
    border: 1px dashed var(--app-line);
    background: none;
    color: var(--app-text-muted);
}

/* New or special (just made, the home page, made by Bina): the accent colour */
.app-chip-new {
    background: var(--app-accent-soft);
    color: var(--app-accent);
}

/* ---------- the upgrade lock: a small crown pill saying a feature comes with a paid plan ----------
   <span class="app-lock"><i class="bx bxs-crown"></i><span class="app-lock-text">After upgrade</span></span>
   On its own or in an outline button it is the accent colour; in a solid button it takes the button's text colour over
   a light tint. */
.app-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.app-lock .bx {
    font-size: 13px;
}

.app-btn-primary .app-lock {
    background: color-mix(in srgb, var(--app-color-white) 22%, transparent);
    color: inherit;
}

/* ---------- the tick box of a thing being chosen ----------
   It carries its own state (app-pick-on), so it ticks the same way whatever its card or row is called. The default box
   is white with a soft edge, as it sits on a website thumbnail (always light) or in a list row beside one;
   app-pick-over places it on a picture's top left corner, 12px from its edges, lifted by a shadow; app-pick-sm is the
   smaller box on the platform's own surface (the dock's "select all"). Brand colour with a white tick once ticked. */
.app-pick {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border: 1.5px solid color-mix(in srgb, var(--app-color-deep) 28%, transparent);
    border-radius: 8px;
    background: var(--app-color-white);
}

.app-pick i {
    color: var(--app-color-white);
    font-size: 20px;
    transform: scale(0);
    transition: transform 0.3s var(--app-ease-spring);
}

.app-pick-over {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--app-color-primary) 20%, transparent);
    animation: app-pick-in 0.25s var(--app-ease-out) both;
}

.app-pick-sm {
    width: 20px;
    height: 20px;
    border-color: var(--app-line);
    border-radius: 6px;
    background: var(--app-surface);
}

.app-pick-sm i {
    font-size: 17px;
}

.app-pick.app-pick-on {
    border-color: var(--app-color-primary);
    background: var(--app-color-primary);
}

.app-pick-on i {
    transform: scale(1);
}

/* ---------- the empty state: a list with nothing to show ---------- */
.app-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 24px;
    border: 1px dashed var(--app-line);
    border-radius: 24px;
    background: var(--app-surface);
    text-align: center;
}

.app-empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-size: 30px;
}

.app-empty-title {
    margin: 18px 0 0;
    color: var(--app-text-strong);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
}

.app-empty-text {
    max-width: 420px;
    margin: 8px 0 0;
    color: var(--app-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.app-empty .app-btn {
    margin-top: 22px;
}

/* ---------- the progress ring: a share of something used or done ----------
   --app-ring-p (0–100) fills it; --app-ring-colour colours it (brand colour unless the page names a state colour). The
   label inside is a number or a short count such as "3/4". */
.app-ring {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: conic-gradient(var(--app-ring-colour, var(--app-color-primary)) calc(var(--app-ring-p, 0) * 1%), var(--app-surface-soft) 0);
}

.app-ring > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--app-bg);
    color: var(--app-text-strong);
    font-size: 11.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- a quiet note line above a list (how long the trash keeps things) ---------- */
.app-list-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: -12px 0 24px;
    color: var(--app-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.app-list-note i {
    flex: none;
    margin-top: 2px;
    font-size: 17px;
}

/* ---------- motion ---------- */

/* A gallery card or list row coming in (pages stagger it with their own delay) */
@keyframes app-card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes app-pick-in {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-pick-over {
        animation: none;
    }
}
