@import "app/styles/variables";

bl-profile-button {
    .notification-overlay {
        position: absolute;
        top: 5px;
        right: 10px;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        line-height: 20px;
        text-align: center;
        vertical-align: middle;

        &.checking {
            background-color: $primary-color;
            .fa {
                margin-top: 3px;
            }
        }

        &.downloading {
            background-color: $primary-color;

            mat-progress-spinner {
                width: 100%;
                height: 100%;
                margin-top: -2px;
                margin-left: -1px;

                svg {
                    circle {
                        stroke: $primary-contrast-color;
                    }
                }
            }
            > .fa {
                position: absolute;
                top: 4px;
                left: 5px;
                animation: flashOpacity 1.5s ease-in-out infinite;
            }
        }

        &.ready {
            background-color: $danger-color;
        }
    }
}

.flash-opacity {
    animation: flashOpacity 1.5s ease-in-out infinite;
}

// To flash when downloading a new update
@keyframes flashOpacity {
    0% {
        opacity:1;
    }
    50% {
        opacity:0.2;
    }
    100% {
        opacity:1;
    }
}
