/* مربوط به: partials/modals/pwa-install.php */

.pwa-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    padding: 20px;
}
.pwa-modal.active {
    display: flex;
}
.pwa-modal-content {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 30px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0,0,0,.3);
    animation: pwaSlideUp .4s ease;
}
@keyframes pwaSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pwa-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    border-radius: 22px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 30px rgba(16,166,181,.4);
}
.pwa-icon i {
    font-size: 42px;
    color: #fff;
}
.pwa-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 22px;
    background: #fff;
    padding: 6px;
}
.pwa-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 10px;
}
.pwa-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 25px;
}
.pwa-features {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
    text-align: right;
}
.pwa-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafa;
    border-radius: var(--radius);
}
.pwa-feature i {
    color: var(--green);
    font-size: 18px;
}
.pwa-feature span {
    font-size: 13px;
    font-weight: 600;
}
.pwa-buttons {
    display: grid;
    gap: 12px;
}
.pwa-install-btn {
    padding: 16px;
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: .3s;
}
.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16,166,181,.4);
}
.pwa-later-btn {
    padding: 14px;
    background: transparent;
    color: var(--muted);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.pwa-later-btn:hover {
    color: var(--ink);
}

/* راهنمای نصب در آیفون */
.ios-instructions {
    display: none;
    text-align: right;
    margin-top: 20px;
    padding: 15px;
    background: #fff8e1;
    border-radius: var(--radius);
}
.ios-instructions.active {
    display: block;
}
.ios-instructions h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #f57c00;
}
.ios-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}
.ios-step .num {
    width: 24px;
    height: 24px;
    background: var(--teal);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

@media(max-width:380px){
    .pwa-modal-content{padding:25px 20px}
    .pwa-icon{width:70px;height:70px}
    .pwa-icon i{font-size:32px}
}

/* وقتی اپ به‌صورت نصب‌شده (standalone) بازه، دیگه پیشنهاد نصب نشون نده */
@media (display-mode: standalone) {
    .pwa-modal { display: none !important; }
}
