/* Swaps the light-mode card icons referenced in index.rst for dark-mode
   equivalents in _static/icons/*-dark.svg. If an icon filename in
   index.rst's :img-top: fields changes, update the selectors below (and
   add/remove the matching -dark.svg file) to keep them in sync. */

body[data-theme="dark"] .cardicon[src$="get-started.svg"] {
  content: url(icons/get-started-dark.svg);
}
body[data-theme="dark"] .cardicon[src$="example-tour.svg"] {
  content: url(icons/example-tour-dark.svg);
}
body[data-theme="dark"] .cardicon[src$="file-reference-manual.svg"] {
  content: url(icons/file-reference-manual-dark.svg);
}
body[data-theme="dark"] .cardicon[src$="file-remote-svcs.svg"] {
  content: url(icons/file-remote-svcs-dark.svg);
}
body[data-theme="dark"] .cardicon[src$="instant-cloud.svg"] {
  content: url(icons/instant-cloud-dark.svg);
}
body[data-theme="dark"] .cardicon[src$="logo-extensions.svg"] {
  content: url(icons/logo-extensions-dark.svg);
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .cardicon[src$="get-started.svg"] {
    content: url(icons/get-started-dark.svg);
  }
  body:not([data-theme="light"]) .cardicon[src$="example-tour.svg"] {
    content: url(icons/example-tour-dark.svg);
  }
  body:not([data-theme="light"]) .cardicon[src$="file-reference-manual.svg"] {
    content: url(icons/file-reference-manual-dark.svg);
  }
  body:not([data-theme="light"]) .cardicon[src$="file-remote-svcs.svg"] {
    content: url(icons/file-remote-svcs-dark.svg);
  }
  body:not([data-theme="light"]) .cardicon[src$="instant-cloud.svg"] {
    content: url(icons/instant-cloud-dark.svg);
  }
  body:not([data-theme="light"]) .cardicon[src$="logo-extensions.svg"] {
    content: url(icons/logo-extensions-dark.svg);
  }
}
