﻿/* /css/pwa-styles.css */

/* PWA Install Button Styles */
.pwa-install-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-install-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .pwa-install-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 30px rgba(118, 75, 162, 0.5);
    }

    .pwa-install-btn:active {
        transform: translateY(0);
    }

    .pwa-install-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .pwa-install-btn:active::before {
        width: 300px;
        height: 300px;
    }

.pwa-icon-wrapper {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pwa-icon {
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2px);
    }
}

/* Install Guide Modal */
.install-guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

    .install-guide-modal.active {
        opacity: 1;
        visibility: visible;
    }

.guide-content {
    background: white;
    border-radius: 24px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.install-guide-modal.active .guide-content {
    transform: scale(1);
}

.guide-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.3);
}

    .guide-logo svg {
        width: 50px;
        height: 50px;
        fill: white;
    }

.guide-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Vazirmatn', sans-serif;
}

.guide-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    font-family: 'Vazirmatn', sans-serif;
}

.guide-steps {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: right;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

    .guide-step:last-child {
        margin-bottom: 0;
    }

.step-number {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    color: #555;
    font-family: 'Vazirmatn', sans-serif;
}

.guide-buttons {
    display: flex;
    gap: 10px;
}

.guide-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.guide-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

    .guide-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(118, 75, 162, 0.4);
    }

.guide-btn-secondary {
    background: #e9ecef;
    color: #666;
}

    .guide-btn-secondary:hover {
        background: #dee2e6;
    }

.close-guide {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .close-guide:hover {
        background: #e9ecef;
        transform: rotate(90deg);
    }

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

    .toast-notification.show {
        transform: translateX(0);
    }

.toast-icon {
    width: 20px;
    height: 20px;
}

/* Mobile specific */
@media (max-width: 768px) {
    .pwa-install-container {
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
    }

    .guide-content {
        padding: 25px 20px;
    }

    .guide-title {
        font-size: 20px;
    }

    .guide-description {
        font-size: 14px;
    }
}
