/* Memory (memory.js), in its dialog: what NowPaw keeps about the person, store by store, with how full each is. Rows
   use style.css's .row-button. */

.memory {
    display: grid;
    gap: 12px;
    /* The dialog (style.css's .ask-dialog) is at most 440 px wide with its padding. */
    width: min(400px, calc(100vw - 72px));
}

.memory-hint,
.memory-note {
    margin: 0;
    font-size: 0.8125rem;
}

.memory-note:empty {
    display: none;
}

.memory-shelves {
    display: grid;
    gap: 16px;
}

.memory-shelf {
    display: grid;
    gap: 6px;
}

.memory-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.memory-head h3 {
    margin: 0;
    font-size: 0.9375rem;
}

.memory-used {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

/* How full the store is, drawn as the Tasks window's progress bars (tasks.css). */
.memory-meter {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-2);
}

.memory-meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background-color: var(--accent);
}

.memory-meter.full .memory-meter-fill {
    background-color: var(--danger);
}

.memory-empty {
    margin: 0;
    font-size: 0.8125rem;
}

.memory-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.memory-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}

.memory-row:last-child {
    border-bottom: 0;
}

.memory-text {
    overflow-wrap: anywhere;
    font-size: 0.875rem;
}

.memory-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.memory-ask {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
}
