.ecm-table {
    border: 1px solid var(--ecm-border-color);
    border-radius: 4px;
    box-shadow: 0px 0.5px 2px 0px rgba(16, 24, 40, 0.15);
    background: var(--ecm-background);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    p {
        margin: 0;
    }

    &__container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 1280px;
    }

    &__sub-header {
        width: 100%;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--ecm-border-color);
        padding-bottom: 10px;
    }

    &__sub-header-left {
        display: flex;
        align-items: center;
        width: 100%;
        .tab {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0px 18px 0px 18px;
            color: var(--ecm-font-color);
            cursor: pointer;
            position: relative;
            font-size: 0.8rem;
            &:after {
                content: '';
                position: absolute;
                left: 0;
                bottom: -22px;
                width: 0;
                height: 1px;
                background: var(--ecm-primary);
                transition: width 0.3s ease, left 0.3s ease, background 0.3s ease;
            }

            &--total {
                background: var(--ecm-secondary);
                padding: 0px 8px;
                font-size: 10px;
                font-weight: 500;
                color: var(--ecm-font-color);
                border-radius: 60px;
            }

            &:hover::after {
                width: 100%;
                left: 0;
            }

            &:hover {
                color: var(--ecm-font-color);
            }
        }

        .is-active {
            cursor: default;
            &:after {
                content: '';
                position: absolute;
                left: 0;
                bottom: -22px;
                width: 100%;
                height: 1px;
                background: var(--ecm-primary);
                transition: width 0.3s ease, left 0.3s ease, background 0.3s ease;
            }

            &:hover::after {
                width: 100%;
                left: 0;
                background: var(--ecm-primary);
            }

            &:hover {
                color: var(--ecm-font-color);
            }
        }
    }

    &__sub-header-right {
        display: flex;
        align-items: center;
        gap: 12px;
        .ecm-table {
            &__sub-header-filter-icon {
                position: relative;
            }
        }
    }

    &-sub-header-actions-right {
        display: flex;
        &--border, &--border-double {
            margin: 0 10px;
            height: 38px;
            width: 1px;
            background: var(--ecm-border-color);
        }
    }

    &--has-slider {
        overflow-x: scroll;
        overflow-y: hidden;
    }

    &__table {
        padding: 24px 0 0 0;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    &__head {
        width: 100%;
        display: flex;
        align-items: center;
        color: var(--ecm-font-color);
        border: 1px solid var(--ecm-border-color);
        border-radius: 6px 6px 0 0;
        width: max-content;
        min-width: 100%;
        > :first-child { border-top-left-radius: 5px; }
        > :last-child { border-top-right-radius: 5px; }
    }

    &__head-cell {
        flex: 1;
        padding: 10px 8px;
        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
        min-height: 30px;
        display: flex;
        align-items: center;
        background: var(--ecm-secondary);
        padding-right: 16px;
        &:nth-child(2) {
            justify-content: flex-start !important;
        }

        &:not(:first-child) {
            justify-content: center;
        }
    }

    &__head-cell-width {
        min-width: 132px;
    }

    &__head-cell-checkbox {
        padding: 11px 14px;
        background: var(--ecm-secondary);
        input {
            width: 16px;
            height: 16px;
            position: relative;
            appearance: none;
            border: 1px solid var(--ecm-font-color);
            border-radius: 3px;
            background: transparent;
            cursor: pointer;
            &:focus {
                outline: none;
                box-shadow: none;
            }

            &::before {
                content: '';
                position: absolute;
                top: 75%;
                left: 57%;
                width: 4px !important;
                height: 8px !important;
                margin: -3px 0 0 -5px !important;
                border: solid var(--ecm-font-color);
                border-width: 0 2px 2px 0;
                transform: rotate(45deg) translate(-50%, -60%);
                opacity: 0;
            }

            &:checked::before {
                opacity: 1;
            }
        }
    }

    &__body-wrap {
        border: 1px solid var(--ecm-border-color);
        border-top: 0;
        border-radius: 0 0 6px 6px;
        width: max-content;
        min-width: 100%;
        display: flex;
        flex-direction: column;
        .content-manager-oops {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }
    }

    &__body-row-wrap {
        width: 100%;
        min-height: 74px;
        display: flex;
        align-items: center;
        padding-left: 12px;
    }

    &__body-row-cell {
        flex: 1;
        padding: 10px 0px;
        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
        min-height: 30px;
        display: flex;
        align-items: center;
        color: var(--ecm-font-color);
        a {
            color: var(--ecm-font-color);
        }

        &:not(:first-child) {
            padding-left: 24px;
            justify-content: center;
        }

        // &:first-child {
        //     // padding-left: 16px;
        // }

        &:nth-child(2) {
            justify-content: flex-start !important;
        }

        .content-manager-dropdown-menu {
            .easy-content-manager-icon {
                &--three-dots-menu {
                    padding: 4px 5px;
                    border: 1px solid var(--ecm-border-color);
                    border-radius: 4px;
                }
            }

            &:focus {
                outline: none;
            }
        }
    }

    &__body-row-cell-width {
        min-width: 130px;
    }

    &__row-cell-hovered {
        display: flex;
        flex-direction: column;
        &:first-child {
            align-items: flex-start;
        }

        .ecm-title-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
            &__title {
                color: var(--ecm-font-color);
            }
            &__inactive {
                display: flex;
                align-items: center;
                gap: 8px;
                color: var(--ecm-text-muted);
            }
        }
    }

    &__row-cell-checkbox {
        max-width: 20px;
        min-width: 20px;
        padding: 5px 10px 5px 0;
        input {
            width: 16px;
            height: 16px;
            position: relative;
            appearance: none;
            border: 1px solid var(--ecm-font-color);
            border-radius: 3px;
            background: transparent;
            cursor: pointer;
            &:focus {
                outline: none;
                box-shadow: none;
            }

            &::before {
                content: '';
                position: absolute;
                top: 75%;
                left: 57%;
                width: 4px !important;
                height: 8px !important;
                margin: -3px 0 0 -5px !important;
                border: 1px solid var(--ecm-font-color);
                border-width: 0 2px 2px 0;
                transform: rotate(45deg) translate(-50%, -60%);
                opacity: 0;
            }

            &:checked::before {
                opacity: 1;
            }
        }
    }

    &__loader {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    &__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 32px 0 0 0;
        .ecm-table {
            &__footer-right {
                display: flex;
                align-items: center;
                gap: 10px;
            }

            &__footer-pagination, &__footer-pagination, &__footer-pagination {
                display: flex;
                align-items: center;
                gap: 10px;
            }
        }
    }

    &__filter-modal {
        &__top-bar {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--ecm-border-color);
            padding-bottom: 16px;
            .content-manager-btn {
                color: var(--content-manager-primary-color);
                padding: 0;
            }
        }

        &__footer {
            width: 100%;
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            align-items: center;
            border-top: 1px solid var(--ecm-border-color);
            padding: 16px 0 0 0;
        }
    }

    &__filter-items {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        padding: 16px 0;
        border-bottom: 1px solid var(--ecm-border-color);
        margin-bottom: 16px;
    }
}

.ecm-table__filter-checked-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--ecm-border-color);
    border-radius: 4px;
    z-index: 9999;
    pointer-events: none;
    input {
        margin-top: 2px;
        pointer-events: visible;
    }

    .ecm-table-filter-item-left {
        display: flex;
        align-items: center;
        gap: 16px;
        .ecm-table-filter-item-title {
            font-size: 14px;
            font-weight: 500;
            line-height: 20px;
            color: var(--ecm-font-color);
        }

        .easy-content-manager-icon {
            pointer-events: visible;
            cursor: pointer;
            &::before {
                font-size: 14px;
            }
        }
    }
}

.ecm-table__body-row-hovered {
    position: relative;
}

.ecm-table__row-cell-hovered {
    &:nth-child(2) {
        align-items: flex-start !important;
    }
}

.ecm-table__hover-action {
    position: absolute;
    left: 51px;
    top: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.ecm-title-wrap {
    transition: transform 0.3s ease;
}

.ecm-table__body-row-hovered:hover .ecm-title-wrap {
    transform: translateY(-16px);
    transition: transform 0.3s ease;
}

.ecm-table__body-row-hovered:hover .ecm-table__hover-action {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

.ecm-table__body-row-hovered:hover {
    background: var(--ecm-secondary);
}

.ecm-table__body-wrap>.ecm-table__body-row-wrap {
    border-bottom: 1px solid var(--ecm-border-color);
    width: max-content;
    min-width: 100%;
}

.ecm-table__body-wrap > :last-child .ecm-table__body-row-wrap:last-child,
.ecm-table__body-wrap > .ecm-table__body-row-wrap:last-child {
    border-bottom: 0;
}
