/* for accept/decline */
/* create pseudoelements on top of the overlay */
#overlay-left::before, #overlay-right::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s;
    overflow: visible;
    z-index: -1;
}

/* create pseudoelements on top of the overlays*/
#overlay-left::before {
    background: linear-gradient(to right, rgb(255, 0, 0), rgba(143, 143, 143, 0));
    content: '';
    position: absolute;
    top:0;
    left:0;
    width:100%;
    opacity: 0;
    transition: opacity 0.5s;
}
#overlay-right::before {
    background: linear-gradient(to left, rgb(43, 255, 0), rgba(143, 143, 143, 0));
    content: '';
    position: absolute;
    top:0;
    left:0;
    width:100%;
    opacity: 0;
    transition: opacity 0.5s;
}

/* fix z-index for inputs. tailwind messes with z-index */
#overlay-left input, #overlay-right input {
    z-index: 10;
}


/* fade in on hover */
#overlay-left:hover::before, #overlay-right:hover::before {
    opacity: 1;
}

/* accept/decline icon colours */
#decline {
    background-image: var(--decline-url);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50px 50px;
    width:75px;
    height:75px;
    z-index: 1;
}

#accept {
    background-image: var(--accept-url);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width:75px;
    height:75px;
    z-index: 1;
}

/* bar animation from codepen */
.barcontainer{
    background-color: #181818;
    position: relative;
    transform: translateY(-50%);
    top: 40%;
    width: 50px;
    float: center;
    z-index: -2;
}
.bar{
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 80%;
    box-sizing: border-box;
    animation: grow 1.5s ease-out forwards;
    transform-origin: bottom;
}
@keyframes grow{
    from{
        transform: scaleY(0);
    }
}

/* throwing animation to the right (accept)*/
@keyframes throwCardRight {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% { /* slight curve right+down */
        transform: translate(70px, 25px) rotate(6deg) scale(1.01);
        opacity: 0.8;
    }
    100% {
        transform: translate(480px, 220px) rotate(18deg) scale(0.95);
        opacity: 0;
    }
}

.throw-right {
    animation: throwCardRight 0.5s cubic-bezier(.25,.46,.45,1) forwards;
}

/* throwing animation to the left (decline)*/
@keyframes throwCardLeft {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    20% { /* slight curve left+down */
        transform: translate(-70px, 25px) rotate(-6deg) scale(1.01);
        opacity: 0.8;
    }
    100% {
        transform: translate(-480px, 220px) rotate(-18deg) scale(0.95);
        opacity: 0;
    }
}

.throw-left {
    animation: throwCardLeft 0.5s cubic-bezier(.25,.46,.45,1) forwards;
}


/* fade in animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
