/* Individual coin inventory cards use the existing register, dialog and control tokens. */
.record-coin-heading {
  --record-thumbnail-width: clamp(30px, 8vw, 42px);
  position: relative;
  padding-inline-start: calc(2 * var(--record-thumbnail-width) + 12px);
}
.record-coin-title { display: grid; gap: 4px; min-width: 0; }
.record-coin-title .record-badges { margin-top: 0; }
.record-thumbnails {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: grid;
  grid-template-columns: repeat(2, var(--record-thumbnail-width));
  grid-template-rows: minmax(0, 1fr);
  gap: 4px;
  min-height: 0;
}
.record-thumbnail { display: grid; place-items: center; min-height: 0; overflow: hidden; }
.record-thumbnail img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.record-reference-thumbnail { position: relative; }
.record-reference-thumbnail::after {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 0;
  padding: 1px 3px;
  background: var(--bg);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  content: 'Ref';
}
.record-thumbnail-credits { color: var(--muted); font-size: .72em; }
.record-thumbnail-credits:not(:has(> :not(:empty))) { display: none; }
.coin-reference-credit { display: block; margin-block-start: 2px; }
.record-coin-illustration {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 74%;
  max-width: 220px;
  border-radius: 50%;
  border: 2px solid #777b78;
  background: radial-gradient(circle at 35% 30%, #e1e2dc, #a3a6a0 63%, #7d817b);
  color: #3c413f;
  font: 600 clamp(22px, 5vw, 52px)/1 system-ui, sans-serif;
}
.record-thumbnail .record-coin-illustration { width: 85%; font-size: 14px; }
.record-photo-frame { position: relative; }
.record-photos figure > button, .record-photo-frame > button:first-child { display: grid; place-items: center; }
.record-photo-frame > button.record-photo-badge {
  position: absolute;
  inset-inline-end: 3px;
  inset-block-end: 3px;
  display: grid;
  place-items: end;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: auto;
  padding: 3px;
  background: transparent;
}
.record-photo-badge span {
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--gold);
  color: var(--bg);
  font-size: 12px;
}
.record-photo-frame > button.record-photo-reset {
  inset-inline-start: 3px;
  inset-inline-end: auto;
  place-items: end start;
}
.record-photo-reset span { background: #8b3f4a; color: #fff2f3; }
.record-photo-badge[aria-disabled='true'] { opacity: .65; }
.record-fields input { width: 100%; min-width: 0; }
.record-header { padding-inline-end: 84px; }
.record-menu { position: absolute; inset-block-start: 0; inset-inline-end: 44px; }
.record-menu .menu-trigger { width: 44px; height: 44px; min-height: 44px; padding: 0; background: transparent; }
.inventory-record > .record-measurements[hidden] { display: none; }
.record-photo-viewer { width: min(440px, calc(100% - 24px)); }
.record-photo-viewer figure { display: grid; justify-items: center; gap: 8px; margin: 0; }
.record-photo-viewer figure > img { display: block; max-height: 68dvh; object-fit: contain; }

.record-lot-heading { padding-inline-start: calc(var(--record-thumbnail-width) + 8px); }
.record-lot-heading .record-thumbnails { grid-template-columns: var(--record-thumbnail-width); }
.sold-asset-record .record-header { padding-inline-end: 44px; }
.record-restore { justify-self: start; }
.record-fields > :has(> .inventory-barcode) { grid-column: 1 / -1; }
.inventory-barcode { display: grid; justify-items: start; gap: 4px; }
.inventory-barcode svg {
  display: block;
  max-width: 100%;
  height: auto;
  background: white;
  shape-rendering: crispEdges;
}
.coin-photo-pair-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.coin-photo-pair-toolbar button { min-height: 44px; }
.coin-photo-pair-controls {
  display: grid;
  gap: 10px;
  margin-block-end: 12px;
  min-inline-size: 0;
}
.coin-photo-pair-controls > label {
  inline-size: min(100%, 20rem);
  min-inline-size: 0;
}
.coin-photo-pair-controls > label :is(select, .combo-control) {
  inline-size: 100%;
  min-block-size: 44px;
}
.coin-photo-pair-controls :disabled { cursor: default; }
@media (max-width: 480px) {
  .coin-photo-pair-controls > label { inline-size: 100%; }
  .coin-photo-pair-controls .coin-photo-pair-toolbar > button { flex: 1 1 8rem; }
}
.record-photo-pair-select { margin-block-end: 8px; }
.record-photos-full-frame .record-photo-frame > button:first-child {
  aspect-ratio: auto;
  min-height: 48px;
  width: 100%;
  padding: 0;
}
.record-photos-full-frame .record-photo-frame img {
  width: 100%;
  max-height: 320px;
  height: auto;
  object-fit: contain;
}
.record-photo-full-frame-viewer { width: min(900px, calc(100% - 24px)); }
/* Manual coin entry uses the same paired image layout as the inventory. */
.manual-coin-fields {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px;
}
.manual-coin-fields:not([hidden]), .manual-coin-composition {
  display: grid;
  gap: 12px;
}
.manual-coin-fields h3, .manual-coin-fields p { margin: 0; }
.manual-coin-element { margin-bottom: 8px; }
.manual-coin-preview { display: grid; place-items: center; }
.manual-coin-photo-actions { display: grid; gap: 6px; }
.manual-coin-photo-actions button { width: 100%; }
