/* The official server and the partners on the item page: one quiet line directly before the
   Subscriptions section (partners.js, partners-data.js).
   MagmaGuy (11-12): "I want it to be more low-key, and switch between official and partners so
   there's just one low-key line", and "put it before subscriptions".
   Builds on lab.css and content.css. Loaded after content.css. Everything is prefixed `pn-`.
   Nothing here is smaller than 12.5px.

   Low-key means: no box, no heading, grey and off-white text at 12.5 to 14px, the banner at a
   classic banner's size (468 by 60 at most), and nothing in the page's orange or red. The one
   exception is the site's own focus ring, which a keyboard needs to be the same everywhere.

   The line is a strip between two hairlines, like the "Also on itch.io and Patreon" strip at
   the foot of the page. The upper hairline is its own. The lower one is the Subscriptions
   section's, which stood there before. The strip takes over that section's distance from the
   row above it, so the page's rhythm is as it was and the strip adds only its own height.

     over 900px   one line, 102px tall with its hairline: the label (and the dots under
                  it) | the banner, 468 by 60 | the text. The banner stands in the middle of
                  the page from 1030px up. Under that the two columns beside it keep the width
                  their words need, so the banner stands a little to the left (62px at 901px),
                  and it gives way only when the three do not fit.
     to 900px     the banner with a small line over it (the label, and the dots at the right)
                  and one small line under it (the name and the address). 468px at most, in the
                  middle. On a phone it is as wide as the page (358 by 46 at 390px). */

.pn-line { border-top: 1px solid var(--hair); margin-top: 120px; padding: 20px 0; }
/* The band's wrapper follows the line in item.js's page: the hairline over Subscriptions closes
   the strip. */
.pn-line + div > .ct-band { margin-top: 0; }

.pn-line__in { align-items: center; column-gap: 22px; display: grid; grid-template-areas: "label banner text"; grid-template-columns: minmax(max-content, 1fr) minmax(0, 468px) minmax(max-content, 1fr); }
/* With dots: the label over them, the two together as tall as the banner's middle. */
.pn-line.has-dots .pn-line__in { grid-template-areas: "label banner text" "dots banner text"; }
.pn-line__labels { grid-area: label; justify-self: end; text-align: right; }
.pn-line.has-dots .pn-line__labels { align-self: end; }
.pn-dots { align-self: start; display: flex; grid-area: dots; justify-self: end; margin-right: -9px; }
.pn-line__banners { grid-area: banner; min-width: 0; }
.pn-line__texts { grid-area: text; justify-self: start; min-width: 0; }

/* Every entry's piece lies in the same place, and only the one on show is seen. A hidden piece
   takes no Tab stop and is not read out (visibility). The one on show fades out before the
   next fades in, so two labels are never read through each other: 0.4s out, then 0.5s in. */
.pn-stack { display: grid; }
.pn-stack > * { align-self: center; grid-area: 1 / 1; min-width: 0; opacity: 0; transition: opacity .4s ease, visibility 0s linear .4s; visibility: hidden; }
.pn-stack > .is-on { opacity: 1; transition: opacity .5s ease .4s, visibility 0s linear .4s; visibility: visible; }
/* Less motion: the change is at once (lab.css shortens the times but leaves the delays). */
@media (prefers-reduced-motion: reduce) { .pn-stack > *, .pn-stack > .is-on { transition: none; } }

/* The small grey label: "Official server" or "Partner". The facts bar's own label size. */
.pn-label { color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.4; margin: 0; white-space: nowrap; }

/* The dots: 24 by 24px to press, a 6px dot to see. */
.pn-dot { background: none; border: 0; border-radius: 50%; cursor: pointer; flex: none; height: 24px; padding: 0; position: relative; width: 24px; }
.pn-dot::before { background: rgb(255 255 255 / .28); border-radius: 50%; content: ""; height: 6px; left: 9px; position: absolute; top: 9px; transition: background-color .15s; width: 6px; }
.pn-dot:hover::before { background: rgb(255 255 255 / .6); }
.pn-dot[aria-current="true"]::before { background: rgb(255 255 255 / .9); }
.pn-dot:focus-visible { outline-offset: -3px; }

/* A banner's frame: black, as the banners are, with a hairline so its edge reads as meant. */
.pn-line__banner { display: block; text-decoration: none; }
.pn-banner { background: #000; border: 1px solid rgb(255 255 255 / .08); border-radius: 6px; display: block; overflow: hidden; transition: border-color .15s; }
.pn-banner img { display: block; height: 100%; object-fit: cover; width: 100%; }
a.pn-line__banner:hover .pn-banner { border-color: rgb(255 255 255 / .3); }
/* A partner who has a name and no picture yet: the name stands in the banner's place. */
.pn-banner--name { align-items: center; aspect-ratio: 39 / 5; color: var(--wall); display: flex; font-size: 14px; font-weight: 700; justify-content: center; line-height: 1.2; padding: 0 12px; text-align: center; }
a.pn-line__banner:hover .pn-banner--name { color: #fff; }

/* The text beside the banner: the name, a grey line, the address. Three short rows are as tall
   as the banner. */
.pn-line__text { display: grid; row-gap: 1px; }
.pn-line__text p { margin: 0; }
.pn-line__name { color: var(--wall); font-size: 14px; font-weight: 700; line-height: 1.3; }
.pn-line__name a { color: inherit; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .3); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.pn-line__name a:hover { color: #fff; text-decoration-color: rgb(255 255 255 / .7); }
.pn-line__more { color: var(--muted); font-size: 12.5px; line-height: 1.35; max-width: 40ch; }
.pn-line__address { align-items: center; display: flex; gap: 4px; }
/* content.css gives every <code> a box. Here the address is plain small text. */
.pn-line__address code { background: none; border: 0; border-radius: 0; color: var(--wall); font-size: 13px; line-height: 24px; padding: 0; white-space: nowrap; }
/* The Copy button: the guide's icon and its green tick, without the guide's box. 24 by 24px. */
.pn-copy { align-items: center; background: none; border: 0; border-radius: 5px; color: var(--muted); cursor: pointer; display: inline-flex; flex: none; height: 24px; justify-content: center; padding: 0; transition: background-color .15s, color .15s; width: 24px; }
.pn-copy svg { flex: none; height: 15px; width: 15px; }
.pn-copy:hover { background: rgb(255 255 255 / .08); color: #fff; }
.pn-copy:focus-visible { outline-offset: 1px; }
/* Copied: a green tick takes the place of the two sheets, for 1.8 seconds (partners.js). */
.pn-copy__ok, .pn-copy.is-done .pn-copy__icon { display: none; }
.pn-copy.is-done .pn-copy__ok { display: block; }
.pn-copy.is-done { color: var(--ok); }

/* The site's new-tab mark after a name (.ig-out in install.css). */
.pn-out svg { display: inline-block; height: .95em; margin-left: 4px; vertical-align: -.12em; width: .95em; }

@media (max-width: 900px) {
  /* The banner with one small line over it and one under it. The grey line beside the name
     (the tagline, a partner's line of text) is left out: it would be one line more. */
  .pn-line__in, .pn-line.has-dots .pn-line__in { column-gap: 12px; grid-template-areas: "label dots" "banner banner" "text text"; grid-template-columns: minmax(0, 1fr) auto; margin-inline: auto; max-width: 468px; row-gap: 6px; }
  .pn-line__labels, .pn-line.has-dots .pn-line__labels { align-self: center; justify-self: start; text-align: left; }
  .pn-dots { align-self: center; margin: -3px -9px -3px 0; }
  .pn-line__text { align-items: center; column-gap: 12px; display: flex; flex-wrap: wrap; row-gap: 0; }
  .pn-line__more { display: none; }
}
@media (max-width: 760px) {
  /* As the Subscriptions section's own distance at this width (content.css). */
  .pn-line { margin-top: 88px; padding: 18px 0; }
}
