@import './styles/common';
@import './styles/variables';
@import './styles/scrollbar';
@import './styles/columns';
@import './styles/cell';
@import './styles/icon';
@import './styles/draggable';

.table-grid {
    height: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--ngx-table-background-color);

    &__column-area-content {
        display: flex;
    }

    &__header-sticky,
    &__footer-sticky {
        background: var(--ngx-table-header-footer-background-color);
        position: sticky;
        z-index: 1000;
        width: 100%;
    }

    &__header-sticky {
        top: 0;
        left: 0;

        .table-grid__header-expandable {
            position: relative;
            padding-right: 40px;
        }

        &--expand-button-wrapper {
            position: absolute;
            height: 24px;
            top: 50%;
            right: 8px;
            user-select: none;
            font-weight: 400;
            font-size: 15px;
            transform: translateY(-50%);

            &:hover {
                background-color: rgba(0, 0, 0, 0.04);
            }
        }

        & &--expand-button {
            cursor: pointer;
            color: #000;
            transition: 0.2s all;
            height: 24px;
            width: 24px;
            font-size: 24px;
            line-height: 1;

            &--expanded {
                transform: rotate(180deg);
            }
        }
    }

    &__footer-sticky {
        bottom: 0;
        left: 0;

        .table-grid__table-content-place {
            border-top: 1px solid var(--ngx-table-header-footer-border-color);
            border-bottom: none;
        }
    }

    &__table-content-place {
        color: #000;
        border-bottom: 1px solid var(--ngx-table-header-footer-border-color);

        &--content-cell {
            box-sizing: border-box;
            display: flex;
            overflow: hidden;
            padding: 5px 20px;

            .content-box {
                display: flex;
                vertical-align: middle;
                box-sizing: border-box;
                margin: auto 0;
            }
        }

        &--align-center {
            justify-content: center;
            text-align: center;

            .content-box {
                text-align: center;
            }
        }

        &--bold {
            font-weight: bold;
        }
    }
}

.table-grid__cell--inner-content {
}

.table-grid__scroll-offset {
    .table-grid__header-cell {
        transition: box-shadow 0.3s ease-in-out;
        box-shadow: 0 3px 2px -2px rgb(224, 224, 224);
    }
}

.table-grid__scroll-offset .table-grid__cell--inner-content {
    visibility: visible;
    opacity: 1;
}

.table-grid__scroll-offset .table-grid__cell--inner-content {
    transition-duration: 0ms;
}

.table-grid__no-display {
    // don't use [display: none]
    // for correct work mutation observer
    opacity: 0.012 !important;
}

.table-grid__no-visible {
    display: none !important;
}
