/* Shared Equipment & Furniture Management product page. Builds on site.css and the shared product page pieces in time.css.
   Colour roles: a hollow grey ring is a piece not yet located, blue is located or signed out, green is ready,
   red is a piece found damaged, and amber is a piece missing a component. */

/* The convocation staging manifest */

.manifest {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 var(--line), 0 24px 48px -24px rgba(20, 33, 61, 0.28);
    overflow: hidden;
}

.mf-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

/* Three running totals across the top */
.mf-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.mf-counts div {
    padding: 12px 22px;
}

.mf-counts div + div {
    border-left: 1px solid var(--line);
}

.mf-counts dt {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.mf-counts dd {
    font-variation-settings: "wdth" 112;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--signal);
}

.mf-counts .mf-ready {
    background: var(--verified-soft);
}

.mf-counts .mf-ready dd {
    color: var(--verified);
}

/* One row per kind of piece, and one row per issue raised */
.mf-rows,
.mf-issues {
    padding: 6px 0;
}

.mf-issues {
    border-top: 1px solid var(--line);
    min-height: 130px;
}

.mf-row,
.mf-issue {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
    padding: 8px 22px;
    font-size: 0.88rem;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.mf-what {
    display: flex;
    flex-direction: column;
    font-weight: 600;
}

.mf-detail {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.mf-count {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

/* Marks: a hollow ring until located, then shape and colour carry the state */
.mf-mark {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px var(--lapsed);
}

.mf-mark::after {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    color: var(--surface);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.mf-row.is-located .mf-mark {
    box-shadow: inset 0 0 0 2px var(--signal);
}

.mf-row.is-out .mf-mark {
    box-shadow: inset 0 0 0 2px var(--signal);
    background: radial-gradient(circle, var(--signal) 0 3px, transparent 3.5px);
}

.mf-row.is-ready .mf-mark,
.mf-issue.is-resolved .mf-mark {
    box-shadow: none;
    background: var(--verified);
}

.mf-row.is-ready .mf-mark::after,
.mf-issue.is-resolved .mf-mark::after {
    content: "";
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--surface);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mf-row.is-ready .mf-count {
    color: var(--verified);
}

.mf-row.is-fail {
    background: var(--stop-soft);
}

.mf-row.is-fail .mf-mark {
    box-shadow: none;
    background: var(--stop);
}

.mf-row.is-fail .mf-mark::after {
    content: "\00d7";
    font-size: 0.8rem;
}

.mf-row.is-fail .mf-count {
    color: var(--stop);
}

.mf-row.is-missing,
.mf-issue.is-open {
    background: var(--escalate-soft);
}

.mf-row.is-missing .mf-mark,
.mf-issue.is-open .mf-mark {
    box-shadow: none;
    background: var(--escalate);
}

.mf-row.is-missing .mf-mark::after,
.mf-issue.is-open .mf-mark::after {
    content: "!";
}

.mf-row.is-missing .mf-count {
    color: var(--escalate);
}

.mf-issue.is-pending {
    opacity: 0;
}

.mf-summary {
    padding: 12px 22px;
    border-top: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--verified);
}

.mf-summary.is-live {
    color: var(--ink-soft);
}

.mf-summary.is-open {
    color: var(--escalate);
}

/* Better state: the stage strip sits under the copy */
.better-strip {
    margin-top: clamp(28px, 4vw, 40px);
}

/* Asset record: an issue card holding an asset's facts and history */
.asset-card .record-facts {
    margin-bottom: 20px;
}

.asset-card .record-facts div {
    grid-template-columns: 110px minmax(0, 1fr);
    padding: 12px 0;
}

.asset-history {
    margin-bottom: 12px;
    font-weight: 650;
}

@media (max-width: 640px) {
    .mf-head,
    .mf-row,
    .mf-issue,
    .mf-summary,
    .mf-counts div {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mf-counts dd {
        font-size: 1.05rem;
    }

    .asset-card .record-facts div {
        grid-template-columns: minmax(0, 1fr);
    }
}
