﻿/* Container */
.pwa-overlay {
    position: fixed;
    top: 20px;
    /*left: 10px;*/
    width: 100%;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

    .pwa-overlay.fixTop {
        position: relative;
        top: 0;
        left: 0;
    }

.pwa-hidden {
    display: none !important;
}

/* بنر */
.pwa-banner {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 95%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    animation: slideDown 0.35s ease-out;
}

/* بنر */
.pwa-overlay.fixTop .pwa-banner {
    width: 100%;
    border-radius: 0px !important;
}

.pwa-overlay.fixTop .pwa-progress, .pwa-overlay.fixTop #pwa-cancel-btn {
    display: none;
}


/* آیکن */
.pwa-left {
    flex-shrink: 0;
}

.pwa-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-top: 4px;
}

/* متن و progress */
.pwa-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .pwa-center h4 {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        color: #111;
    }

    .pwa-center p {
        margin: 0;
        font-size: 12px;
        color: #555;
    }

/* ProgressBar */
.pwa-progress {
    height: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 6px;
}

#pwa-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0d6efd, #6ea8fe);
    transition: width 0.1s linear;
}

/* دکمه‌ها پایین */
.pwa-right {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.pwa-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

    .pwa-btn.primary {
        background: #0d6efd;
        color: #fff;
    }

    .pwa-btn.secondary {
        background: rgba(0,0,0,0.06);
        color: #333;
    }

    .pwa-btn:hover {
        transform: translateY(-1px);
    }

/* موبایل - ستونی */
@media (max-width: 480px) {
    .pwa-banner {
        flex-direction: row;
        align-items: flex-start;
    }

    .pwa-center {
        flex: 1;
        gap: 4px;
    }
}

/* انیمیشن بنر */
@keyframes slideDown {
    from {
        transform: translateY(-120%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
