﻿

/* The semi-transparent background overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* The actual popup box */
.popup {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden; /* This clips the buttons to the border-radius */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

/* Padding for the text content only */
.popup-content {
    padding: 24px;
    text-align: center;
    font-family: sans-serif;
    color: black;
}

/* Button container taking the full bottom surface */
.popup-buttons {
    display: flex;
    width: 100%;
    border-top: 1px solid #eee;
}

    /* Each button grows to fill equal space */
    .popup-buttons button {
        flex: 1;
        padding: 15px;
        border: none;
        background: white;
        font-weight: bold;
        cursor: pointer;
        transition: background 0.2s;
    }

        /* Visual separation between buttons */
        .popup-buttons button:not(:last-child) {
            border-right: 1px solid #eee;
        }

        .popup-buttons button:hover {
            background: #f8f9fa;
        }

/* OK (primary) action button */
#okBtn {
    color: #007bff;
}

#neverBtn {
    color: darkred;
}

/* Entry animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Install button */
/* The pulse animation */
@keyframes pulse-animation {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.is-pulsing {
    animation: pulse-animation 2s infinite;
}

.install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: #000000;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);    
}

/* Fade in and fade out effect */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

.fade-in {
    animation: fadeIn 400ms ease forwards;
}

.fade-out {
    animation: fadeOut 400ms ease forwards;
}

.hidden {
    display: none;
}

/* Processing State: The "Wait" Effect */
.processing {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        border-color: #ddd;
        transform: scale(1);
    }

    50% {
        border-color: var(--primary);
        transform: scale(1.02);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Shake animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}
