html, body { height: 100%; }
body { margin: 0; }

/* Phone width: the top bar drops the e-mail address and shows its buttons as icons, so the row fits the screen. */
@media (max-width: 767.98px) {
    .ss-topbar .rz-button-text,
    .ss-topbar__user {
        display: none;
    }
}

/* Holdings list (HoldingsGrid.razor): the grid on wide screens, one card per holding on a phone. */
.ss-holdings-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ss-holding-card {
    position: relative;
    border: var(--rz-border-normal);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-background-color);
}

.ss-holding-card__link {
    display: block;
    padding: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.ss-holding-card__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ss-holding-card__symbol {
    font-size: 1.125rem;
    font-weight: 600;
}

.ss-holding-card__time {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

.ss-holding-card__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
    margin: 0;
}

.ss-holding-card__fields > div {
    min-width: 0;
}

.ss-holding-card__fields dt {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--rz-text-secondary-color);
}

.ss-holding-card__fields dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Admin view: the recompute button sits over the card's bottom right corner, outside the link. */
.ss-holding-card__actions {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
}

/* Last, so that hiding the cards wins over their display: flex above. */
@media (max-width: 767.98px) {
    .ss-holdings-grid {
        display: none;
    }
}

@media (min-width: 768px) {
    .ss-holdings-cards {
        display: none;
    }
}

/* A grid wider than a phone scrolls sideways, and its "nothing here" message, centred in the full table width,
   would be cut off. Keep the message as wide as the visible part of the grid and in view while the grid scrolls.
   16px is the cell's left and right padding. */
.rz-data-grid-data {
    container-type: inline-size;
}

.rz-data-grid-data td.rz-datatable-emptymessage {
    overflow: visible;
}

.rz-data-grid-data td.rz-datatable-emptymessage > * {
    position: sticky;
    left: 8px;
    width: calc(100cqw - 16px);
    box-sizing: border-box;
}
