/*=============== BATTERY ===============*/
.battery{
    height: 100vh;
    display: grid;
    place-items: center;
    margin: 0 1.5rem;

    &__card{
        position: relative;
        width: 100%;
        height: 240px;
        background-color: var(--container-color);
        padding: 1.5rem 2rem;
        border-radius: 1.5rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }
    &__text{
        margin-bottom: .5rem;
    }
    &__percentage{
        font-size: var(--biggest-font-size);
    }
    &__status{
        position: absolute;
        bottom: 1.5rem;
        display: flex;
        align-items: center;
        column-gap: .5rem;
        font-size: var(--smaller-font-size);

        & i{
            font-size: 1.25rem;
        }
    }
    &__pill{
        position: relative;
        width: 75px;
        height: 180px;
        background-color: var(--container-color);
        box-shadow: inset 20px 0px 48px hsl(0, 0%, 16%), 
                    inset -4px 12px 48px hsl(0, 0%, 56%);
        border-radius: 3rem;
        justify-self: flex-end;
    }
    &__level{
        position: absolute;
        inset: 2px;
        border-radius: 3rem;
        overflow: hidden;
    }
    &__liquid{
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 36px;
        background: var(--gradient-color-red);
        box-shadow: inset -10px 0px 12px hsla(0, 0%, 0%, .1), 
                    inset 12px 0px 12px hsla(0, 0%, 0%, .15);
        transition: .3s;

        &::after{
            content: '';
            position: absolute;
            height: 8px;
            background: var(--gradient-color-red);
            box-shadow: inset 0px -3px 6px hsla(0, 0%, 0%, .2);
            left: 0;
            right: 0;
            margin: 0 auto;
            top: -4px;
            border-radius: 50%;
        }
    }
}

/* Full battery icon color */
.green-color{
    background: var(--gradient-color-green);
}

/* Battery charging animation */
.animated-green{
    background: var(--gradient-color-green);
    animation: animated-charging-battery 1.2s infinite alternate;
}

/* Low battery animation */
.animated-red{
    background: var(--gradient-color-red);
    animation: animated-low-battery 1.2s infinite alternate;
}

.animated-green,
.animated-red,
.green-color{
    -webkit-background-clip: text;
    color: transparent;
}

@keyframes animated-charging-battery{
    0%{
        text-shadow: none;
    }
    100%{
        text-shadow: 0 0 6px hsl(92, 90%, 68%);
    }
}

@keyframes animated-low-battery{
    0%{
        text-shadow: none;
    }
    100%{
        text-shadow: 0 0 8px hsl(7, 89%, 46%);
    }
}

/* Liquid battery with gradient color */
.gradient-color-red,
.gradient-color-red::after{
    background: var(--gradient-color-red);
}
.gradient-color-orange,
.gradient-color-orange::after{
    background: var(--gradient-color-orange);
}
.gradient-color-yellow,
.gradient-color-yellow::after{
    background: var(--gradient-color-yellow);
}
.gradient-color-green,
.gradient-color-green::after{
    background: var(--gradient-color-green);
}