.bookspot-loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.bookspot-loading.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0s;
}

html[data-theme="dark"] .bookspot-loading {
    background: rgba(2, 6, 23, 0.6);
}

.bookspot-loading__logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.25));
    animation: bookspot-spin 1s linear infinite;
}

html[data-theme="dark"] .bookspot-loading__logo {
    filter: invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

@keyframes bookspot-spin {
    to { transform: rotate(360deg); }
}

@keyframes bookspot-pulse {
    0%, 100% { opacity: 0.45; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .bookspot-loading { transition-duration: 0.01s; }
    .bookspot-loading__logo { animation: bookspot-pulse 1.6s ease-in-out infinite; }
}
