@import './colors';
@import './icons';

// tab

@mixin hc-tab() {
    &:focus {
        outline: none;

        a {
            outline: 2px solid transparentize($primary-brand, 0.6);
            outline-offset: -2px;
        }
    }
}

@mixin hc-tab-active() {
    pointer-events: none;
}

@mixin hc-tab-vertical() {
    background-color: $white;
    color: $offblack;
    display: block;
    padding: 20px;
    text-decoration: none;

    &:hover {
        cursor: pointer;
    }
}

@mixin hc-tab-embedded-anchor-focus() {
    box-shadow: none;
    outline: none;
}

@mixin hc-tab-vertical-active() {
    background-color: $slate-gray-100;
    border-left: $blue 8px solid;
    color: $blue;
    font-weight: 600;
    padding-left: 12px;
}

@mixin hc-tab-vertical-tight() {
    padding: 10px 20px;
}

@mixin hc-tab-horizontal() {
    background-color: inherit;
    color: $offblack;
    display: block;
    width: fit-content;
    font-size: 14px;
    min-width: 100px;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;

    &:hover {
        cursor: pointer;
    }
}

@mixin hc-tab-horizontal-active() {
    border-bottom: $blue 4px solid;
    color: $offblack;
    font-weight: bold;
}

@mixin hc-tab-horizontal-tight() {
    padding: 10px;
}

// tab-set

@mixin hc-tab-set-container-horizontal() {
    position: relative;
    height: auto;
    width: 100%;
}

@mixin hc-tab-set-bar-horizontal() {
    align-items: baseline;
    background-color: inherit;
    border-bottom: 1px solid $slate-gray-300;
    display: flex;
    flex-direction: row;
    overflow: hidden;

    &.hc-tab-bar-arrow-overflow {
        width: calc(100% - 68px);
        margin-left: 34px;
    }
}

@mixin hc-more-chevron-down() {
    background-image: url($ico-chev-down-black);
    background-repeat: no-repeat;
    position: relative;
    top: 3px;
}

@mixin hc-ico-chevron-left() {
    background-image: url($ico-chev-left);
    background-repeat: no-repeat;
}

@mixin hc-ico-chevron-right() {
    background-image: url($ico-chev-right);
    background-repeat: no-repeat;
}

@mixin hc-tab-set-content-horizontal() {
    background-color: inherit;
    height: 100%;
    overflow: auto;
    width: 100%;
}

@mixin hc-tab-set-container-vertical() {
    display: flex;
    height: 100%;
    width: 100%;
}

@mixin hc-tab-set-bar-vertical() {
    background-color: $white;
    padding: 15px 0;
    width: 20%;
}

@mixin hc-tab-set-content-vertical() {
    background-color: $slate-gray-100;
    width: 80%;
}

@mixin hc-tab-bar-more() {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    color: $text;

    &:hover {
        background-color: $gray-200;
    }

    &:focus {
        outline: none;
        border-bottom: none;
        box-shadow: 0 0 0 2px transparentize($primary-brand, 0.6);
    }
}

@mixin hc-tab-bar-arrows() {
    padding: 10px 10px;
    min-width: 34px;
    border-radius: 5px;
    cursor: pointer;
    color: $text;

    &.hc-tab-bar-left-arrow {
        position: absolute;
        left: 0;
        top: 5px;
    }

    &.hc-tab-bar-right-arrow {
        position: absolute;
        right: 0;
        top: 5px;
    }

    &.hc-tab-bar-arrow-disabled {
        opacity: 0.25;
        pointer-events: none;
    }

    &:hover {
        background-color: $gray-200;
    }

    &:focus {
        outline: none;
        border-bottom: none;
        box-shadow: 0 0 0 2px transparentize($primary-brand, 0.6);
    }
}
