/* Installable web app: "Add to home screen" hint and offline queue banner. */
.rk-install-hint {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: calc(100svw - 24px);
    max-width: 440px;
    box-sizing: border-box;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem 0.75rem 0.85rem;
    background: #ffffff;
    color: #2d3436;
    border: 1px solid rgba(108, 92, 231, 0.18);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.18), 0 2px 8px rgba(45, 52, 54, 0.08);
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    line-height: 1.35;
    animation: rk-install-in 0.25s ease-out;
}
.rk-install-hint.above-tabbar { bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px)); }
.rk-install-icon { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; }
.rk-install-copy { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1 1 auto; }
.rk-install-copy strong { font-weight: 600; font-size: 0.92rem; }
.rk-install-copy span { color: #636e72; }
.rk-share-glyph { display: inline-flex; vertical-align: -3px; color: #0a84ff; }
.rk-install-actions { display: flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; }
.rk-install-hint button { min-width: 0; box-shadow: none; transform: none; }
.rk-install-hint .rk-install-btn {
    width: auto; margin: 0; padding: 0.5rem 0.9rem;
    border: none; border-radius: 12px;
    background: #6c5ce7; color: #fff;
    font: inherit; font-weight: 600; cursor: pointer;
}
.rk-install-hint .rk-install-btn:hover { background: #5649c0; transform: none; }
.rk-install-hint .rk-install-close {
    width: 32px; height: 32px; margin: 0; padding: 0;
    border: none; border-radius: 50%;
    background: transparent; color: #636e72;
    font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.rk-install-hint .rk-install-close:hover { background: rgba(108, 92, 231, 0.08); transform: none; }
@keyframes rk-install-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .rk-install-hint { animation: none; } }

/* Receipts saved on this device while offline */
.rk-queue-banner {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 0 0 1rem; padding: 0.8rem 1rem;
    border-radius: 14px;
    background: #f4f1ff; color: #3d3570;
    border: 1px solid rgba(108, 92, 231, 0.25);
    font-size: 0.92rem; line-height: 1.4;
}
.rk-queue-banner[hidden] { display: none; }
.rk-queue-banner.is-failed { background: #fff4f2; color: #8a2d20; border-color: rgba(225, 112, 85, 0.35); }
.rk-queue-banner svg { flex: 0 0 auto; }
.rk-queue-banner .rk-queue-text { flex: 1 1 auto; }
.rk-queue-banner button {
    min-width: 0; box-shadow: none;
    width: auto; margin: 0; padding: 0.4rem 0.8rem; flex: 0 0 auto;
    border-radius: 10px; border: 1px solid currentColor;
    background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}

/* Upload modal: saved offline */
.scan-modal.is-queued .progress-ring-circle { stroke: #00b894; }
#progressModal .scan-modal.is-queued .scan-line { display: none; }
