/* Progress indicator and logout question. Only appears while something is happening. */
.wb-lock { overflow: hidden; }
.wb-overlay, .wb-dialog-wrap {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 16, 12, .45); padding: 1rem;
}
.wb-overlay[hidden], .wb-dialog-wrap[hidden] { display: none; }
.wb-card {
    display: flex; flex-direction: column; align-items: center; gap: .9rem;
    background: #fff; color: #2a2118; border-radius: 14px; padding: 1.4rem 1.8rem;
    min-width: 170px; max-width: 320px; text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    font: 500 .95rem/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- iPhone / iPad: dark frosted square, 12-spoke wheel ---- */
.wb-ios .wb-card { background: rgba(40, 40, 42, .92); color: #fff; border-radius: 16px; min-width: 150px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.wb-ios.wb-overlay { background: rgba(0, 0, 0, .18); }
.wb-spin--ios, .wb-spin--mac { position: relative; width: 36px; height: 36px; }
.wb-spin--ios i, .wb-spin--mac i {
    position: absolute; left: 50%; top: 0; width: 3px; height: 9px; margin-left: -1.5px; border-radius: 2px;
    background: currentColor; transform-origin: 50% 18px;
    transform: rotate(calc(var(--n) * 30deg)); opacity: .15;
    animation: wb-fade 1s linear infinite; animation-delay: calc(var(--n) * 1s / 12 - 1s);
}
.wb-ios .wb-spin--ios { color: #fff; }
@keyframes wb-fade { 0% { opacity: 1; } 100% { opacity: .15; } }

/* ---- Mac: light card, thin wheel ---- */
.wb-mac .wb-card { background: rgba(246, 246, 247, .96); color: #1d1d1f; border-radius: 12px; }
.wb-spin--mac { width: 30px; height: 30px; color: #555; }
.wb-spin--mac i { width: 2.5px; height: 7px; transform-origin: 50% 15px; margin-left: -1.25px; }

/* ---- Android: round material card, circular arc ---- */
.wb-android .wb-card { border-radius: 28px; padding: 1.5rem 2rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.wb-spin--android { width: 44px; height: 44px; animation: wb-rot 1.4s linear infinite; }
.wb-spin--android svg { width: 100%; height: 100%; }
.wb-spin--android circle { fill: none; stroke: #8a5a2b; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 30 120; animation: wb-dash 1.4s ease-in-out infinite; }
@keyframes wb-rot { to { transform: rotate(360deg); } }
@keyframes wb-dash { 0% { stroke-dasharray: 2 120; stroke-dashoffset: 0; } 50% { stroke-dasharray: 80 120; stroke-dashoffset: -25; } 100% { stroke-dasharray: 2 120; stroke-dashoffset: -118; } }

/* ---- Windows: square card, orbiting dots ---- */
.wb-windows .wb-card { border-radius: 4px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.wb-spin--windows { position: relative; width: 36px; height: 36px; }
.wb-spin--windows i {
    position: absolute; inset: 0; transform: rotate(0deg); opacity: 0;
    animation: wb-orbit 2.6s cubic-bezier(.4, .1, .4, .9) infinite; animation-delay: calc(var(--n) * .15s);
}
.wb-spin--windows i::after { content: ""; position: absolute; left: 50%; top: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #0067c0; }
@keyframes wb-orbit {
    0% { transform: rotate(0deg); opacity: 1; }
    70% { transform: rotate(540deg); opacity: 1; }
    80%, 100% { transform: rotate(720deg); opacity: 0; }
}

/* ---- Anything else ---- */
.wb-spin--other b { display: block; width: 34px; height: 34px; border: 4px solid #e4d9cc; border-top-color: #8a5a2b; border-radius: 50%; animation: wb-rot .9s linear infinite; }

.wb-text { max-width: 260px; }

/* ---- Logout question ---- */
.wb-dialog {
    background: #fff; color: #2a2118; width: 100%; max-width: 360px; border-radius: 14px; padding: 1.4rem 1.4rem 1.2rem;
    box-shadow: 0 14px 44px rgba(0, 0, 0, .32); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wb-dialog h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.wb-dialog p { margin: 0 0 1rem; color: #5b5047; font-size: .95rem; }
.wb-dlg-msg { margin: 0 0 .9rem; padding: .55rem .75rem; border-radius: 8px; background: #fdecea; color: #8a1f17; font-size: .88rem; }
.wb-dlg-btns { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.wb-dlg-btns button { cursor: pointer; }
.wb-ios .wb-dialog { border-radius: 14px; text-align: center; }
.wb-ios .wb-dlg-btns { justify-content: center; }
.wb-android .wb-dialog { border-radius: 28px; }
.wb-windows .wb-dialog { border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
    .wb-spin--ios i, .wb-spin--mac i { animation-duration: 2s; }
}
