/* App Install/PWA UI imported from file #1 and isolated from Web Push. */
.app-install-root {
    --app-install-theme: #df2d4d;
    --app-install-theme-rgb: 223, 45, 77;
}

.app-install-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999990;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .3s ease;
}
.app-install-backdrop.is-visible { opacity: 1; }

.app-install-dialog {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999999;
    width: 340px;
    max-width: calc(100vw - 24px);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .32s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.app-install-dialog.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-install-shell {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 16px 40px rgba(15,23,42,.14), 0 3px 10px rgba(15,23,42,.05);
    overflow: hidden;
}
.app-install-shell::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--app-install-theme);
}

.app-install-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 0;
}
.app-install-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.app-install-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    object-fit: contain;
    border: 1px solid #eef2f6;
    background: #fff;
    flex-shrink: 0;
}
.app-install-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.app-install-site {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-install-host { font-size: 11px; color: #64748b; }
.app-install-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .15s ease;
}
.app-install-close:hover { background: #f1f5f9; color: #0f172a; }

.app-install-content {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 16px 4px;
}
.app-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(var(--app-install-theme-rgb), .08);
    color: var(--app-install-theme);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid rgba(var(--app-install-theme-rgb), .12);
}
.app-install-copy { min-width: 0; }
.app-install-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}
.app-install-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #64748b;
}
.app-install-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 14px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}
.app-install-btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.app-install-btn-primary {
    flex: 1 1 auto;
    min-width: 118px;
    height: 36px;
    padding: 0 14px;
    background: var(--app-install-theme);
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(var(--app-install-theme-rgb), .26);
}
.app-install-btn-primary:hover {
    color: #fff !important;
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--app-install-theme-rgb), .34);
}
.app-install-btn-ghost {
    height: 36px;
    padding: 0 12px;
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.app-install-btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }

.app-install-fab {
    position: fixed;
    left: 20px;
    bottom: 105px;
    z-index: 999998;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.app-install-fab-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-radius: 50%;
    border: 2px solid rgba(var(--app-install-theme-rgb), .28);
    animation: appInstallPulse 2.2s ease-out infinite;
    pointer-events: none;
}
.app-install-fab-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--app-install-theme);
    color: #fff;
    border: 1px solid var(--app-install-theme);
    box-shadow: 0 6px 24px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform .22s ease, box-shadow .22s ease;
}
.app-install-fab:hover .app-install-fab-btn {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15,23,42,.16);
}
.app-install-fab-label {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 7px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.app-install-fab-label::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    margin-top: -5px;
    border: 5px solid transparent;
    border-right-color: #0f172a;
}
.app-install-fab:hover .app-install-fab-label {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}

@keyframes appInstallPulse {
    0% { transform: scale(1); opacity: .7; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}
body.app-install-open { overflow: hidden; }

@media (max-width: 480px) {
    .app-install-dialog {
        top: 10px;
        left: 10px;
        width: calc(100vw - 20px);
    }
    .app-install-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .app-install-btn-primary,
    .app-install-btn-ghost { width: 100%; }
    .app-install-fab { left: 16px; bottom: 92px; }
    .app-install-fab-label { display: none; }
}
