/* Picture protection — the stylesheet's share of it.

   The works on this site belong to the people they were painted for. Three
   things are done for them here, and the script beside this file
   (assets/js/protect.js) and the Worker in front of the site do the rest.

   What counts as an artwork, here and in the script: an <img> whose address
   is under img/works/ or is the founder's portrait, and anything marked
   data-art (the room's canvases, which are drawn from those pictures).

   1. An artwork cannot be picked up: no long-press sheet on a telephone, no
      dragging it off the page, no sweeping it into a selection.
   2. The veil. While <html> carries .srs-veil the artworks are not painted.
      Each one is cleared where it stands, so the page keeps its exact
      shape, a sheet or dialog raised over the page is covered as well, and
      a screen reader still finds every picture and its description.
   3. Print. The artworks are left out of anything printed or saved as a PDF,
      and one line at the head of the first sheet says so.

   None of this can stop a screenshot, and nothing on the site says it can. */

img[src*="img/works/"],
img[src*="founder-portrait"],
[data-art] {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

/* The veil comes down at once and lifts at once, whatever fade a picture has
   of its own: the wheel's plates take half a second to arrive, and a veil
   that took as long would be no veil. Only the length of a change is taken
   away, never the list of what may change, so a movement already under way
   elsewhere on the same element still runs to its end and still reports it.
   .srs-veil-lift is worn for the one instant in which the veil comes off. */
html.srs-veil img[src*="img/works/"],
html.srs-veil img[src*="founder-portrait"],
html.srs-veil [data-art] {
  opacity: 0 !important;
}

html.srs-veil img[src*="img/works/"],
html.srs-veil img[src*="founder-portrait"],
html.srs-veil [data-art],
html.srs-veil-lift img[src*="img/works/"],
html.srs-veil-lift img[src*="founder-portrait"],
html.srs-veil-lift [data-art] {
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

@media print {
  /* Both, because a marked container may hold children that ask to be seen;
     and neither waits on a fade of the picture's own, because a sheet is laid
     out in a single instant. */
  img[src*="img/works/"],
  img[src*="founder-portrait"],
  [data-art] {
    opacity: 0 !important;
    visibility: hidden !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }

  body::before {
    content: "Pictures are not printed. \00a9  Shivraj Singh Art Gallery.";
    display: block;
    margin: 0;
    padding: 10pt 0;
    border-bottom: 0.5pt solid var(--g300, #c8c8c8);
    background: var(--paper, #fff);
    color: var(--ink, #000);
    font-family: var(--f-sans, "Inter", "Segoe UI", system-ui, -apple-system, sans-serif);
    font-size: 10pt;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-align: left;
  }

  /* A page with no artwork on it left nothing out, and says nothing. */
  @supports selector(:has(a)) {
    body:not(:has(img[src*="img/works/"], img[src*="founder-portrait"], [data-art]))::before {
      content: none;
    }
  }
}
