/* MeerkatGenie custom cursors
   Place this file in the same folder as the SVG and PNG assets,
   or update the url() paths to match your build.
   Hotspots are in CSS pixels of the 32×32 image.
     Kite (default pointer): 5, 3
     Paw (links and buttons): 3, 2
   Custom cursors are for fine pointers only (mouse / trackpad).
   They are turned off on touch / coarse pointers.
*/

@media (pointer: fine) {
  html,
  body {
    cursor: url("kite.svg") 5 3,
            url("kite-32.png") 5 3,
            auto;
  }

  a,
  button,
  [role="button"],
  label,
  summary,
  select,
  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  .btn,
  .menu-toggle {
    cursor: url("paw.svg") 3 2,
            url("paw-32.png") 3 2,
            pointer !important;
  }

  /* Text fields keep the native I-beam */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input:not([type]),
  textarea,
  [contenteditable="true"],
  [contenteditable=""] {
    cursor: text;
  }
}

/* Crisp @2x PNGs where the browser supports image-set on cursor */
@supports (cursor: image-set(url("kite-32.png") 1x)) {
  @media (pointer: fine) {
    html,
    body {
      cursor: url("kite.svg") 5 3,
              image-set(url("kite-32.png") 1x, url("kite-64.png") 2x) 5 3,
              url("kite-32.png") 5 3,
              auto;
    }

    a,
    button,
    [role="button"],
    label,
    summary,
    select,
    input[type="submit"],
    input[type="button"],
    input[type="reset"],
    .btn,
    .menu-toggle {
      cursor: url("paw.svg") 3 2,
              image-set(url("paw-32.png") 1x, url("paw-64.png") 2x) 3 2,
              url("paw-32.png") 3 2,
              pointer !important;
    }
  }
}

/* Touch and other coarse pointers: native cursors only */
@media (pointer: coarse) {
  html,
  body {
    cursor: auto;
  }

  a,
  button,
  [role="button"],
  label,
  summary,
  select,
  input[type="submit"],
  input[type="button"],
  input[type="reset"] {
    cursor: pointer;
  }

  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input:not([type]),
  textarea,
  [contenteditable="true"],
  [contenteditable=""] {
    cursor: text;
  }
}

/* Optional pressed default pointer (same hotspot):
   html:active { cursor: url("kite-active.svg") 5 3, url("kite-active-32.png") 5 3, auto; }
   Optional red paw (same hotspot 3, 2): swap paw.svg for paw-red.svg.
   Applied below for fine pointers only, with the 64px fallbacks.
*/

@media (pointer: fine) {
  html:active,
  body:active {
    cursor: url("kite-active.svg") 5 3,
            url("kite-active-32.png") 5 3,
            auto;
  }

  a:active,
  button:active,
  [role="button"]:active,
  label:active,
  summary:active,
  select:active,
  input[type="submit"]:active,
  input[type="button"]:active,
  input[type="reset"]:active,
  .btn:active,
  .menu-toggle:active {
    cursor: url("paw-red.svg") 3 2,
            url("paw-red-32.png") 3 2,
            pointer !important;
  }
}

@supports (cursor: image-set(url("kite-active-32.png") 1x)) {
  @media (pointer: fine) {
    html:active,
    body:active {
      cursor: url("kite-active.svg") 5 3,
              image-set(url("kite-active-32.png") 1x, url("kite-active-64.png") 2x) 5 3,
              url("kite-active-32.png") 5 3,
              auto;
    }

    a:active,
    button:active,
    [role="button"]:active,
    label:active,
    summary:active,
    select:active,
    input[type="submit"]:active,
    input[type="button"]:active,
    input[type="reset"]:active,
    .btn:active,
    .menu-toggle:active {
      cursor: url("paw-red.svg") 3 2,
              image-set(url("paw-red-32.png") 1x, url("paw-red-64.png") 2x) 3 2,
              url("paw-red-32.png") 3 2,
              pointer !important;
    }
  }
}
