/* Sukuma ERP install and connectivity controls. */
.pwa-install-slot {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

/* Replace the old full-screen blocker with the non-blocking status toast. */
html.pwa-enabled .offline-overlay-backdrop,
html.pwa-enabled .network-warning-banner {
    display: none !important;
}

.pwa-install-button {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid rgba(17, 94, 75, .24);
    border-radius: 9px;
    background: #fff;
    color: #115e4b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font: 650 12px/1.2 inherit;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(31, 41, 51, .06);
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.pwa-install-button:hover {
    background: #f0f7f4;
    border-color: rgba(17, 94, 75, .5);
    box-shadow: 0 5px 14px rgba(17, 94, 75, .12);
}

.pwa-install-button:active {
    transform: translateY(1px);
}

.pwa-install-button:focus-visible,
.pwa-dialog-close:focus-visible,
.pwa-dialog-action:focus-visible {
    outline: 3px solid rgba(184, 115, 51, .38);
    outline-offset: 2px;
}

.pwa-install-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.pwa-install-button[hidden],
.pwa-install-slot[hidden] {
    display: none !important;
}

.pwa-network-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16835f;
    box-shadow: 0 0 0 3px rgba(22, 131, 95, .12);
}

html.pwa-is-offline .pwa-network-dot {
    background: #c2410c;
    box-shadow: 0 0 0 3px rgba(194, 65, 12, .14);
}

.pwa-status-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 5200;
    width: min(520px, calc(100vw - 24px));
    transform: translate(-50%, calc(100% + 42px));
    opacity: 0;
    pointer-events: none;
    border-radius: 12px;
    background: #1f2933;
    color: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .26);
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font: 600 13px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: transform 220ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
}

.pwa-status-toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-status-toast__icon {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .16);
    flex: 0 0 auto;
}

.pwa-status-toast.is-online .pwa-status-toast__icon {
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .14);
}

.pwa-status-toast__action {
    margin-left: auto;
    border: 0;
    border-radius: 7px;
    padding: 6px 9px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font: 700 12px/1 inherit;
    cursor: pointer;
}

.pwa-install-dialog {
    width: min(450px, calc(100vw - 28px));
    border: 1px solid #dce4e0;
    border-radius: 16px;
    padding: 0;
    color: #1f2933;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 46, 37, .24);
}

.pwa-install-dialog::backdrop {
    background: rgba(15, 23, 42, .58);
}

.pwa-install-dialog__head,
.pwa-install-dialog__body,
.pwa-install-dialog__foot {
    padding: 18px 20px;
}

.pwa-install-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #e4e7eb;
}

.pwa-install-dialog__title {
    margin: 0;
    color: #173f35;
    font: 750 18px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwa-install-dialog__body {
    color: #43504b;
    font: 400 14px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwa-install-dialog__body p {
    margin: 0;
}

.pwa-install-dialog__foot {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e4e7eb;
}

.pwa-dialog-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f2f5f4;
    color: #34443e;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.pwa-dialog-action {
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: #115e4b;
    color: #fff;
    font: 700 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
}

@media (max-width: 680px) {
    .pwa-install-button {
        width: 38px;
        padding-inline: 0;
    }

    .pwa-install-button__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-install-button,
    .pwa-status-toast {
        transition: none;
    }
}
