/* ==========================================================================
   D08 — Jonas Reyes, client proofing (demos/jonas-reyes/proofing.html)
   Gallery preset. Password gate → photo proofing (choose 20 of 64,
   compare, approve) and design proof with pinned notes.
   ========================================================================== */

/* ---- Header ------------------------------------------------------------- */
.proof-header {
  z-index: 30;
}

.proof-header__inner {
  gap: 12px 24px;
}

.proof-header__id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
}

.proof-header__brand {
  font-family: var(--f-display);
  font-weight: var(--d-weight);
  text-transform: var(--d-case);
  letter-spacing: var(--d-track);
  font-size: 22px;
}

.proof-header__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.proof-header__deadline {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink);
}

/* Photo / design mode tabs */
.proof-tabs {
  display: flex;
  border: 1px solid var(--ink);
}

.proof-tabs__tab {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  cursor: pointer;
}

.proof-tabs__tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--canvas);
}

/* ---- Main --------------------------------------------------------------- */
.proof-main {
  padding-top: clamp(32px, 5vw, 64px);
}

/* Form field (label above control) */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 15px;
  font-weight: 500;
}

.field__control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}

/* ---- Password gate ------------------------------------------------------ */
.gate {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 480px;
  margin: clamp(40px, 8vw, 120px) auto;
}

.gate__title {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
}

.gate__error {
  display: flex;
  gap: 8px;
  font-size: 15px;
  color: var(--error);
}

.gate__error-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--error);
  font-size: 12px;
}

.gate__button {
  justify-content: center;
}

.gate__hint {
  font-size: 14px;
  color: var(--muted);
}

/* ---- Photo proofing: header & selection meter --------------------------- */
.selection-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: end;
  gap: 20px 56px;
}

.selection-head__session {
  margin-bottom: 10px;
}

.selection-head__title {
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1;
}

.selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selection__count {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 13px;
}

.selection__tally {
  font-variant-numeric: tabular-nums;
}

.selection__bar {
  height: 6px;
  background: var(--line);
}

.selection__fill {
  width: var(--w, 0%);
  height: 100%;
  background: var(--ink);
}

.selection__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Compact buttons in the proofing toolbar */
.proof-btn {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}

.proof-btn--primary {
  padding: 8px 14px;
}

/* Disabled approve keeps its colour, just fades */
.proof-btn--primary:disabled {
  background: var(--accent);
  color: var(--on-accent);
  opacity: .4;
}

/* ---- Notices ------------------------------------------------------------ */
.notice {
  margin-top: 20px;
  padding: 12px 16px;
  font-size: 15px;
}

.notice--warning {
  border: 1px solid var(--warning);
  background: var(--warning-bg);
}

.notice--warning b {
  color: var(--warning);
}

/* Approved round */
.approved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--success);
  background: var(--success-bg);
}

.approved__stamp {
  font-size: 14px;
  animation: proofStamp 380ms cubic-bezier(.2, 1.4, .4, 1) both;
}

.approved__text {
  flex: 1;
  min-width: 220px;
}

.approved__title {
  font-weight: 600;
  color: var(--success);
}

.approved__sub {
  font-size: 15px;
}

.approved__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Toggle chip (download size) */
.chip {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--canvas);
}

/* ---- Compare ------------------------------------------------------------ */
.compare {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.compare__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.compare__title {
  font-weight: 600;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.compare__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.compare__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare__image {
  aspect-ratio: 4/5;
  background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--ph-stripe) 10px 11px);
  filter: var(--img-filter);
}

/* ---- Contact sheet ------------------------------------------------------ */
.frames {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 36px 24px;
  margin-top: 36px;
}

.frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.frame__pick {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  padding: 10px;
  border: 0;
  background: var(--surface);
  cursor: pointer;
}

.frame__image {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--ph-stripe) 10px 11px);
  filter: var(--img-filter);
}

.frame__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 12px;
}

.frame__state {
  color: var(--accent-text);
}

.frame__comment {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

/* ---- Design proof & pins ------------------------------------------------ */
.design-proof {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.design-proof__main {
  grid-column: 1 / span 8;
  min-width: 0;
}

.design-proof__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 9 / span 4;
  min-width: 0;
}

.design-proof__notes {
  display: contents;
}

.design-proof__canvas {
  position: relative;
  aspect-ratio: 4/3;
  background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--ph-stripe) 10px 11px);
  filter: var(--img-filter);
  cursor: crosshair;
}

.design-proof__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
}

.design-proof__approve {
  justify-content: center;
  margin-top: 8px;
}

/* Numbered pin on the proof (position via --x / --y) */
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-mono);
  font-size: 12px;
  box-shadow: 0 0 0 3px var(--canvas);
}

.pin-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pin-note__no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-mono);
  font-size: 12px;
}

.pin-note__input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

/* ---- Footer ------------------------------------------------------------- */
.proof-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
