/*
 * Public site: the small marks of a product — the letter, the status pill, the type chip. Used by the
 * card of a product and by the head of its page. Every one is set in ordinary case (rules.md §1.2).
 */

/*
 * The product colour is data (rules.md §2.2, D-015), not a token: the page puts it on the element as
 * --app-prod. Without it the mark falls back to a neutral, never to the accent (the accent is the colour of actions).
 */
.app-pmark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    /* The width in px is the `sizes` of views/products/_mark.php ($markWidth); change both together. */
    --app-pmark-size: calc(var(--space-6) - var(--space-0));

    width: var(--app-pmark-size);
    height: var(--app-pmark-size);
    border-radius: var(--radius-glyph);
    background: var(--app-prod, var(--text-3));
    /* Light or dark by the contrast with the colour of the product, from the same sheet (rules.md §2.2). */
    color: var(--app-prod-ink, var(--surface));
    font-size: var(--fs-site-read);
    font-weight: var(--fw-semibold);
}

/* The icon file of a product (spec.md §3.1) stands in the place of the letter: the same box, the picture whole and without the colour behind it. */
.app-pmark--file {
    background: none;
    object-fit: contain;
}

/* The status pill: its own pair from the scales of meaning (steps 1 and 4). */
.app-pill {
    padding: 2px var(--space-1);
    border-radius: var(--radius-badge);
    font-size: var(--fs-site-meta);
    font-weight: var(--fw-medium);
    line-height: var(--lh-text);
    white-space: nowrap;
}

.app-pill--positive {
    background: var(--scale-positive-1);
    color: var(--scale-positive-4);
}

.app-pill--neutral {
    background: var(--scale-neutral-1);
    color: var(--scale-neutral-4);
}

.app-pill--warn {
    background: var(--scale-warn-1);
    color: var(--scale-warn-4);
}

/* The type chip pushes itself to the right end of the row and wraps under the name when it does not fit. */
.app-chip {
    margin-left: auto;
    padding: 2px var(--space-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-badge);
    background: var(--surface-2);
    color: var(--text-3);
    font-size: var(--fs-site-meta);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-text);
}
