$border-spacing: 0.2rem;

.historico-apontamentos-component {
    .historico-apontamentos-content {
        right: 5.5rem !important;
    }

    .tabs-link-container {
        display: flex;
        justify-content: flex-start;
        padding-bottom: 2rem;
        max-width: 50rem;
        position: relative;
        height: auto;
        overflow: hidden;

        @media screen and (max-width: 1600px) {
            width: 48rem;
        }

        @media screen and (max-width: 1400px) {
            width: 40rem;
        }
    }

    .tab-link-veiculo {
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
        padding-bottom: 0.5rem;
        color: darken($color-smoke-dark, 20%);

        &:hover {
            color: darken($color-smoke-extra-dark, 40%);

            .linha {
                background-color: darken($color-smoke-extra-dark, 40%);
            }
        }

        .tab-link-content {
            padding: 1rem;
            width: 9rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            flex-grow: 1;
        }

        .icone-veiculo {
            font-size: 3rem;
        }

        .identificador-veiculo {
            font-size: 1rem;
            text-align: center;
        }

        .linha {
            width: 100%;
            border: none;
            background-color: darken($color-smoke-dark, 20%);
            height: 0.2rem;
            overflow: visible;
            text-align: center;
            position: relative;
        }

        &.active {
            color: $color-main;

            .linha {
                background-color: $color-main;
                &:after {
                    content: "";
                    @include triangle(1.4rem, $color-main, down);
                    display: inline-block;
                    position: absolute;
                    left: 0;
                    right: 0;
                    margin: auto;
                }
            }
        }
    }

    .tabs-content-container {
        position: relative;
        margin-bottom: 0.5rem;
        width: 50rem;
        height: 65rem;

        @media screen and (max-height: 1080px) {
            height: 65rem;
        }

        @media screen and (max-height: 1024px) {
            height: 55rem;
        }

        @media screen and (max-height: 900px) {
            height: 45rem;
        }

        @media screen and (max-height: 768px) {
            height: 35rem;
        }

        @media screen and (max-width: 1600px) {
            width: 48rem;
        }

        @media screen and (max-width: 1400px) {
            width: 41rem;
        }

    }

    .tab-content-veiculo {
        position: absolute;
        display: none;
        width: 100%;
        height: 100%;

        &.active {
            display: block;
        }
    }

    .table-scrollable-container {
        border-top: 5.7rem solid transparent;
        border-bottom: none;
        height: 100%;
    }

    .table-scrollable-wrapper {
        height: 100%;
    }

    .table-apontamentos {
        @extend .table-default;
        border-spacing: $border-spacing;
        border-collapse: separate;
        background-color: $color-snow;

        thead tr th {
            color: transparent;
            padding: 0;
            font-family: inherit;

            .heading-content {
                font-weight: bold;
                font-size: 1.1rem;
                padding: 1rem 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            &:nth-child(1) .heading-content {
                background: $color-snow;
            }

            &:nth-child(2) .heading-content {
                background: $color-snow-extra-dark;
            }

            .icone-tempo-em-operacao {
                margin-right: 0.5rem;
                color: $color-featured;
                vertical-align: middle;
                font-size: 1.4rem;
                margin-left: 1rem;
            }

            .icon-editar {
                padding-left: 1rem;
            }
        }

        tbody tr th {
            color: transparent;
            padding: 0;
            font-family: inherit;

            .heading-content {
                border-left: $border-spacing solid $color-snow;
                color: darken($color-smoke-dark, 50%);
                background: lighten($color-main-neutral, 12%);
                padding: 0.5rem 1rem;
                margin-left: -$border-spacing;
            }
        }

        tbody tr th div {
            top: 3.8rem;
        }

        tr {
            &:nth-child(2) td {
                font-weight: bold;
                background: $color-smoke-dark;
            }
            &:nth-child(even) td {
                background: $color-snow-extra-dark;
            }

            &:hover td {
                background-color: $color-hovered;
            }

            td {
                font-size: 1.1rem;
                color: darken($color-smoke-dark, 50%);
                text-overflow: ellipsis;
                overflow: hidden;
                border: none;
                max-width: 12rem;
            }
        }

        tr td, tr th {

            @media screen and (max-width: 1600px) {
                font-size: 1.1rem;
            }

            @media screen and (max-width: 1400px) {
                font-size: 0.9rem;
            }
        }
    }
}
