/* PWA UI — install banner, toasts, update prompt */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pwa-toast-host {
    position: fixed;
    inset-inline: 0;
    bottom: 1rem;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    pointer-events: none;
    padding: 0 1rem;
}

.pwa-toast {
    pointer-events: auto;
    max-width: min(100%, 420px);
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(12, 21, 36, 0.94);
    color: #fefdfb;
    font-size: 0.88rem;
    line-height: 1.7;
    box-shadow: 0 16px 40px rgba(12, 21, 36, 0.28);
    animation: pwa-toast-in 0.35s ease;
}

.pwa-toast--online {
    background: linear-gradient(135deg, #128f7f, #18a896);
}

.pwa-toast--offline {
    background: linear-gradient(135deg, #5a3d2e, #c4623a);
}

@keyframes pwa-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwa-install-card {
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    z-index: 99980;
    max-width: 420px;
    margin-inline: auto;
    background: #fefdfb;
    border: 1px solid rgba(24, 168, 150, 0.22);
    border-radius: 18px;
    padding: 1rem 1rem 0.9rem;
    box-shadow: 0 20px 50px rgba(12, 21, 36, 0.16);
    animation: pwa-toast-in 0.4s ease;
}

.pwa-install-card[hidden],
.pwa-update-banner[hidden],
.pwa-ios-hint[hidden] {
    display: none !important;
}

.pwa-install-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.pwa-install-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #18a896, #128f7f);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pwa-install-card__title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.7;
    color: #0c1524;
}

.pwa-install-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pwa-install-card__actions .btn {
    min-height: 40px;
    font-size: 0.86rem;
}

.pwa-install-card__close {
    position: absolute;
    top: 0.55rem;
    inset-inline-end: 0.55rem;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(12, 21, 36, 0.06);
    color: #0c1524;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.pwa-update-banner {
    position: fixed;
    top: 5.5rem;
    inset-inline: 1rem;
    z-index: 99985;
    max-width: 460px;
    margin-inline: auto;
    background: #0c1524;
    color: #fefdfb;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: 0 14px 36px rgba(12, 21, 36, 0.22);
    font-size: 0.88rem;
    line-height: 1.6;
}

.pwa-ios-hint {
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    z-index: 99975;
    max-width: 420px;
    margin-inline: auto;
    background: rgba(12, 21, 36, 0.95);
    color: #fefdfb;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font-size: 0.86rem;
    line-height: 1.75;
}

.pwa-panel-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(24, 168, 150, 0.08), rgba(201, 169, 98, 0.08));
    border: 1px solid rgba(24, 168, 150, 0.18);
    margin-bottom: 1.25rem;
}

.pwa-panel-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #18a896, #128f7f);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.pwa-panel-card__body h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.pwa-panel-card__body p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(12, 21, 36, 0.72);
    margin-bottom: 0.75rem;
}

.pwa-push-section {
    margin-top: 0.5rem;
}

.pwa-push-section .notify-option {
    margin-bottom: 0.75rem;
}

@media (min-width: 901px) {
    .pwa-install-card {
        inset-inline-end: 1.5rem;
        inset-inline-start: auto;
        bottom: 1.25rem;
    }
}
