/* The one-pager. Loaded by the share row. On paper (and on screen with ?imprimir=1) the site
   chrome goes away and what stays is the title, the cards or the body, and every source with its
   address written out. The print view is the same page: no script, no second template. */

.compartir-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; list-style: none; margin: 0; padding: 0; }
.compartir-row > li { margin: 0; }
.compartir-wa { display: inline-flex; align-items: center; gap: 0.5rem; background: #0E6B4F; color: #fff; min-height: 48px; }
.compartir-imprimir { min-height: 48px; display: inline-flex; align-items: center; padding: 0 1rem; border: 1px solid currentColor; border-radius: 0.5rem; font-weight: 700; text-decoration: none; }
.compartir-copy summary { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1rem; cursor: pointer; border: 1px solid currentColor; border-radius: 0.5rem; font-weight: 700; }
.compartir-copy[open] { flex-basis: 100%; }
.compartir-copy__label { display: block; margin: 0.75rem 0 0.25rem; font-size: 0.95rem; }
.compartir-copy input { width: min(100%, 36rem); }
.compartir-hint { margin-top: 0.75rem; }
.compartir-printfoot { display: none; }

@media print {
  /* The kit's recovery-code sheet hides `body *` on every page it styles (members.css), which
     prints any other page blank. Only the content comes back (not every element the kit hides
     on purpose, such as menus and tooltips). This stylesheet loads only on printable pages. */
  html body main, html body main *, html body .compartir-printfoot { visibility: visible !important; }
  .pk-skip, .pk-header, .pk-footer, .pk-top, .pk-rail, .pk-actionbar, .pk-crumbs, .compartir-share,
  .pk-ad, [class*="journey"], .pk-chips, .compartir-noprint { display: none !important; }
  .compartir-printfoot { display: block; margin-top: 1.5rem; padding-top: 0.5rem; border-top: 1px solid #000; font-size: 11pt; }
  body { background: #fff !important; color: #000 !important; font-size: 11.5pt; }
  .pk-page { display: block !important; max-width: none !important; padding: 0 !important; }
  .pk-main { max-width: none !important; padding: 0 !important; }
  .pk-section, .pk-card, .pk-takeaways, blockquote { break-inside: avoid; box-shadow: none !important; }
  .pk-card { border: 1px solid #000 !important; background: #fff !important; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; font-weight: 400; overflow-wrap: anywhere; word-break: break-all; }
  main a { color: #000 !important; text-decoration: underline; }
  /* The source list already writes each address as the link text; printing it again would double it. */
  #how-we-reported a::after { content: none !important; }
  details > :not(summary) { display: block !important; }
  details::details-content { content-visibility: visible; display: block; }
  details summary::marker, .pk-disclosure__chev { display: none; }
}

/* ?imprimir=1 on a screen: the same chrome removal, so what the reader sees is what the paper holds. */
@media screen {
  body:has(.compartir-print) :is(.pk-skip, .pk-header, .pk-footer, .pk-top, .pk-rail, .pk-actionbar, .pk-crumbs, .pk-chips, .compartir-noprint) { display: none !important; }
  body:has(.compartir-print) .compartir-row { display: none; }
  body:has(.compartir-print) .pk-page { max-width: 48rem; margin-inline: auto; }
  body:has(.compartir-print) .compartir-printfoot { display: block; margin-top: 1.5rem; }
  body:has(.compartir-print) main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; overflow-wrap: anywhere; }
  body:has(.compartir-print) #how-we-reported a::after { content: none; }
}
