/* Decorations are separate from the photo, story ring, upload and lightbox controls. */
[data-cs-avatar-user]{position:relative}
.cs-avatar-fx-layer{position:absolute;left:50%;top:50%;width:calc(100% * var(--cs-fx-scale,1.3));height:calc(100% * var(--cs-fx-scale,1.3));pointer-events:none;z-index:11;display:block}
.cs-avatar-fx-layer>img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;border:0;border-radius:0;pointer-events:none}
.post-avatar:has(.cs-avatar-fx-layer),.comment-avatar:has(.cs-avatar-fx-layer){isolation:isolate}
.cs-avatar-fx-edit{position:absolute;right:0;bottom:-12px;z-index:21;border:1px solid var(--color-base-300,#64748b);background:var(--color-base-100,#17212f);color:var(--color-base-content,#f8fafc);border-radius:999px;padding:5px 10px;font-size:12px;line-height:18px;cursor:pointer}
.cs-avatar-fx-dialog{width:min(640px,calc(100vw - 24px));max-height:90dvh;padding:0;border:1px solid var(--color-base-300,#64748b);border-radius:20px;background:var(--color-base-100,#17212f);color:var(--color-base-content,#f8fafc);box-shadow:0 24px 80px #0006;overflow:auto}
.cs-avatar-fx-dialog::backdrop{background:#0009}
.cs-avatar-fx-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;background:inherit;border-bottom:1px solid var(--color-base-300,#64748b)}
.cs-avatar-fx-toolbar h2{font-size:18px;font-weight:700;margin:0}.cs-avatar-fx-toolbar button{font:inherit;color:inherit;background:transparent;border:1px solid currentColor;border-radius:10px;padding:7px 12px;cursor:pointer}
.cs-avatar-fx-preview{width:112px;height:112px;position:relative;margin:34px auto;border-radius:50%;background-size:cover;background-position:center}
.cs-avatar-fx-help,.cs-avatar-fx-status{margin:12px 20px;text-align:center;font-size:13px;line-height:1.5}
.cs-avatar-fx-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:16px}
.cs-avatar-fx-choice{display:flex;flex-direction:column;align-items:center;gap:18px;min-width:0;padding:20px 4px 10px;border:2px solid transparent;border-radius:14px;color:inherit;background:var(--color-base-200,#223145);font-size:12px;cursor:pointer}
.cs-avatar-fx-choice[aria-pressed=true]{border-color:var(--color-primary,#38bdf8)}
.cs-avatar-fx-choice:focus-visible,.cs-avatar-fx-toolbar button:focus-visible{outline:2px solid var(--color-primary,#38bdf8);outline-offset:3px}
.cs-avatar-fx-thumb{position:relative;width:58px;height:58px;max-width:100%;border-radius:50%;background-size:cover;background-position:center}
.cs-avatar-fx-choice>span:last-child{overflow-wrap:anywhere}
@media(max-width:440px){.cs-avatar-fx-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:12px}.cs-avatar-fx-toolbar{gap:8px;padding:12px}.cs-avatar-fx-toolbar h2{font-size:16px}}

/* Match the demo's circular photo and whole-pixel decoration placement. */
[data-cs-avatar-user].cs-avatar-fx-active{border-radius:50%;corner-shape:round}
[data-cs-avatar-user].cs-avatar-fx-active>img,[data-cs-avatar-user].cs-avatar-fx-active #profile-story-menu,[data-cs-avatar-user].cs-avatar-fx-active #profile-story-menu img{border-radius:50%;corner-shape:round}
