@import "../../styles/color";
@import "../../styles/sizes";
@import "../../styles/typography";
@import "../../styles/media";

.one-ui-tabs {
    $root: &;
    display: flex;
    box-sizing: border-box;
    max-width: 100%;

    @include media('', 'xsm') {
        .one-ui-tabs-scroll-button {
            display: none;
        }
    }

    &-item {
        flex-shrink: 0;
        margin-right: 4px;

        @include font('s-14');
        @include setRadius('sm', 'border-top-left-radius');
        @include setRadius('sm', 'border-top-right-radius');

        &__wrapper {
            display: flex;
            flex-direction: row;
        }

        &--disabled {
            background-color: color(white, 1, .3);
            opacity: .3;
        }
    }



    &--orientation {
        &-horizontal {
            &#{$root}--viewType{
                &-tabs{
                    .one-ui-tabs-item {
                        &.one-ui-button {
                            color: color(dark, 5);
                            background-color: color(grey, 2, .5);

                            &:hover, &:focus {
                                color: color(dark);
                                background-color: color(grey, 2, .5);
                            }

                            border-bottom-left-radius: 0;
                            border-bottom-right-radius: 0;
                        }

                        &--selected {
                            &.one-ui-button {
                                background-color: color(white);
                                color: color(dark);

                                &:hover, &:focus {
                                    background-color: color(white);
                                    color: color(dark);
                                }
                            }
                        }
                    }
                }
                &-radio-button{
                    width: 100%;
                    #{$root}__container{
                        width: 100%;
                        border-radius: 4px;
                        overflow: hidden;
                    }
                    #{$root}__scroller{
                        width: 100%;
                    }
                    .one-ui-tabs-item {
                        font-size: 13px;

                        &.one-ui-button {
                            flex: 1 1 100%;
                            height: 32px;
                            min-height: 32px;
                            padding: 0;
                            color: color(dark, 5);
                            background-color: color(grey, 2, .5);
                            margin-right: 1px;
                            &:last-child{
                                margin-right: 0;
                            }

                            &:hover, &:focus {
                                color: color(dark);
                                background-color: color(grey, 2, .5);
                            }
                            border-radius: 0;
                        }

                        &--selected {
                            &.one-ui-button {
                                background-color: color(key);
                                color: color(white);

                                &:hover, &:focus {
                                    background-color: color(key,2);
                                    color: color(white);
                                }
                            }
                        }
                    }
                }
            }

        }

        &-vertical {
            flex-direction: column;
            height: 100%;
            background-color: color(grey, 2);

            .one-ui-tabs-item {
                margin-right: 0;
                margin-bottom: 4px;

                &--selected {
                    &.one-ui-button {
                        background-color: color(grey, 2, .5);
                        color: color(dark);
                    }
                }
            }

        }
    }

    &__container {
        display: flex;
        flex-wrap: nowrap;
        flex-direction: inherit;
        flex-grow: 1;
        //transition: ease-in .3s;
        transition: .6s cubic-bezier(0.01, 0.63, 0.02, 1);
        @include media('','xsm'){
            width: auto;
            overflow-y: scroll;
            -webkit-overflow-scrolling: touch;
        }
    }

    &__scroller {
        overflow: hidden;
        white-space: nowrap;
        flex-direction: inherit;
    }
}
