@font-face {
    font-family: 'IW Loading Shabnam';
    src: url('../fonts/Shabnam-FD.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.iw-storefront-loading-card {
    position: fixed;
    z-index: 2147483647;
    left: 50%;
    bottom: max(28px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 40px);
    padding: 12px 20px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
    color: #545454;
    font-family: 'IW Loading Shabnam', Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.8;
    direction: rtl;
    transform: translateX(-50%);
    pointer-events: none;
}

.iw-storefront-loading-emblem {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 2px solid rgba(0, 0, 0, .1);
    border-top-color: var(--iw-appearance-accent, var(--iw-storefront-loading-accent, currentColor));
    border-radius: 50%;
    animation: iw-storefront-spin .9s linear infinite;
}

.iw-storefront-loading-card strong {
    font: inherit;
    white-space: nowrap;
}

/* The card is attached to html, so follow the native body scheme explicitly. */
html:has(body.dark-theme) .iw-storefront-loading-card,
html:has(body.dark-scheme) .iw-storefront-loading-card {
    background: rgba(32, 32, 32, .96);
    color: #f5f5f5;
    border-color: rgba(255, 255, 255, .16);
}
html:has(body.dark-theme) .iw-storefront-loading-emblem,
html:has(body.dark-scheme) .iw-storefront-loading-emblem {
    border-right-color: rgba(255, 255, 255, .2);
    border-bottom-color: rgba(255, 255, 255, .2);
    border-left-color: rgba(255, 255, 255, .2);
}

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

@media (prefers-reduced-motion: reduce) {
    .iw-storefront-loading-card { display: none; }
}
