.body-signup footer,
.body-auth footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    color: white;
    margin: 1rem 0 0;
    opacity: 0;
    animation: loginFadeIn 500ms ease-in-out 700ms forwards;
}

.priority-selection {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.05rem;
}

.pl-2 {
    padding-left: calc(0.25rem * 2);
}

.priority-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    width: 8.5rem;
    height: 3rem;
    border-radius: 0.625rem;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.priority-btn img {
    width: 1.125rem;
    height: 1.125rem;
}

.priority-btn.urgent:hover {
    border-bottom: 2px solid var(--color-priority-urgent);
}

.priority-btn.urgent.active {
    color: #ffffff;
    background-color: var(--color-priority-urgent);
}

.priority-btn.medium:hover {
    border-bottom: 2px solid var(--color-priority-medium);
}

.priority-btn.medium.active {
    color: #ffffff;
    background-color: var(--color-priority-medium);
}

.priority-btn.low:hover {
    border-bottom: 2px solid var(--color-priority-low);
}

.priority-btn.low.active {
    color: #ffffff;
    background-color: var(--color-priority-low);
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

input[type="text"] {
    border-bottom: 0.0625rem solid var(--color-light-gray);
}

.form-group label,
.form-group p {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-menu-item);
}

.form-group label .optional {
    font-weight: 400;
}

.form-group.has-error .input-title,
.form-group.has-error .task-description,
.form-group.has-error .input-with-icon {
    border-color: #ff3d00;
}

.form-group.has-error .dropdown-header {
    border-bottom-color: #ff3d00 !important;
}

.field-error {
    display: none;
    color: red;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.field-error.visible {
    display: block;
}

.input-title {
    width: 100%;
    height: auto;
    border-radius: 0;
    padding: 1rem 1rem 0.5rem 1rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: black;
    background-color: #ffffff;
    transition: border-color 0.2s;

    &:focus {
        border-bottom: 0.0625rem solid var(--main-color) !important;
    }

    &::placeholder {
        color: #d6d6d6;
        font-weight: 400;
        font-size: 1.5rem;
    }
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    border-bottom: 0.0625rem solid var(--color-light-gray);
}

.task-description {
    cursor: pointer;
    margin-top: 1rem;
    width: 100%;
    min-height: 6.5rem;
    box-shadow: rgba(0, 0, 0, 0.04) 0 1px 2px;
    font-size: 0.9rem;
    resize: vertical;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border: 0.0625rem solid var(--color-light-gray);
    border-radius: 0 0.625rem 0.625rem;
    padding: 0.5rem 1rem;
    background: rgb(255, 255, 255);
    outline: none;
    transition: border-color 0.2s;
    gap: 1rem;

    &:focus-within {
        cursor: text;
    }
}

.task-description p {
    margin: 2rem 0 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-menu-item);
}

.calendar-date-picker-input::placeholder {
    color: var(--color-menu-text);
}

div.calendar-date-picker div.calendar {
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%);
    margin-left: 0 !important;
    box-shadow: none !important;
}

div.calendar-date-picker div.calendar div.row-cells div.cell span.first-day,
div.calendar-date-picker div.calendar div.row-cells div.cell span.today {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

div.calendar-date-picker div.calendar div.row-cells div.cell span {
    padding: 4px 0 !important;
}

.task-description p {
    margin: 2rem 0 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-menu-item);
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 12px 12px;
    border-bottom: 1px solid var(--color-light-gray);
    cursor: pointer;
    transition: border-color 0.2s;
    background-color: transparent;
    position: relative;
}

.dropdown-header:hover {
    border-bottom: 1px solid var(--main-color);
}

.dropdown-header.active .dropdown-arrow {
    transform: rotate(180deg);
}

#contactDropdownWrapper .dropdown-header {
    padding: 0;
}

.dropdown-search-input {
    background: transparent;
    font-size: 1rem;
    color: var(--color-menu-text);
    cursor: text;
}

input.dropdown-search-input[type="text"] {
    border-bottom: none;
}

.dropdown-search-input::placeholder {
    color: var(--color-menu-text);
    opacity: 1;
}

.dropdown-display-text {
    font-size: 1rem;
    color: var(--color-menu-text);
}

.dropdown-arrow {
    width: 7px;
    height: 7px;
    padding: calc((1.5rem - 7px) / 2);
    box-sizing: content-box;
    transition: transform 0.2s ease, background-color 0.2s ease;
    margin-right: 0.75rem;
    flex-shrink: 0;
    border-radius: 50%;

    &:hover {
        cursor: pointer;
        background-color: var(--color-menu-active);
    }
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid var(--color-light-gray);
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-content.active {
    display: block;
}

.contact-option {
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    overflow: hidden;

    &:hover {
        background-color: var(--color-menu-active);
    }
}

.contact-option.selected {
    background-color: var(--main-color);

    .contact-option-name,
    .contact-option-email {
        color: #ffffff;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    &:hover {
        background-color: var(--color-primary-button-hover);
    }
}

.contact-option-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
    border: 2px solid white;
    font-weight: 400;
}

.contact-option-info {
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.contact-option-name {
    font-weight: 500;
    color: var(--color-menu-text);
    margin-bottom: 2px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.contact-option-email {
    font-size: 0.8rem;
    color: #666;
    text-overflow: ellipsis;
    overflow: hidden;
}

.contact-option-checkbox {
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-option-checkbox label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.contact-option-checkbox label::before {
    content: url(../assets/icons/unchecked.svg);
    transform: scale(0.8);
    width: 1rem;
    height: 1rem;
    display: block;
}

.contact-option-checkbox label:hover::before {
    cursor: pointer;
}

.contact-option-checkbox input[type="checkbox"] {
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.contact-option-checkbox input[type="checkbox"]:hover + label::before {
    cursor: pointer;
}

.contact-option-checkbox input[type="checkbox"]:checked + label::before {
    content: url(../assets/icons/checked_white.svg);
}

.category-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.category-option:hover {
    background-color: #f5f5f5;
}

.category-option.selected {
    background-color: #e3f2fd;
}

.category-option-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.category-option-name {
    font-weight: 500;
    color: var(--color-menu-text);
    flex-grow: 1;
}

.dropzone {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-chip {
    display: flex;
    align-items: center;
    background-color: transparent;
    border-radius: 50%;
    padding: 2px;
    border: none;
    transition: transform 0.2s ease;
}

.overflow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-variant-over);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    cursor: pointer;
}

.subtask-input-wrapper {
    padding-right: 5rem;
}

.subtask-input-wrapper input {
    width: 100%;
    height: auto;
    border: none;
    border-radius: 0;
    outline: none;

    &::placeholder {
        color: var(--color-menu-text) !important;
    }
}

.subtask-input-wrapper:has(input:focus) {
    border-bottom: 0.0625rem solid var(--main-color);
}

.subtask-input-wrapper input::placeholder {
    color: var(--color-light-gray);
}

.subtask-input-wrapper .subtask-icons {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 0.75rem;
    align-items: center;
    padding-right: 0.75rem;
    pointer-events: none;
}

.subtask-input-wrapper .subtask-icons.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.subtask-input-wrapper .subtask-icons img {
    width: 1rem;
    height: 1rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 150ms ease;
    pointer-events: auto;
}

.subtask-input-wrapper .subtask-icons img:hover {
    opacity: 1;
}

.subtask-input-wrapper .icon-separator {
    width: 0.0625rem;
    height: 1.5rem;
    background-color: var(--color-light-gray);
}

.subtask-list {
    padding: 0 0 0 15px;
    margin: 10px 0 0 1rem;
    color: black;
    max-height: 8rem;
    overflow-y: auto;
}

li {
    position: relative;
}

li::marker {
    position: absolute;
    top: 0;
    font-size: 0.6rem;
}

.subtask-item {
    padding: 2px 0 4px 0;
    transition: background-color 0.2s;
    position: relative;
    line-height: 1.4;
    margin-bottom: 4px;
    list-style-position: outside;

    &:hover {
        cursor: pointer;
        background-color: var(--color-menu-hover);
    }

    img {
        width: 20px;
        height: 20px;

        &:hover {
            cursor: pointer;
        }
    }
}

.subtask-item .subtask-list li::marker:hover {
    background-color: var(--color-menu-hover);
}

.subtask-text {
    display: inline-block;
    font-size: 0.9rem;
    width: calc(100% - 60px);
    line-height: 1.4;
    vertical-align: baseline;
    position: relative;
    top: 2px;
    color: #000;
}

.subtask-item-editing {
    border-bottom: 1px solid var(--main-color);
    display: flex;
    align-items: center;
    padding: 0 !important;
    list-style: none;
    margin-left: calc(-15px - 1rem);
}

.subtask-item-editing .subtask-actions {
    position: static;
    transform: none;
    padding-right: 12px;
}

.subtask-item-editing .subtask-actions img {
    width: 20px;
    height: 20px;

    &:hover {
        cursor: pointer;
    }
}

.subtask-edit-input {
    margin-left: 18px;
    background-color: transparent;
}

.subtask-actions {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.subtask-item .edit-subtask,
.subtask-item .delete-subtask {
    width: 16px;
    height: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
    display: block;
}

.subtask-item .edit-subtask:hover,
.subtask-item .delete-subtask:hover {
    opacity: 1;
}

.subtask-separator {
    width: 1px;
    height: 16px;
    background-color: var(--color-light-gray);
    margin: 0 2px;
}

.icon {
    position: absolute;
    right: 1rem;
    cursor: pointer;
}

.task-added,
.contact-added {
    width: 18.5rem;
    height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    position: fixed;
    position-anchor: --header;
    left: anchor(--header center);
    top: 120vh;
    transform: translate(-50%, -50%);
    background-color: var(--main-color);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 400;
    border-radius: 1.25rem;
    border: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    opacity: 1;
    z-index: 1;

    &::backdrop {
        background-color: transparent;
    }
}

.task-added::after {
    content: "";
    display: inline-block;
    width: 1.375rem;
    height: 1.625rem;
    background-image: url("../assets/menu_icons/board.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
}

.move-animation-add-task {
    animation: move-to-middle 100ms ease forwards;
}

.forward-animation-contact {
    animation: move-to-middle 300ms ease forwards;
}

.backward-animation-contact {
    animation: move-to-back-from-middle 300ms ease forwards;
}

@keyframes move-to-middle {
    0% {
        top: 120vh;
    }

    100% {
        top: 50vh;
        opacity: 1;
    }
}

@keyframes move-to-back-from-middle {
    0% {
        top: 50vh;
        opacity: 1;
    }

    100% {
        top: 120vh;
        opacity: 0;
    }
}

.move-animation-board {
    animation: move-to-middle-then-right 1500ms ease forwards;
}

@keyframes move-to-middle-then-right {
    0% {
        left: 50vw;
        top: 110vh;
    }
    9% {
        top: 50vh;
        left: 50vw;
        opacity: 1;
    }
    54% {
        top: 50vh;
        left: 50vw;
        opacity: 1;
    }
    100% {
        top: 50vh;
        left: 120vw;
        opacity: 0;
    }
}

@keyframes modalSwipeIn {
    100% {
        opacity: 1;
        transform: translate(-100%, -50%);
    }
}

@keyframes modalEditSwipeIn {
    100% {
        opacity: 1;
        transform: translate(0%, -50%);
    }
}

@keyframes modalSwipeOut {
    0% {
        opacity: 1;
        transform: translate(-100%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(0, -50%);
    }
}

@keyframes modalEditSwipeOut {
    0% {
        opacity: 1;
        transform: translate(0%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-100%, -50%);
    }
}

@keyframes loginFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@media (width < 600px) {
    .priority-btn {
        font-size: 16px;
        padding: .5rem .4rem;
        gap: 0.5rem;
        height: 2.75rem;

        img {
            width: 1rem;
            height: 1rem;
        }
    }
}

@media (width >= 812px) {
    .priority-selection {
        gap: 1rem;
    }
}

.heading-with-back {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.heading-with-back h1 {
    margin-bottom: 0 !important;
}

.back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.back-arrow:hover {
    background-color: var(--main-color);
    opacity: 1;
}

.back-arrow:hover img {
    filter: brightness(0) invert(1);
}

.back-arrow img {
    width: 2.5rem;
    height: 2.5rem;
}

.btn-clear,
.btn-cancel,
.btn-delete {
    background-color: #ffffff;
    color: #647188;
    border: 1px solid #647188;
    min-width: fit-content;
    height: 100%;

    &:hover {
        border: 1px solid var(--main-color);
        color: var(--main-color);

    }
}

.btn-clear,
.btn-cancel {
    &:hover {
        border: 1px solid var(--main-color);
        color: var(--main-color);

        &::after {
            background: url('../assets/menu_icons/iconoir_cancel_hover.svg') center center no-repeat;
        }
    }

    &:active {
        border: 1px solid var(--color-primary-button-hover);
        color: var(--color-primary-button-hover);

        &::after {
            background: url('../assets/menu_icons/iconoir_cancel_click.svg') center center no-repeat;
        }
    }

    &::after {
        content: '';
        background: url('../assets/menu_icons/iconoir_cancel.svg') center center no-repeat;
        width: 20px;
        height: 20px;
        transform: scale(1);
    }
}


.btn-clear::before {
    content: 'Clear';
}

.btn-cancel::before {
    content: 'Cancel';
}

.btn-delete::before {
    content: 'Delete';
}

.button-group button,
.form-actions button,
.d-card-footer button {
    padding: 0.5rem 0.75rem;
    border-radius: var(--button-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.25rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.btn-create,
.btn-save,
.confirm-edit-task-btn {
    background-color: var(--main-color);
    color: #ffffff;
    border: none;

    &:hover {
        background-color: var(--color-primary-button-hover);
    }

    &:active {
        background-color: var(--color-primary-button-click);
        color: var(--main-color);

        &::after {
            background: url('../assets/icons/check_blue.svg') center center no-repeat;
        }
    }

    &::after {
        content: '';
        background: url('../assets/menu_icons/check.svg') center center no-repeat;
        width: 20px;
        height: 20px;
        transform: scale(1);
    }
}

.btn-create::before {
    content: 'Create Task';
}

.confirm-edit-task-btn::before {
    content: 'Ok';
}

.d-card-footer-d,
.action-item-d {
    display: flex;
    align-items: center;
    height: 24px;

    &::before {
        content: '';
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        background: url('../assets/icons/delete.svg') center center no-repeat;
        transform: scale(1);
        margin-right: 0.5rem;
    }

    &:active,
    &:hover {
        cursor: pointer;

        &::before {
            background: url('../assets/icons/delete_clicked.svg') center center no-repeat;
        }

        color: var(--main-color);
        font-weight: 700;
    }
}

.d-card-footer-d {
    &::after {
        content: '';
        height: 24px;
        border: 1px solid var(--color-border-gray);
        margin: 0 .5rem;
    }
}

.d-card-footer-e,
.action-item-e {
    display: flex;
    align-items: center;
    height: fit-content;
    width: 64px;

    &::before {
        content: '';
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        background-image: url('../assets/icons/edit.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transform: scale(1);
        margin-right: 0.5rem;
    }

    &::after {
        content: 'Edit';
    }

    &:active,
    &:hover {
        cursor: pointer;

        &::before {
            background-image: url('../assets/icons/edit_clicked.svg');
        }

        color: var(--main-color);
        font-weight: 700;
    }
}
