/* ==========================================================================
   STADIUM PHOTO CREDIT — the one owner of how a credit looks (2026-11-14)
   ==========================================================================

   Markup comes from /stadium-credit.js; this file is the only place the
   credit's type, plate and per-surface placement live. Adding a surface means
   adding one placement rule here, never another string.

   Contrast: the plate is rgba(4, 8, 14, .86). Over the worst-case photograph
   (pure white) the plate resolves to #272a30 (relative luminance 0.026) and
   #F2E8D4 cream is 0.817, so the credit is 11.4:1 — above 4.5:1 for normal
   text and above 7:1 for AAA. Over a dark photograph it only improves. That
   is why every credit that sits on a photograph carries the plate; the two
   credits that sit on a solid panel (owner banner copy, page footers) keep it
   for the same reason the plate exists on the photo — one look, not two.
   ========================================================================== */

/* a.pd-photo-credit is deliberate: the foundation sheet's `.pd-shell a`
   sets a blue link colour at the same specificity, and this sheet loads
   last. Without it every credit inside the shell renders blue. */
.pd-photo-credit,
a.pd-photo-credit {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(4, 8, 14, .86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
  color: #f2e8d4;
  font-family: var(--pd-font-mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

a.pd-photo-credit:hover,
a.pd-photo-credit:focus-visible {
  background: rgba(4, 8, 14, .97);
  color: #fff;
  text-decoration: underline;
}

a.pd-photo-credit:focus-visible {
  outline: 2px solid #f0d487;
  outline-offset: 2px;
}

/* ==========================================================================
   THE OWNER DESK IS FINE PRINT, NOT A BADGE (2026-11-17)

   The commissioner, on the desk: "wtf did you do with the 'adapted' shit in
   the owner desk. That looks so awful." He is reacting to the plate: 8.5px
   bold mono on a 4px-radius black chip, sitting under the banner's own action
   buttons and above the Press Room tile's headline, reads as a second, broken
   button. The notice is not optional — the CC BY-SA photographs on this site
   are adapted, and the string is one string for all 32 clubs — so it is
   demoted, not removed: no plate, no radius, no padding, 7.5px, and a text
   shadow in place of the box for the placements that sit on a photograph.
   Placement is unchanged except the cockpit tile, which becomes a caption at
   the bottom of the tile instead of a label over its headline. The full
   string, the author, the licence and the word ADAPTED still render, and the
   credit is still a link to the Commons file page.
   ========================================================================== */
#owner-desk .pd-photo-credit {
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: rgba(244, 235, 221, .9);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .055em;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(4, 8, 14, .92);
}

#owner-desk a.pd-photo-credit:hover,
#owner-desk a.pd-photo-credit:focus-visible {
  background: none;
  color: #fff;
  text-decoration: underline;
}

#owner-desk a.pd-photo-credit:focus-visible {
  outline: 2px solid #f0d487;
  outline-offset: 3px;
}

/* ---------- aggregate credits for many photographs ----------

   Used where a per-photo line cannot fit: the Club Wall's 32 slabs are ~148px
   tall and a full `PHOTO:` line is ~330px at 8px. One named list beats 32
   clipped strings. `inherit` is deliberate: the wall room is light-themed and
   the Cast band is dark, and both must show a legible summary. */

.pd-credit-panel {
  margin-top: 12px;
  padding: 8px 2px 2px;
  border-top: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  color: inherit;
  font-family: var(--pd-font-mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
  font-size: 10px;
  line-height: 1.5;
}

.pd-credit-panel > summary {
  cursor: pointer;
  color: inherit;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  list-style-position: inside;
  opacity: .82;
}

.pd-credit-panel > summary:hover { opacity: 1; }

.pd-credit-panel > summary:focus-visible {
  outline: 2px solid #b98a2f;
  outline-offset: 2px;
}

.pd-credit-panel ul {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.pd-credit-panel li { margin: 0; opacity: .78; }
.pd-credit-panel li b { font-weight: 800; opacity: .95; }
.pd-credit-panel a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.pd-credit-panel a:hover { opacity: 1; }

/* ==========================================================================
   Placement — one block per surface. Everything above is shared.
   ========================================================================== */

/* 1. Owner team banner (app.js ownerTeamBanner). The photo is a 26%-opacity
      backdrop on the right; the copy column is solid dark team gradient. The
      credit rides under the quick actions instead of in the photo so it can
      wrap on a phone without covering the banner's facts. */
#owner-desk .owner-team-banner-copy .pd-photo-credit {
  justify-self: start;
  margin-top: 2px;
  text-align: left;
}

/* 2. Owner team page hero (app.js ownerTeamOverview). Bottom-right, over the
      photograph, plate carries the contrast. */
#owner-desk .owner-team-hero .pd-photo-credit {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 28px);
  text-align: right;
}

/* 3. Press Studio landing background (app.js ownerDeskPressStudio). The
      credit sits at the bottom-right of the hero head, over the dusk field,
      and only while the landing (data-ps-screen="doors") is on screen. */
#owner-desk .press-studio .ps-head .pd-photo-credit {
  position: absolute;
  right: 0;
  bottom: 4px;
  z-index: 2;
  text-align: right;
}

/* 4. Home storyline cards (home-storylines.js storyCard). Top-left of the
      active card, opposite the team mark; the card itself is an <a>, so the
      credit is a <span>. */
.m27-home .m27-storyline .pd-photo-credit {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 3;
  max-width: calc(100% - 110px);
  font-size: 8.5px;
}

/* 5. New Era home hero layer (newera.js heroMarkup). Bottom-right above the
      stage band. */
.ne-hero .pd-photo-credit {
  position: absolute;
  right: clamp(14px, 3vw, 38px);
  bottom: clamp(86px, 10vh, 110px);
  z-index: 3;
  max-width: calc(100% - 28px);
  text-align: right;
}

/* 6. New Era Cast band (newera.js castMarkup). One named panel under the
      rail; the cards are one-third of a phone wide, so a per-card credit
      would be clipped. */
.ne-band .pd-credit-panel { margin-top: 10px; }

/* 7. New Era Club Wall room (newera.js clubWallMarkup). 32 four-up slabs at
      148px tall cannot hold a legible per-slab line; the wall carries the
      named list. */
.ne-wall + .pd-credit-panel { margin-top: 14px; }

/* 8. Press Room hero (app.js owner-fo-press) and 9. owner cockpit tile
      (app.js ownerCockpitPressTile) were already credited in the short form
      "Photo: author · licence". They now call the shared helper, so their
      string is the canonical one; these rules make the longer string wrap
      inside the existing tile instead of ellipsising a licence away. */
#owner-desk .owner-fo-press .pd-photo-credit {
  position: absolute;
  right: 12px;
  bottom: 8px;
  z-index: 3;
  max-width: calc(100% - 24px);
  text-align: right;
}

/* 9. The cockpit press tile: a caption under the CTA, not a label over the
      headline. It is the last item in the tile's flex column. */
#owner-desk .owner-cockpit-tile.is-press .pd-photo-credit {
  position: relative;
  z-index: 4;
  order: 2;
  align-self: stretch;
  max-width: none;
  margin: 10px 12px 9px;
  text-align: left;
}

@media (max-width: 700px) {
  .pd-photo-credit { font-size: 8.5px; }
  .m27-home .m27-storyline .pd-photo-credit { max-width: calc(100% - 96px); }
  /* The owner desk stays fine print on a phone, one notch smaller. */
  #owner-desk .pd-photo-credit { font-size: 7px; }
  #owner-desk .owner-team-hero .pd-photo-credit { right: 8px; bottom: 8px; }
  /* The Press Studio deck runs to the full phone width; an absolute credit
     clipped its last line. Drop into flow under the deck instead. */
  #owner-desk .press-studio .ps-head .pd-photo-credit {
    position: static;
    display: block;
    margin-top: 10px;
    text-align: left;
  }
}
