/* Photo avatars, the square image crop and the file drop target. The demo has no photo or upload specimen: these reuse its avatar
   circles (kit.css `.me-avatar`, app.css `.avatar`), the chat bar's dashed drop target (app.css `.cmp-drop`) and the dialog scrim. */
.av:has(> .avatar-photo) { position: relative; }
.avatar-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.me-avatar.sm { width: 32px; height: 32px; font-size: 11.5px; }
.crop-preview { background-repeat: no-repeat; background-color: var(--sunken); }

.crop { display: grid; gap: 8px; justify-items: center; min-width: 0; }
.crop-stage {
  position: relative; width: var(--crop-size, 240px); max-width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-md);
  background: var(--sunken); cursor: grab; touch-action: none; user-select: none; outline: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.crop-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-img:not([src]) { display: none; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(4, 10, 27, 0.5); outline: 1px solid rgba(255, 255, 255, 0.7); outline-offset: -1px; pointer-events: none; }
.crop .fhint { max-width: var(--crop-size, 240px); text-align: center; }
.crop-zoom { display: flex; align-items: center; gap: 8px; width: min(var(--crop-size, 240px), 100%); color: var(--ink-3); }
.crop-zoom .range-row { flex: 1; min-width: 0; }

.file-drop {
  position: relative; display: grid; justify-items: center; gap: 5px; padding: 22px 16px; border-radius: var(--r-md);
  border: 2px dashed var(--line-strong); background: var(--sunken); color: var(--ink-2); font-size: 13px; text-align: center; cursor: pointer;
}
.file-drop > .icon { color: var(--ink-3); }
.file-drop strong { color: var(--ink); font-weight: 600; }
.file-drop .muted { font-size: 12px; }
.file-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop:hover { border-color: var(--accent); }
.file-drop.over { border-color: var(--accent); background: color-mix(in oklab, var(--accent-soft) 92%, transparent); color: var(--accent); }
.file-drop.over > .icon, .file-drop.over strong { color: var(--accent); }
.file-drop:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.file-drop.disabled { opacity: 0.55; cursor: not-allowed; }
.file-drop.disabled input[type="file"] { cursor: not-allowed; }
