/* ================================================================
   LOADING SKELETONS
   Any picture with class "sk" shows a soft shimmering box until it
   has loaded; script.js then adds "is-loaded" and the shimmer stops.
   Only the background moves (no layout work), so it doesn't lag.
   ================================================================ */

:root {
    --sk-base: #e9f1f9;
    --sk-shine: #f7fafd;
}

html.dark-mode {
    --sk-base: #2b3242;
    --sk-shine: #384054;
}

.sk:not(.is-loaded) {
    background: linear-gradient(100deg, var(--sk-base) 40%, var(--sk-shine) 50%, var(--sk-base) 60%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.4s linear infinite;
    color: transparent; /* hide the alt text while loading */
}

img.sk {
    height: auto; /* keep the width/height attributes from stretching pictures */
}

@keyframes sk-shimmer {
    from { background-position: 100% 0; }
    to   { background-position: -100% 0; }
}

/* Small pictures with no size until they load get a square box meanwhile */
.charm-photo.sk:not(.is-loaded),
.collections__img-wrap img.sk:not(.is-loaded) {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
}

.charm-photo.sk:not(.is-loaded) { width: 68%; }
