/* PWA install modal: a bottom sheet on phones */
.sb-pwa {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-family: inherit;
}

.sb-pwa__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .2s ease;
}

.sb-pwa__sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    background: #fff;
    color: #212529;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .2);
    text-align: center;
    transform: translateY(100%);
    transition: transform .25s ease;
}

.sb-pwa--open .sb-pwa__backdrop {
    opacity: 1;
}

.sb-pwa--open .sb-pwa__sheet {
    transform: translateY(0);
}

.sb-pwa__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    color: #6c757d;
    font-size: 28px;
    line-height: 1;
}

.sb-pwa__icon {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    border-radius: 16px;
}

.sb-pwa__title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 600;
}

.sb-pwa__text,
.sb-pwa__hint {
    margin: 0 0 16px;
    font-size: .95rem;
    line-height: 1.45;
    color: #495057;
}

.sb-pwa__hint {
    padding: 12px;
    background: #f1f3f5;
    border-radius: 8px;
}

.sb-pwa__share {
    display: inline-block;
    margin: 0 2px;
    color: #007bff;
    vertical-align: -3px;
}

.sb-pwa__actions {
    display: flex;
    gap: 12px;
}

.sb-pwa__btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    font-size: 1rem;
}

.sb-pwa__btn--primary {
    border-color: #007bff;
    background: #007bff;
    color: #fff;
    font-weight: 600;
}

@media (min-width: 576px) {
    .sb-pwa {
        align-items: center;
    }

    .sb-pwa__sheet {
        border-radius: 16px;
        transform: translateY(24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sb-pwa__backdrop,
    .sb-pwa__sheet {
        transition: none;
    }
}
