{
  "id": "loading-overlay",
  "name": "Loading Overlay",
  "category": "loaders",
  "tags": [
    "backdrop-filter",
    "blur",
    "card",
    "aria-busy",
    "spinner"
  ],
  "description": "A frosted overlay with a spinner that covers any card or section while it has aria-busy set.",
  "url": "https://copy-css.com/snippets/loading-overlay",
  "markdown": "https://copy-css.com/snippets/loading-overlay.md",
  "html": "<section class=\"overlay-panel\" aria-busy=\"true\">\n  <h3>Monthly report</h3>\n  <p>Revenue grew 12% compared with last month, led by annual plans.</p>\n  <div class=\"loading-overlay\" role=\"status\" aria-label=\"Loading\"></div>\n</section>",
  "css": ".overlay-panel {\n  position: relative;\n  width: min(100%, 280px);\n  padding: 20px;\n  border-radius: 16px;\n  background: #fff;\n  color: #334155;\n  font: 15px/1.5 system-ui, sans-serif;\n  box-shadow: 0 4px 16px #0f172a14;\n}\n\n.overlay-panel h3 {\n  margin: 0 0 6px;\n  color: #0f172a;\n  font-size: 17px;\n}\n\n.overlay-panel p {\n  margin: 0;\n}\n\n.loading-overlay {\n  position: absolute;\n  inset: 0;\n  display: none;\n  place-items: center;\n  border-radius: inherit;\n  background: #ffffffa6;\n  -webkit-backdrop-filter: blur(3px);\n  backdrop-filter: blur(3px);\n}\n\n/* Show the overlay only while the section is busy */\n[aria-busy=\"true\"] > .loading-overlay {\n  display: grid;\n}\n\n.loading-overlay::after {\n  content: \"\";\n  width: 32px;\n  height: 32px;\n  border: 3px solid #cbd5e1;\n  border-top-color: #4f46e5;\n  border-radius: 50%;\n  animation: loading-overlay-spin 0.8s linear infinite;\n}\n\n@keyframes loading-overlay-spin {\n  to { transform: rotate(1turn); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .loading-overlay::after { animation-duration: 2s; }\n}",
  "features": [
    "keyframe animations",
    "transforms",
    "box shadows",
    "backdrop filters",
    "CSS Grid",
    "reduced-motion support"
  ],
  "customProperties": []
}
