/**
 * Opt-in common picture-details presentation, extracted from the generic rules
 * in picture-leaders.css and Puzzia's neutral picture-overlays.css (10 Nov 2026
 * snapshot). No Puzzia/Scaria layout, daily, rooms, leaders or economy rules.
 *
 * Include after shell.css and any legacy picture-leaders.css. The latter remains
 * unchanged for old consumers; this stylesheet also works without it.
 * Host parameters: --shell-primary / --shell-on-accent,
 * --shell-secondary / --shell-on-together, --shell-surface / --shell-ink,
 * --shell-muted / --shell-line, --picture-glass-bg / --picture-glass-ink.
 * Tile titles/bar removal stay owned by shell.css; no duplicate title reservation.
 */
.picture-details-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 0 16px;
  color: var(--shell-ink, #24242c);
}
.picture-details-content > * { min-width: 0; max-width: 100%; }
.picture-details-header { display: flex; justify-content: flex-end; margin-bottom: -8px; }
.picture-details-header[hidden] { display: none; }
.picture-details-share {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--shell-surface, #fff);
  color: var(--shell-secondary, #00857f);
  cursor: pointer;
}
.picture-details-share svg { width: 22px; height: 22px; }
.picture-details-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--shell-surface, #fff);
  width: 100%;
  isolation: isolate;
}
.picture-details-hero > img,
.picture-details-hero > canvas,
.picture-details-hero > .picture-details-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.artwork-card-overlays {
  position: absolute;
  inset: 0;
  z-index: 5;
  box-sizing: border-box;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
}
.artwork-overlay {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  border-radius: 18px;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.artwork-variant { grid-column: 1; grid-row: 1; justify-self: start; align-self: start; }
.artwork-status {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  text-align: end;
  background: var(--shell-primary, #007dac);
  color: var(--shell-on-accent, #fff);
}
.artwork-status.is-done { background: var(--shell-secondary, #00857f); color: var(--shell-on-together, #fff); }
.artwork-elapsed { grid-column: 1; grid-row: 3; justify-self: start; align-self: end; font-size: 12px; white-space: nowrap; }
.artwork-pages {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
  align-self: end;
  display: flex;
  gap: 5px;
  padding: 6px;
  border-radius: 12px;
}
.artwork-pages i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; }
.artwork-pages i.is-selected { opacity: 1; }
.artwork-info {
  grid-column: 3;
  grid-row: 3;
  justify-self: end;
  align-self: end;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  pointer-events: auto;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}
.artwork-variant,
.artwork-elapsed,
.artwork-pages,
.artwork-info,
.artwork-status.is-unknown {
  background: var(--picture-glass-bg, rgba(50, 54, 62, .88));
  color: var(--picture-glass-ink, #fff);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .28);
}
.picture-details-title { margin: 0; font-size: 23px; line-height: 1.2; font-weight: 750; overflow-wrap: anywhere; }
.picture-details-metadata { margin: 0; font-size: 13px; color: var(--shell-muted, #73737b); overflow-wrap: anywhere; }
.picture-details-content .picture-details-difficulty { margin-top: -10px; }
.picture-details-variants { display: flex; gap: 8px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.picture-details-variant {
  flex: none;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--shell-line, #dedee4);
  border-radius: 14px;
  background: var(--shell-surface, #fff);
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.picture-details-variant[aria-pressed=true] { background: var(--shell-primary, #007dac); color: var(--shell-on-accent, #fff); border-color: transparent; }
.picture-details-actions { display: flex; flex-direction: column; gap: 10px; }
.picture-details-actions > .shell-button {
  box-sizing: border-box;
  min-height: 50px;
  width: 100%;
  padding: 12px 16px;
  margin: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.picture-details-primary { background: var(--shell-primary, #007dac) !important; color: var(--shell-on-accent, #fff) !important; border: 0 !important; }
.picture-details-together,
.picture-details-global { background: var(--shell-secondary, #00857f) !important; color: var(--shell-on-together, #fff) !important; border: 0 !important; }
.picture-details-timelapse { background: var(--shell-surface, #fff) !important; color: var(--shell-primary, #007dac) !important; border: 1px solid var(--shell-line, #dedee4) !important; }
.picture-details-content button:disabled { cursor: default; opacity: .65; }
.picture-details-content button:focus-visible,
.picture-details-hero:focus-visible,
.artwork-info:focus-visible { outline: 3px solid var(--shell-ink, #24242c); outline-offset: 2px; }
.picture-details-error { margin: 0; overflow-wrap: anywhere; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .artwork-card-overlays { --picture-glass-bg: rgb(50, 54, 62); }
}
@media (prefers-reduced-transparency: reduce) {
  .artwork-card-overlays { --picture-glass-bg: rgb(50, 54, 62); }
}

/* Small card previews stack the page dots above the time/info row. */
.artwork-card-overlays { container-type: inline-size; }
@container (max-width: 240px) {
  .artwork-pages { grid-column: 1 / -1; grid-row: 2; }
  .artwork-elapsed { grid-column: 1 / 3; padding: 6px 7px; font-size: 11px; }
}
