:root{
    --ahn-pwa-blue:#2864ee;
    --ahn-pwa-dark:#173c94;
    --ahn-pwa-purple:#7048df;
    --ahn-pwa-ink:#17243a;
    --ahn-pwa-muted:#738197;
}

.ahn-pwa-install{
    position:fixed;
    z-index:99990;
    right:16px;
    bottom:max(16px,env(safe-area-inset-bottom));
    min-height:46px;
    display:none;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:9px 14px;
    border:1px solid rgba(255,255,255,.24);
    border-radius:14px;
    color:#fff;
    background:
        linear-gradient(
            135deg,
            var(--ahn-pwa-blue),
            var(--ahn-pwa-purple)
        );
    box-shadow:0 14px 34px rgba(31,78,190,.28);
    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;
    font-size:11px;
    font-weight:900;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}

.ahn-pwa-install.is-visible{
    display:inline-flex;
}

.ahn-pwa-install img{
    width:28px;
    height:28px;
    border-radius:8px;
}

.ahn-pwa-toast{
    position:fixed;
    z-index:99999;
    right:50%;
    bottom:max(18px,env(safe-area-inset-bottom));
    width:min(390px,calc(100% - 24px));
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 12px;
    border:1px solid #dce4ee;
    border-radius:14px;
    color:var(--ahn-pwa-ink);
    background:rgba(255,255,255,.97);
    box-shadow:0 16px 40px rgba(15,23,42,.18);
    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;
    font-size:10px;
    font-weight:850;
    line-height:1.8;
    transform:translate(50%,calc(100% + 40px));
    opacity:0;
    transition:
        transform .22s ease,
        opacity .22s ease;
    backdrop-filter:blur(14px);
}

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

.ahn-pwa-toast__icon{
    width:35px;
    height:35px;
    flex:0 0 35px;
    display:grid;
    place-items:center;
    border-radius:11px;
    color:var(--ahn-pwa-blue);
    background:#edf3ff;
    font-size:15px;
}

.ahn-pwa-modal{
    position:fixed;
    z-index:100000;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    background:rgba(10,22,43,.62);
    backdrop-filter:blur(6px);
}

.ahn-pwa-modal.is-visible{
    display:flex;
}

.ahn-pwa-modal__card{
    width:min(460px,100%);
    overflow:hidden;
    border:1px solid rgba(255,255,255,.15);
    border-radius:22px;
    background:#fff;
    box-shadow:0 28px 80px rgba(0,0,0,.28);
    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;
}

.ahn-pwa-modal__head{
    display:flex;
    align-items:center;
    gap:11px;
    padding:18px;
    color:#fff;
    background:
        linear-gradient(
            135deg,
            var(--ahn-pwa-dark),
            var(--ahn-pwa-blue) 58%,
            var(--ahn-pwa-purple)
        );
}

.ahn-pwa-modal__head img{
    width:50px;
    height:50px;
    border-radius:15px;
    box-shadow:0 10px 24px rgba(0,0,0,.15);
}

.ahn-pwa-modal__head strong,
.ahn-pwa-modal__head small{
    display:block;
}

.ahn-pwa-modal__head strong{
    font-size:15px;
    font-weight:950;
}

.ahn-pwa-modal__head small{
    margin-top:2px;
    color:#dce7fb;
    font-size:9px;
}

.ahn-pwa-modal__body{
    padding:17px;
    color:var(--ahn-pwa-muted);
    font-size:10px;
    line-height:2;
}

.ahn-pwa-modal__body ol{
    margin:10px 0 0;
    padding-right:20px;
}

.ahn-pwa-modal__close{
    width:100%;
    min-height:43px;
    margin-top:14px;
    border:0;
    border-radius:12px;
    color:#fff;
    background:
        linear-gradient(
            135deg,
            var(--ahn-pwa-blue),
            var(--ahn-pwa-dark)
        );
    font-family:inherit;
    font-size:10px;
    font-weight:900;
    cursor:pointer;
}

@media(max-width:700px){
    .ahn-pwa-install{
        right:10px;
        bottom:max(10px,env(safe-area-inset-bottom));
        min-height:43px;
        padding:7px 10px;
        border-radius:13px;
        font-size:9px;
    }

    .ahn-pwa-install img{
        width:25px;
        height:25px;
    }
}

@media(display-mode:standalone){
    .ahn-pwa-install{
        display:none!important;
    }
}
