/* PhiExam · the profile photo (photo.js): the avatar's camera badge, the menu's big photo, the square crop. */

/* the profile's avatar, when photos are on: a button with a small camera badge */
button.pf-avatar { position: relative; display: block; background: none; font: inherit; color: inherit; cursor: pointer; }
button.pf-avatar:focus-visible { outline: 3px solid var(--hero-accent); outline-offset: 3px; }
/* (.pf-avatar > .pf-cam: stronger than profile.css's .pf-avatar > span, the initials' circle) */
.pf-avatar > .pf-cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--hero-accent); color: #10162A; box-shadow: 0 0 0 3px var(--hero-1); transition: transform .15s ease; }
button.pf-avatar:hover > .pf-cam { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) { .pf-avatar > .pf-cam { transition: none; } }

/* the menu's sheet: the photo as everyone sees it */
.ph-menu { display: flex; justify-content: center; padding: 8px 0 4px; }
.ph-big { width: 144px; height: 144px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 40px; font-weight: 800; }

/* the crop: a square frame, the round part lit */
.ph-crop { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 4px; }
.ph-frame { position: relative; width: min(100%, 320px); aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #0B0F1A;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ph-frame.held { cursor: grabbing; }
.ph-frame:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.ph-frame img { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; -webkit-user-drag: none; }
/* outside the circle is dimmed: the avatars are round */
.ph-frame::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 200px rgba(11, 15, 26, .55); border: 2px solid rgba(255, 255, 255, .9); }
.ph-frame.busy { opacity: .7; }
.ph-zoom-row { display: flex; align-items: center; gap: 8px; width: min(100%, 320px); }
.ph-zoom { flex: 1; min-width: 0; accent-color: var(--brand); height: 32px; }
.ph-hint { color: var(--muted); font-size: 13px; line-height: 20px; text-align: center; }
.ph-msg { width: min(100%, 320px); padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad-ink); font-size: 14px; line-height: 21px; }
.ph-save { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ph-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor;
  animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ph-spin { animation-duration: 2.4s; } }
