/* ---- V3: secure notes, cards and addresses in the Vault — the type filter, their icons and rows,
   and the panel's two-column fields. Colours come from the shared Quiet Glass variables (light and dark). */

/* the type filter under the search box: All · Logins · Notes · Cards · Addresses · Documents */
.kind-filter { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.kind-filter::-webkit-scrollbar { display: none; }
.kind-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.kind-chip small { color: var(--muted); font-size: 12px; font-weight: 500; opacity: .8; }
.kind-chip:hover:not(:disabled) { color: var(--text); border-color: color-mix(in srgb, var(--text) 25%, var(--line)); }
.kind-chip.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.kind-chip.active small { color: var(--on-accent); }
.kind-chip:disabled { opacity: .45; cursor: default; }
.kind-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the icon where a login shows its letter; a card shows its brand as a small text badge */
.avatar.kind-icon { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.avatar.kind-icon svg { width: 18px; height: 18px; }
.avatar.kind-icon.brand, #items-table .avatar.kind-icon.brand { width: 40px; height: 28px; margin: 6px 0; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--text); font-size: 9px; font-weight: 800; letter-spacing: .3px; }
.kind-flag { display: inline-block; height: 18px; padding: 0 6px; border-radius: 5px; background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); font-size: 10px; font-weight: 700; line-height: 18px; letter-spacing: .3px; text-transform: uppercase; vertical-align: 1px; }

/* the panel: fields in two columns where they're short */
#kind-panel { width: min(560px, calc(100vw - 32px)); }
.kind-fields { display: flex; flex-wrap: wrap; gap: 16px 12px; }
.kind-fields > .field { flex: 1 1 100%; min-width: 0; }
.kind-fields > .field.half { flex: 1 1 calc(50% - 6px); }
.kind-fields > .field.tall textarea { min-height: 220px; }
.kind-expiry { display: flex; align-items: center; gap: 8px; }
.kind-expiry select { flex: 1; min-height: 44px; }
.kind-fields select, #kind-panel select { min-height: 44px; }
.kind-brand { margin-left: 8px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); font-size: 10px; font-weight: 800; letter-spacing: .4px; line-height: 16px; }
.kind-brand[hidden] { display: none; }
.kind-hint { display: block; min-height: 0; margin-top: 4px; color: var(--danger); font-size: 12px; line-height: 16px; }
.kind-hint:empty { display: none; }

@media (max-width: 760px) {
  .kind-chip { min-height: 40px; }
  .kind-fields > .field.half { flex-basis: 100%; }
  #kind-panel .panel-foot {
    position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px;
    margin: auto -16px calc(-24px - env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line); background: var(--surface);
  }
  #kind-panel .panel-foot .btn.primary { flex: 1 1 100%; order: 1; margin-left: 0; }
  #kind-panel .panel-foot .btn:not(.primary) { flex: 1 1 0; }
  #kind-panel .panel-foot .btn[hidden] { display: none; }
}
.kind-chip.active span, .kind-chip.active small { color: var(--on-accent); }
/* a typed security code shows as dots, like a password */
input.conceal:not(:placeholder-shown) { -webkit-text-security: disc; }
