
@import "src/variables";
@import "@synerty/peek-plugin-base-js/src/styles/_variables";

.task-list {
    display: flex;
    flex-direction: column;
    gap: $general_padding_1;

    &__empty {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: $general_padding_1;
        padding: $general_padding_2;
        font-size: $general_font_size_3;
        color: $font-color-secondary;
    }

    &__items {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    &__item {
        display: flex;
        padding: $general_padding_2;
        background-color: $container-background-color;
        cursor: pointer;
        transition: background-color 0.2s ease;

        &:hover {
            background-color: $grey-color-translucent;
        }

        &--even {
            background-color: $container-background-color;
        }

        &--odd {
            background-color: $grey-color-translucent;
        }

        &--danger {
            background-color: $danger_tr;
        }
        &--info {
            background-color: $info_tr;
        }
        &--success {
            background-color: $success_tr;
        }
        &--warning {
            background-color: $warning_tr;
        }
    }

    &__item-icon {
        flex: 0 0 auto;
        width: $icon-size;
        height: $icon-size;
        display: flex;
        align-items: center;
        color: $general_icon_color;
        margin-right: $general_padding_2;

        svg {
            width: 100%;
            height: 100%;
        }
    }

    &__item-content {
        display: flex;
        min-width: 0;
        flex: 1 1 auto;
        gap: $general_padding_2;

        &-main {
            display: flex;
            flex-direction: column;
            gap: $general_padding_1;
            flex: 1 1 auto;
            min-width: 0;
        }

        &-side {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: $general_padding_1;
            flex: 0 0 auto;
            margin-left: $general_padding_2;
        }
    }

    &__item-title {
        font-size: $general_font_size_2;
        font-weight: $semi-bold;
        color: $font-color-primary;
        word-break: break-word;
    }

    &__item-description {
        color: $font-color-secondary;
        word-break: break-word;
    }

    &__item-more {
        color: $primary-color;
        width: $icon-size;
        height: $icon-size;
    }

    &__item-time {
        font-size: $general_font_size_1;
        color: $font-color-secondary;
        white-space: nowrap;
    }

    &__item-actions {
        display: flex;
        gap: $general_padding_1;
        align-items: flex-start;
        margin-left: $general_padding_2;
    }

    &__action-btn {
        padding: $general_padding_1 $general_padding_2;
        min-width: $general_button_min_width;
        background-color: $primary-color;
        border: none;
        border-radius: $border-radius;
        color: $white;
        cursor: pointer;
        transition: background-color 0.2s ease;

        &:hover {
            background-color: darken($primary-color, 10%);
        }
    }
}