/* ============================================================================
   secondary-trading.css
   ----------------------------------------------------------------------------
   Styles for the secondary trading admin page and the investor holdings page.
   Loaded AFTER offering.css, which this file does not modify.

   Everything here is a new class - op-admincard, op-warnlist,
   op-secondary__stats, op-holding and its children. Nothing existing is
   overridden, so load order matters only for the CSS variables it inherits.
   ============================================================================ */


/* ---- shared ---- */

.op-admincard {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.op-admincard h3 {
    margin: 0 0 .25rem;
}

.op-admincard h4 {
    margin: 1.5rem 0 .25rem;
    font-size: 1rem;
}

/* Warnings render as a list rather than a paragraph: a rebuild can report
   twenty subscriptions, and run together they become unreadable. */
.op-warnlist {
    margin: .5rem 0 0;
    padding-left: 1.25rem;
}

.op-warnlist li {
    margin-bottom: .35rem;
    font-size: .9rem;
    line-height: 1.5;
}


/* ---- admin: readiness figures ---- */

.op-secondary__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: var(--op-surface, #F8FAFC);
    border-radius: var(--op-radius, 8px);
}

.op-secondary__stats > div {
    display: flex;
    flex-direction: column;
}

.op-secondary__stats span {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.op-secondary__stats label {
    font-size: .8rem;
    color: var(--op-muted, #64748B);
    margin-top: .15rem;
}


/* ---- investor: holdings ---- */

.op-holding {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.op-holding__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.op-holding__head h2 {
    margin: 0 0 .2rem;
    font-size: 1.35rem;
}

.op-holding__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
}

.op-holding__total span {
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.1;
}

.op-holding__total label {
    font-size: .8rem;
    color: var(--op-muted, #64748B);
}

.op-holding__split {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.25rem 0;
}

.op-holding__stat {
    flex: 1 1 140px;
    padding: .9rem 1.1rem;
    border: 1px solid var(--op-border, #E2E8F0);
    border-radius: var(--op-radius, 8px);
    display: flex;
    flex-direction: column;
}

.op-holding__stat span {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.op-holding__stat label {
    font-size: .8rem;
    color: var(--op-muted, #64748B);
    margin-top: .15rem;
}

/* The eligible figure is the one an investor is looking for, so it is the only
   one given colour. Marking every figure would flatten the distinction and
   leave nothing emphasised. */
.op-holding__stat.is-eligible {
    border-color: var(--op-accent, #16A34A);
}

.op-holding__stat.is-eligible span {
    color: var(--op-accent, #16A34A);
}


/* ---- narrow screens ---- */

@media (max-width: 640px) {
    .op-secondary__stats {
        gap: 1.25rem;
    }

    .op-holding__head {
        flex-direction: column;
    }

    /* Left-aligned once stacked: right-aligned under a left-aligned heading
       reads as a mistake rather than as a total. */
    .op-holding__total {
        align-items: flex-start;
    }

    .op-holding__stat {
        flex: 1 1 100%;
    }
}
