/* Scoped adaptation of the supplied RIWAQ 360 loader for the legacy viewer. */
.riwaq-loader[hidden] { display: none !important; }

.riwaq-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #080808;
    color: #fff;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 500ms ease;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

.riwaq-loader *, .riwaq-loader *::before, .riwaq-loader *::after { box-sizing: border-box; }
.riwaq-loader.is-hiding { opacity: 0; pointer-events: none; }

.riwaq-loader__content {
    display: flex;
    width: 100%;
    max-width: 560px;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    text-align: center;
}

.riwaq-logo { position: relative; width: 190px; height: 190px; flex: 0 0 auto; }
.riwaq-logo__glow {
    position: absolute;
    inset: 36%;
    border-radius: 50%;
    background: rgba(215, 170, 85, .15);
    filter: blur(22px);
    animation: riwaqPulse 1.8s ease-in-out infinite;
}
.riwaq-logo svg { display: block; width: 100%; height: 100%; overflow: visible; }
.riwaq-orbit-primary { transform-origin: 100px 100px; animation: riwaqSpin 5s linear infinite; }
.riwaq-orbit-secondary { transform-origin: 100px 100px; animation: riwaqSpinReverse 8s linear infinite; }
.riwaq-center-dot { transform-origin: 100px 100px; animation: riwaqPulse 1.8s ease-in-out infinite; }
.riwaq-progress-ring { transition: stroke-dashoffset .5s ease; }

.riwaq-brand { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 28px; }
.riwaq-brand__name, .riwaq-brand__suffix { font-size: 24px; font-weight: 300; }
.riwaq-brand__name { color: #fff; letter-spacing: .28em; }
.riwaq-brand__suffix { color: #d7aa55; }

.riwaq-percentage { display: flex; align-items: baseline; justify-content: center; margin-top: 30px; }
.riwaq-percentage__value { font-size: 40px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.riwaq-percentage__symbol { margin-left: 4px; color: rgba(255, 255, 255, .4); font-size: 14px; }

.riwaq-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.riwaq-status__text { color: rgba(255, 255, 255, .55); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.riwaq-dots { display: flex; gap: 4px; }
.riwaq-dot { width: 4px; height: 4px; border-radius: 50%; background: #d7aa55; animation: riwaqBounce 1s ease-in-out infinite; }
.riwaq-dot:nth-child(2) { animation-delay: .15s; }
.riwaq-dot:nth-child(3) { animation-delay: .3s; }
.riwaq-submessage { margin: 8px 0 0; color: rgba(255, 255, 255, .35); font-size: 14px; }

.riwaq-progress-bar { width: 208px; height: 1px; margin-top: 24px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.riwaq-progress-bar__fill { width: 0; height: 100%; background: #d7aa55; transition: width .35s ease; }

.riwaq-loader.is-ready .riwaq-orbit-primary,
.riwaq-loader.is-ready .riwaq-orbit-secondary,
.riwaq-loader.is-ready .riwaq-center-dot,
.riwaq-loader.is-ready .riwaq-logo__glow,
.riwaq-loader.is-ready .riwaq-dot { animation-play-state: paused; }

@keyframes riwaqSpin { to { transform: rotate(360deg); } }
@keyframes riwaqSpinReverse { to { transform: rotate(-360deg); } }
@keyframes riwaqPulse {
    0%, 100% { opacity: .72; transform: scale(.94); }
    50% { opacity: 1; transform: scale(1.08); }
}
@keyframes riwaqBounce {
    0%, 100% { transform: translateY(0); opacity: .4; }
    50% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 480px) {
    .riwaq-logo { width: 160px; height: 160px; }
    .riwaq-brand__name, .riwaq-brand__suffix { font-size: 20px; }
    .riwaq-percentage__value { font-size: 36px; }
}

@media (max-height: 620px) and (min-width: 481px) {
    .riwaq-loader__content { transform: scale(.82); }
}

@media (prefers-reduced-motion: reduce) {
    .riwaq-orbit-primary, .riwaq-orbit-secondary, .riwaq-center-dot,
    .riwaq-logo__glow, .riwaq-dot { animation: none !important; }
    .riwaq-progress-ring, .riwaq-progress-bar__fill { transition: none; }
}

/* Keep the old ProgressBar.js widget alive for the viewer's internal hooks, but hidden. */
.loading .progress-circle { display: none !important; }
