﻿html, body {
    height: 100%;
    margin: 0;
}

.collapsible-sticky-element {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: top 0.2s ease-in-out;
    background-color: whitesmoke;
}

#toggleElement {
    visibility: hidden;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    opacity: 0;
    transition: top 0.2s ease-in-out, opacity 0.2s ease-in-out;
    background-color: var(--color-primary);
}

    #toggleElement.show {
        visibility: visible;
        opacity: 1;
    }

    #toggleElement .bi {
        display: inline-block;
        transition: transform 0.3s ease-in-out;
    }

    #toggleElement.rotate .bi {
        transform: rotate(180deg);
    }

    #toggleElement:hover {
        background-color: var(--color-primary-dark);
    }

    .save-button,
    .cancel-button {
        transition: all 0.3s ease;
    }

.cancel-button {
    color: #fff !important;
    background-color: #dc3545 !important;
}

    .save-button:hover,
    .cancel-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

        .save-button:hover {
            background-color: var(--color-primary-dark) !important;
        }


.task {
    box-shadow: 0 0px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 3rem 3rem 1rem 1rem;
    background-color: white;
    border: 1px solid black;
}

    .task input:not([type="checkbox"]),
    .popup input:not([type="checkbox"]) {
        border: 1px solid rgba(0, 0, 0, 0.0);
        border-bottom: 3px solid var(--bs-gray-500);
    }

    .task input:hover:not([type="checkbox"]),
    .popup input:hover:not([type="checkbox"]) {
        border-bottom: 3px solid var(--color-primary) !important;
    }

    .task input:focus:not([type="checkbox"]),
    .popup input:focus:not([type="checkbox"]) {
        border-bottom: 3px dashed var(--color-primary-dark);
        box-sizing: border-box;
        outline: none !important;
        box-shadow: none !important;
    }

.popup input:not([type="checkbox"]) {
    padding: 0.2rem;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    border-radius: 0 0 0 0;
}

@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.task-header {
    border-radius: 1rem 1rem 0 0;
}

.addTaskButton {
    background-color: white;
    border: 2px solid var(--color-primary);
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
}

    .addTaskButton:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        color: var(--color-primary-dark);
        border: 2px solid var(--color-primary-dark);
    }

    .addTaskButton:active {
        transform: translateY(-3px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border: 2px solid var(--color-secondary);
        color: var(--color-secondary);
    }

.elementContainer {
    min-height: 200px;
    margin: 0;
    padding: 0;
    background-color: lightgray;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    position: relative; /* Allow child elements to be positioned absolutely */
}

.taskButtonContainer {
    margin: 0;
    background-color: white;
    border-radius: 0 0 1rem 1rem;
}

@keyframes fadeInBorderColor {
    from {
        border-color: transparent;
    }

    to {
        border-color: black;
    }
}

.taskButton {
    height: 100%;
    cursor: pointer;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

    .taskButton i {
        z-index: 1;
        position: relative;
        font-size: 2rem;
    }

    .taskButton.plus-c {
        border-radius: 0 0 0 0.9rem;
    }

        .taskButton.plus-c:hover {
            border-left: 1px solid var(--color-primary);
        }

    .taskButton.delete-c {
        border-radius: 0 0 0.9rem 0;
    }

        .taskButton.delete-c:hover {
            color: var(--color-error);
            border-top: 1px solid var(--color-error);
            border-bottom: 1px solid var(--color-error);
            border-right: 1px solid var(--color-error);
        }

    .taskButton:hover {
        color: var(--color-primary-dark);
        border-top: 1px solid var(--color-primary);
        border-bottom: 1px solid var(--color-primary);
        text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
    }

    .taskButton:active {
        color: var(--color-secondary);
        text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
    }

.animate-cog-and-plus-button {
    animation: rotateAndScaleTaskButton 0.4s linear forwards;
}

.animate-eye-button {
    animation: scaleTaskButton 0.2s linear forwards;
}

@keyframes rotateAndScaleTaskButton {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(0.9) rotate(90deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes scaleTaskButton {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}


.popupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    width: max(300px, 50%);
}

.hidden {
    display: none;
}

.taskOptionsButtonContainer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.form-check-input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary-dark);
}

.form-check-input:focus {
    border: 1px solid rgba(0, 0, 0, .25);
    outline: 2px solid var(--color-primary-dark);
    box-shadow: none;
}

.btn:focus {
    box-shadow: none !important;
}

/*Slider Options*/

.taskOptionsSliderContainer {
    position: relative;
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.taskOptionsSliderPoints {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 2px;
    margin: 1rem;
    background: linear-gradient( to right, var(--color-primary) 0%, darkgray 0%);
    pointer-events: none; /*Includes the points as well*/
}

.taskOptionsSliderPoint {
    width: 15px;
    height: 15px;
    background-color: white;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    border: 1px solid darkgray;
}

    .taskOptionsSliderPoint.taskOptionsActive {
        background-color: var(--color-primary);
        border: 1px solid var(--color-primary-dark)
    }

        .taskOptionsSliderPoint.taskOptionsActive:hover {
            background-color: var(--color-primary-dark);
        }

    .taskOptionsSliderPoint:hover {
        background-color: darkgray;
    }

.taskOptionsSliderDescription {
    text-align: center;
    width: 70%;
}

.taskOptionsSliderDescriptionContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}
