.custom-checklist {
    --check: var(--current-company-color);
    --disabled: #c3c8de;
    --border-radius: 10px;
    background: var(--background);
    border-radius: var(--border-radius);
    position: relative;
    box-shadow: 0 10px 30px rgba(65, 72, 86, 0.05);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    --background: var(--current-theme-secondary-color);
}

.custom-checklist .custom-checklist-label {
    position: relative;
    cursor: pointer;
    width: fit-content;
    transition: color 0.3s ease;
    flex-grow: 1;
}

.custom-checklist input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    height: 15px;
    width: 15px;
    outline: none;
    border: 0;
    margin: 0 15px 0 0;
    cursor: pointer;
    background: var(--background);
    display: grid;
    align-items: center;
}

.custom-checklist input[type="checkbox"]::before,
.custom-checklist input[type="checkbox"]::after {
    content: "";
    position: absolute;
    height: 2px;
    top: auto;
    background: var(--check);
    border-radius: 2px;
}

.custom-checklist input[type="checkbox"]::before {
    width: 0px;
    right: 60%;
    transform-origin: right bottom;
}

.custom-checklist input[type="checkbox"]::after {
    width: 0px;
    left: 40%;
    transform-origin: left bottom;
}

.custom-checklist input[type="checkbox"]:checked::before {
    animation: check-01 0.4s ease forwards;
}

.custom-checklist input[type="checkbox"]:checked::after {
    animation: check-02 0.4s ease forwards;
}

.custom-checklist input[type="checkbox"]:checked + .custom-checklist-label {
    color: var(--disabled);
    animation: move 0.3s ease 0.1s forwards;
}

.custom-checklist
    input[type="checkbox"]:checked
    + .custom-checklist-label::before {
    background: var(--disabled);
    animation: slice 0.4s ease forwards;
}

.custom-checklist
    input[type="checkbox"]:checked
    + .custom-checklist-label::after {
    animation: firework 0.5s ease forwards 0.1s;
}

/*----------------------------------
    CUSTOM CHECKLIST IN ERROR
------------------------------------*/
.custom-checklist-in-error {
    box-shadow: red 0px 0px 7px 0px;
}

/*-----------------------
    CHECKLIST SEPARATOR
-----------------------*/
.custom-checklist-separator {
    cursor: pointer;
    font-size: 30px;
}

.custom-checklist-separator::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(var(--contrast-theme-color-rgb), 0.2);
    z-index: -1;
}

.custom-checklist:has(+ .custom-checklist-separator.selected) {
    border-bottom-left-radius: 0px !important;
    border-bottom-right-radius: 0px !important;
}

.custom-checklist-separator.selected + .custom-checklist {
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
}

.custom-checklist-separator.selected {
    background-color: var(--current-theme-secondary-color);
}

.custom-checklist-separator.selected i {
    padding: 0px 5px;
    background-color: inherit;
}

/*------------------------
    EXERCISE GROUP LIST
-------------------------*/
.exercise-group-list {
    border-left: 1px solid var(--info-color);
    padding-left: 15px;
}

.exercise-group-list .exercise-wrapper-element {
    position: relative;
}

.exercise-group-list .exercise-inner-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -16px;
    width: 15px;
    height: 1px;
    background-color:var(--info-color);
}

/*-----------------------
    KEYFRAMES
-----------------------*/
@keyframes move {
    50% {
        padding-left: 8px;
        padding-right: 0px;
    }

    100% {
        padding-right: 4px;
    }
}

@keyframes slice {
    60% {
        width: 100%;
        left: 4px;
    }

    100% {
        width: 100%;
        left: -2px;
        padding-left: 0;
    }
}

@keyframes check-01 {
    0% {
        width: 4px;
        top: auto;
        transform: rotate(0);
    }

    50% {
        width: 0px;
        top: auto;
        transform: rotate(0);
    }

    51% {
        width: 0px;
        top: 8px;
        transform: rotate(45deg);
    }

    100% {
        width: 5px;
        top: 8px;
        transform: rotate(45deg);
    }
}

@keyframes check-02 {
    0% {
        width: 4px;
        top: auto;
        transform: rotate(0);
    }

    50% {
        width: 0px;
        top: auto;
        transform: rotate(0);
    }

    51% {
        width: 0px;
        top: 8px;
        transform: rotate(-45deg);
    }

    100% {
        width: 10px;
        top: 8px;
        transform: rotate(-45deg);
    }
}

@keyframes firework {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 -2px #4f29f0, 0 0 0 -2px #4f29f0, 0 0 0 -2px #4f29f0,
            0 0 0 -2px #4f29f0, 0 0 0 -2px #4f29f0, 0 0 0 -2px #4f29f0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        box-shadow: 0 -15px 0 0px #4f29f0, 14px -8px 0 0px #4f29f0,
            14px 8px 0 0px #4f29f0, 0 15px 0 0px #4f29f0,
            -14px 8px 0 0px #4f29f0, -14px -8px 0 0px #4f29f0;
    }
}

/*----------------------------
    MEDIA THEME QUERIES
-----------------------------*/
@media (prefers-color-scheme: dark) {
}
@media (prefers-color-scheme: light) {
}
