/* Agent memory: a switch card, then one card of facts under each resume title, in the agent settings geometry. */
.memory { display: grid; gap: 40px; }

/* the switch card: a title and one line, in the geometry of the fact cards below */
.memory-switch { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px 16px 24px; border-radius: 28px; background: var(--surface-card); }
.memory-switch-copy { display: grid; gap: 4px; }
.memory-switch-title { color: #fff; font-size: 17px; font-weight: 600; line-height: 1.3; }
.memory-note { color: var(--muted); font-size: 15px; line-height: 1.35; }

/* off: the facts stay and can be edited, they just fade */
.memory.is-off .memory-resume { opacity: .45; }

/* same as section headings on the agent tab */
.memory-resume { display: grid; gap: 16px; transition: opacity .2s; }
.memory-resume h2 { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }

.memory-card { padding: 6px 12px 6px 24px; border-radius: 28px; background: var(--surface-card); }
.memory-list { margin: 0; padding: 0; list-style: none; }
.memory-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.memory-list li + li { border-top: 1px solid var(--line); }

/* the text is the field: no frame at rest, a dark well while editing */
.memory-fact { flex: 1; min-width: 0; margin-left: -10px; padding: 8px 10px; border-radius: 12px; color: #f1f1f1; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; cursor: text; outline: none; transition: background .15s; }
.memory-fact:hover { background: var(--surface-card-hover); }
.memory-fact:focus { background: #111; }

/* only while editing: how much of the agent's limit is left */
.memory-count { display: none; flex: none; color: #6b6b6b; font-size: 13px; font-variant-numeric: tabular-nums; }
.memory-list li:focus-within .memory-count { display: block; }

/* forgetting is quiet: a gray cross that lights up on hover */
.memory-forget { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: #6b6b6b; cursor: pointer; transition: background .15s, color .15s; }
.memory-forget svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.memory-forget:disabled { opacity: .45; cursor: default; }
.memory-forget:not(:disabled):hover { background: var(--fill-control); color: #fff; }
.memory-forget:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.memory-empty { margin: 0; padding: 13px 12px 13px 0; color: var(--muted); font-size: 17px; line-height: 1.3; }

.memory-skeleton { gap: 40px; }
.memory-skeleton .skeleton-card { border-radius: 28px; }

@media (max-width: 600px) {
  .memory-switch { padding: 14px 16px 14px 18px; border-radius: 24px; }
  .memory-switch-title, .memory-empty { font-size: 16px; }
  .memory-note { font-size: 14px; }
  .memory-card { padding: 4px 6px 4px 18px; border-radius: 24px; }
  .memory-fact { font-size: 16px; }
}
