@import "../styles/global/shadows.css";
@import "../styles/global/colors.css";

.snack-outer-container {
    height: 100vh;
    width: 100vw;
    position: absolute;
}

.snack-main-container{
    user-select: none;
    position: absolute;
    border-radius: 0.7rem;
    background-color: white;
    box-shadow: var(--button-shadow);
    width: 20rem;
    height: 3rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-direction: column;
    justify-content: end;
    transition: opacity 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    margin-top: 3rem;
    z-index: 1;
}

.snack-main-container.left{
    left: 2rem;
}

.snack-main-container.right{
    right: 2rem;
}

.snack-main-container.center{
    position: absolute;
    left: 50%;
    right: 50%;
    translate: -50% 0;
}

.snack-main-container.active{
    opacity: 1;
    animation: toptobottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.snack-main-container.inactive{
    animation: bottomtotop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes toptobottom {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes bottomtotop {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

.snack-contents{
    height: 90%;
    width: 100%;
    display: flex;
    padding-left: 0.7rem;
    padding-right: 0.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.snack-progress{
    width: 100%;
    height: 8%;
    right: 100%;
    background: linear-gradient(174deg, rgba(226,66,249,1) 10%, rgba(0,172,255,1) 52%, rgba(85,114,255,1) 86%);
    position: relative;
}

.snack-progress.active{
    animation: progress 7s linear forwards;
}



@keyframes progress {
    from {
        right: 0%;
    }
    to {
        right: 100%;
    }
}

.snack-close-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    width: 2rem;
    transition: all 0.2s ease-in;
    cursor: pointer;
    border-radius: 0.5rem;
}

svg {
    fill: var(--grey-shade-400);
}