:root {
    --pwa-primary-color: #4f46e5;
    --pwa-primary-hover: #4338ca;
    --pwa-text-color: #1f2937;
    --pwa-light-text: #6b7280;
    --pwa-background: #ffffff;
    --pwa-border-color: #e5e7eb;
    --pwa-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --pwa-overlay-bg: rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: var(--pwa-text-color);
    margin: 0;
    padding: 0;
}

/* Modal overlay styles */
.pwa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--pwa-overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    animation: pwa-fade-in 0.3s ease-out;
}

@keyframes pwa-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pwa-container {
    background-color: var(--pwa-background);
    border-radius: 12px;
    box-shadow: var(--pwa-shadow);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    position: relative;
    animation: pwa-slide-up 0.5s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes pwa-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pwa-border-color);
}

.pwa-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-right: 16px;
    background-color: var(--pwa-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pwa-app-icon svg {
        width: 28px;
        height: 28px;
        color: white;
    }

.pwa-app-info h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pwa-app-info p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--pwa-light-text);
}

.pwa-close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pwa-light-text);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 1;
}

    .pwa-close-button:hover {
        background-color: var(--pwa-border-color);
    }

.pwa-content {
    padding: 20px;
}

.pwa-benefits {
    margin-bottom: 24px;
}

    .pwa-benefits h3 {
        font-size: 16px;
        margin: 0 0 12px;
    }

.pwa-benefit-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pwa-benefit-item {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
}

.pwa-benefit-icon {
    margin-right: 8px;
    color: var(--pwa-primary-color);
    flex-shrink: 0;
    margin-top: 3px;
}

.pwa-install-instructions {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

    .pwa-install-instructions h3 {
        font-size: 16px;
        margin: 0 0 12px;
        display: flex;
        align-items: center;
    }

.pwa-device-icon {
    margin-right: 8px;
}

.pwa-install-steps {
    margin: 0;
    padding: 0 0 0 24px;
    font-size: 14px;
}

    .pwa-install-steps li {
        margin-bottom: 8px;
    }

        .pwa-install-steps li:last-child {
            margin-bottom: 0;
        }

.pwa-install-button {
    display: block;
    width: 100%;
    background-color: var(--pwa-primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pwa-install-button:hover {
        background-color: var(--pwa-primary-hover);
    }

    .pwa-install-button svg {
        margin-right: 8px;
    }

    .pwa-install-button:disabled {
        background-color: var(--pwa-border-color);
        color: var(--pwa-light-text);
        cursor: not-allowed;
    }

.pwa-device-specific {
    display: none;
}

/* Show only relevant instructions based on device */
.pwa-ios .pwa-ios-instructions,
.pwa-android .pwa-android-instructions,
.pwa-desktop .pwa-desktop-instructions {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .pwa-benefit-list {
        grid-template-columns: 1fr;
    }

    .pwa-container {
        max-width: 90%;
        max-height: 80vh;
    }
}

/* Animation for the install button */
@keyframes pwa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.pwa-pulse {
    animation: pwa-pulse 2s infinite;
}

/* Hide the overlay when closed */
.pwa-hidden {
    display: none !important;
}

/* Prevent scrolling on body when modal is open */
body.pwa-modal-open {
    overflow: hidden;
}

/* Add this CSS to your existing styles */
.pwa-trigger-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--pwa-primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    /*display: flex;*/
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

    .pwa-trigger-button:hover {
        background-color: var(--pwa-primary-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    }

    .pwa-trigger-button svg {
        flex-shrink: 0;
    }

/* For mobile devices, make it smaller and centered */
@media (max-width: 768px) {
    .pwa-trigger-button {
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        padding: 8px 16px;
        font-size: 14px;
    }

        .pwa-trigger-button:hover {
            transform: translateX(50%) translateY(-2px);
        }
}
