/* Copy-specific grading certificate controls, including narrow phone dialogs. */
.slab-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.slab-heading-row h4 { margin: 0; font-size: 17px; font-weight: 600; }
.slab-graded-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; user-select: none; }
.slab-graded-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.slab-editor-details[hidden] { display: none !important; }
.slab-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.slab-fields .field { min-width: 0; }
body.site .slab-fields input,body.site .slab-fields .custom-select-trigger { min-height: 44px; border-color: var(--muted); }
body.site .slab-fields .custom-select-option { min-height: 44px; }
body.site .slab-lookup .ghost { min-height: 44px; }
.slab-error { color: var(--danger); font-size: 13px; margin: 8px 0; }
.slab-error:empty { display: none; }
.slab-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.slab-link { min-height: 40px; display: inline-flex; align-items: center; text-decoration: underline; }
.slab-cert { color: var(--text); overflow-wrap: anywhere; user-select: text; }
.slab-help { display: block; width: 100%; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 8px; }
body.site .preview-topbar .slab-lookup { font-size: 13px; flex-direction: row; gap: 8px; }
body.site .preview-topbar .slab-cert { display: inline; min-width: 0; max-width: 100%; }
.preview-backdrop:has(.slab-lookup) .preview-admin-actions { flex-shrink: 0; }
/* Certificate controls change the header height; fit the card to the remaining stage. */
.preview-backdrop:has(.slab-lookup) .preview-stage { container-type: size; }
.preview-backdrop:has(.slab-lookup) .preview-card { width: min(72vw,calc(80cqh * .72),520px); }
@media (max-width: 700px) {
  .slab-fields { grid-template-columns: minmax(0,1fr); }
}
/* Preview: the same button look as the Market link in the edit dialog, then grade and certificate beside it. */
.slab-link { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; box-sizing: border-box; text-decoration: none; font-size: 13px; }
.slab-link .btn-ico { width: 15px; height: 15px; }
.slab-summary { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; }
.slab-summary strong { color: var(--text); font-weight: 600; }
.slab-summary .slab-cert { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Slabbed copies sit in the slab-case artwork (padded to the pocket's .72 ratio); the
   insets below are measured from that image: card window and label strip. */
:root { --slab-ink: #14171c; }
body.site .spread .slot.slabbed { container-type: inline-size; background: transparent !important; box-shadow: none !important; }
.slot.slabbed img { position: absolute; left: 10.5%; top: 15.5%; width: 79.1%; height: 79.4%; border-radius: 4px; }
.slab-case { position: absolute; inset: 0; z-index: 1; background: url("/assets/slab-case.webp") center / 100% 100% no-repeat; pointer-events: none; }
.slab-label {
  position: absolute; left: 10.5%; right: 10.5%; top: 4.4%; height: 8.2%; padding: .5cqw 3cqw;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 3cqw;
  color: var(--slab-ink); box-sizing: border-box; overflow: hidden; border-radius: 2px;
  background: #ffffff;
}
/* PSA red border specifically for PSA slabs */
.slab-label.is-psa {
  border: 1.5px solid #d32f2f;
  box-shadow: inset 0 0 0 0.5px rgba(211, 47, 47, 0.25);
}
.slab-label.is-psa .slab-provider-name {
  color: #d32f2f;
  font-weight: 900;
  letter-spacing: .02em;
}

/* Other grading services: no red border; white text with black stroke */
.slab-label:not(.is-psa) {
  border: 1px solid rgba(0, 0, 0, 0.35);
}
.slab-label:not(.is-psa) .slab-provider-name {
  color: #ffffff;
  -webkit-text-stroke: 1.1px #000000;
  paint-order: stroke fill;
  font-weight: 900;
  letter-spacing: .03em;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.slab-brand-group {
  display: inline-flex;
  align-items: baseline;
  gap: 2cqw;
  flex: none;
  line-height: 1;
}
.slab-provider-name {
  font-size: 8cqw;
  line-height: 1;
}
.slab-grade-val {
  font-size: 8cqw;
  font-weight: 900;
  color: #000000;
  line-height: 1;
}

/* Right side: cert number on top, aesthetic barcode underneath, both resting low in the strip */
.slab-meta-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  align-self: stretch;
  gap: .8cqw;
  padding-bottom: .6cqw;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1;
}
.slab-cert-code {
  font-size: 5.5cqw;
  font-weight: 700;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #14171c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.slab-barcode {
  display: block;
  width: 40cqw;
  max-width: 100%;
  height: 2.4cqw;
  color: #14171c;
}

/* Below this width the strip is shorter than text: keep the blank label, details stay in hover and preview. */
@container (max-width: 89px) { .slab-label { display: none; } }
.slot.drag-source .slab-case { visibility: hidden; }
/* The carried slab: case and art at the pocket's insets; the shadow follows the case outline. */
.drag-lift.is-slab { container-type: inline-size; overflow: visible; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 10px 12px rgba(6,12,28,.45)); }
.drag-lift.is-slab img { position: absolute; left: 10.5%; top: 15.5%; width: 79.1%; height: 79.4%; border-radius: 4px; }
/* The preview title styles every <strong>/<span> in its header; keep the slab summary at body size. */
body.site .preview-topbar .slab-summary :is(strong, span) { font-size: 13px; line-height: 1.3; letter-spacing: normal; max-width: none; }
body.site .preview-topbar .slab-summary strong { font-weight: 600; color: var(--text); }
/* Preview: the same case on both faces (label on the front only); insets match the pocket artwork. */
.preview-card.slabbed .preview-face { container-type: inline-size; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.preview-card.slabbed .preview-face img { position: absolute; left: 10.5%; top: 15.5%; width: 79.1%; height: 79.4%; border-radius: 3% / 2.2%; }
.preview-card .slab-label {
  padding: 0.8cqw 2cqw;
  gap: 1.5cqw;
}
.preview-card .slab-label.is-psa {
  border-width: 2.5px;
}
.preview-card .slab-label:not(.is-psa) {
  border-width: 1.5px;
}
.preview-card .slab-brand-group {
  gap: 1.2cqw;
}
.preview-card .slab-provider-name {
  font-size: 7.5cqw;
}
.preview-card .slab-label:not(.is-psa) .slab-provider-name {
  -webkit-text-stroke-width: 2px;
}
.preview-card .slab-grade-val {
  font-size: 7.5cqw;
}
.preview-card .slab-cert-code {
  font-size: 3cqw;
}
.preview-card .slab-barcode {
  min-width: 80px;
  max-width: 130px;
  height: 1.5cqw;
}

/* Acrylic graded slab sheen: crystal-clear plastic glare instead of card foil shimmer.
   It stays inside the case (the artwork has 3.7% clear sides) and sweeps by background
   position, so no lighter rectangle shows around the slab. */
.preview-card.slabbed .preview-face:after {
  inset: 0 3.7%;
  background: linear-gradient(
    122deg,
    transparent 18%,
    rgba(255, 255, 255, 0.03) 30%,
    rgba(255, 255, 255, 0.22) 42%,
    rgba(255, 255, 255, 0.58) 45%,
    rgba(255, 255, 255, 0.1) 47%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.03) 53%,
    transparent 66%
  );
  background-size: 300% 100%;
  background-position: 50% 0;
  opacity: 0.45;
  mix-blend-mode: screen;
  border-radius: 6% / 4.3%;
}
/* The face box includes the clear sides, so its drag shadow would draw a square around the case. */
.preview-card.slabbed.dragging .preview-face { box-shadow: none; }
.preview-card.slabbed.dragging .preview-face:after {
  opacity: 0.85;
  animation: slabAcrylicGlare 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
@keyframes slabAcrylicGlare {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
