/* ==========================================================================
   Shared by the staff portal and the account page: the headshot editor
   (assets/js/headshot-editor.js), photo buttons, checkboxes and the Sign in
   with Apple button.
   Like styles.css it contains no literal colors.
   ========================================================================== */

.field__hint { font-size: .82rem; color: var(--color-text-muted); margin: .35rem 0 0; }
.photo-picker__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.photo-picker__actions label.btn { cursor: pointer; }
.photo-picker__actions input[type="file"]:focus-visible + label.btn { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.check { display: flex; align-items: flex-start; gap: .7rem; }
.check input[type="checkbox"] { flex: none; width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; accent-color: var(--color-accent-text); }
.check label { display: grid; gap: .15rem; cursor: pointer; }
.check__label { font-weight: 600; }
.check__hint { font-size: .85rem; color: var(--color-text-muted); }
.headshot-field { display: grid; border-radius: var(--radius-lg); }
.headshot-field.is-dropping { outline: 3px dashed var(--color-focus); outline-offset: 4px; }
.headshot__empty {
  display: grid; justify-items: center; gap: .5rem; padding: 1.5rem 1rem; text-align: center;
  border: 1.5px dashed var(--color-border-hover); border-radius: var(--radius-lg); background: var(--color-surface-alt);
}
.headshot__empty p { margin: 0; }
.headshot__empty-mark {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--color-avatar-from), var(--color-avatar-to));
  color: var(--color-avatar-text); font-family: var(--font-serif); font-weight: 700; font-size: 1.8rem;
  border: 2px solid var(--color-avatar-ring);
}
.headshot[hidden], .headshot__empty[hidden] { display: none; }
.headshot { display: grid; gap: 1rem; }
.headshot__stage {
  position: relative; width: 100%; max-width: 22rem; aspect-ratio: 1; justify-self: center;
  overflow: hidden; border-radius: var(--radius-lg); background: var(--headshot-stage-bg);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.headshot__stage.is-dragging { cursor: grabbing; }
.headshot__stage:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.headshot__canvas { display: block; width: 100%; height: 100%; }
/* The crop is the inscribed circle: everything outside it is dimmed. */
.headshot__mask {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 100vmax var(--headshot-mask), inset 0 0 0 2px var(--headshot-ring);
}
.headshot__guides {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .15s ease;
  background:
    linear-gradient(to right, transparent calc(33.333% - .5px), var(--headshot-guide) calc(33.333% - .5px), var(--headshot-guide) calc(33.333% + .5px), transparent calc(33.333% + .5px),
                              transparent calc(66.666% - .5px), var(--headshot-guide) calc(66.666% - .5px), var(--headshot-guide) calc(66.666% + .5px), transparent calc(66.666% + .5px)),
    linear-gradient(to bottom, transparent calc(33.333% - .5px), var(--headshot-guide) calc(33.333% - .5px), var(--headshot-guide) calc(33.333% + .5px), transparent calc(33.333% + .5px),
                               transparent calc(66.666% - .5px), var(--headshot-guide) calc(66.666% - .5px), var(--headshot-guide) calc(66.666% + .5px), transparent calc(66.666% + .5px));
}
.headshot__guides.is-on, .headshot__stage.is-dragging .headshot__guides { opacity: 1; }
.headshot__tools { display: grid; gap: .85rem; }
.headshot__zoom { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: .5rem; align-items: end; }
.headshot__step { min-width: 44px; padding-inline: 0; font-size: 1.1rem; }
.headshot__slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .75rem; align-items: center; }
.headshot__slider label { font-size: .82rem; font-weight: 650; color: var(--color-heading); }
.headshot__slider input[type="range"] { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 28px; accent-color: var(--color-accent-text); }
.headshot__value { grid-column: 2; grid-row: 1; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.headshot__buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.headshot__buttons .btn[aria-pressed="true"] { background: var(--color-pill-new-bg); border-color: var(--color-pill-new-bg); color: var(--color-pill-new-text); }
.headshot__adjust { border: 1px solid var(--color-border-soft); border-radius: var(--radius); padding: .2rem .9rem; }
.headshot__adjust[open] { padding-bottom: .9rem; display: grid; gap: .75rem; }
.headshot__adjust summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: .9rem; }


/* Sign in with Apple: black, white logo and label, per Apple's guidelines. */
.btn--apple {
  background: var(--apple-button-bg); border-color: var(--apple-button-bg); color: var(--apple-button-text);
}
.btn--apple:hover, .btn--apple:focus-visible {
  background: var(--apple-button-bg-hover); border-color: var(--apple-button-bg-hover); color: var(--apple-button-text);
}
.apple-mark { width: 18px; height: 18px; fill: currentColor; }
.google-mark { width: 18px; height: 18px; }
