tabbar {
    background-color: #{'shade(@tab_base_color, 0.95)'};
    @if $color-scheme == "dark" {
        background-color: #{'shade(@tab_base_color, 0.87)'};
    }

    background-image: linear-gradient(to bottom,
            #{'shade(@color_primary, 0.7)'},
            rgba(black, 0.1) 1px,
            transparent rem(2px)
    );
    @if $color-scheme == "dark" {
        background-image: linear-gradient(to bottom,
                #{'shade(@color_primary, 0.5)'},
                rgba(black, 0.1) 1px,
                transparent rem(2px)
        );
    }

    .box {
        @extend %tabheader;

        // Fix showing box shadow from the headerbar
        margin-top: rem(2px);
        // So undershoot doesn't cover the borders
        padding-bottom: rem(2px);

        tabbox {
            background: transparent;
        }
    }

    tab {
        background-clip: padding-box;
        margin: 1px;
        min-height: 24px;
    }

    tabbox > separator.vertical {
      margin: 6px 0;
      border-right: none;
      transition: opacity 150ms ease-in;

      &.hidden {
        opacity: 0;
      }
    }

    .start-action,
    .end-action {
        button {
            margin: rem(3px);
            padding: rem(3px) rem(6px);
        }
    }
}

.tab-drag-icon tab {
    box-shadow:
        outset-highlight(),
        // Intentionally not in ems since it's used as a stroke
        0 0 0 1px scale-color($border-color, $alpha: -20%),
        shadow(1);
    margin: 12px;
}

toolbarview revealer.top-bar {
    tabbar {
        box-shadow: 0 -1px #{'alpha(@highlight_color, 0.2)'};
        background-image: linear-gradient(to bottom,
                #{'@borders'},
                #{'alpha(@borders, 0.5)'} 1px,
                transparent rem(2px)
        );

        .box {
            background-image: linear-gradient(to bottom,
                rgba(black, 0),
                rgba(black, 0) calc(100% - 2px),
                #{'alpha(@borders, 0.05)'} calc(100% - 1px),
                #{'alpha(@borders, 0.25)'}
            );
        }
    }
}
