/*
 * YUKINON IMAGE PROTECTION V1.0.0
 *
 * Casual-save protection for public site imagery.
 *
 * Explicitly downloadable:
 *
 *   data-image-download="allow"
 *   .image-download-allow
 *   /assets/downloads/
 *
 * This is a deterrence layer.
 * It does not claim cryptographic protection.
 */


/* =========================================================
   PROTECTED IMAGES
   ========================================================= */

img:not(
  [data-image-download="allow"]
):not(
  .image-download-allow
){

  -webkit-user-drag:
    none;

  user-drag:
    none;

  -webkit-touch-callout:
    none;

  -webkit-user-select:
    none;

  user-select:
    none;
}


/* ---------------------------------------------------------
   Explicitly downloadable images
   --------------------------------------------------------- */

img[
  data-image-download="allow"
],

img.image-download-allow{

  -webkit-user-drag:
    auto;

  -webkit-touch-callout:
    default;

  -webkit-user-select:
    auto;

  user-select:
    auto;
}


/* ---------------------------------------------------------
   Protect image-only links from iOS callout unless allowed
   --------------------------------------------------------- */

a[
  data-image-download="deny"
]{

  -webkit-touch-callout:
    none;
}


/* ---------------------------------------------------------
   Utility
   --------------------------------------------------------- */

.image-protected{

  -webkit-user-drag:
    none;

  -webkit-touch-callout:
    none;

  -webkit-user-select:
    none;

  user-select:
    none;
}
