// Import any global variables from "../../variables/*.scss"
@import '../../variables/colors.scss';
@import '../../variables/fonts.scss';
@import '../../variables/grid.scss';

$percentageBarContainerHeight: 43px; // The "row height" of the container
$percentageBarHeight: 4px; // The height of the shaded bar itself within the container
$percentageBarPercentageTextSpacing: 8px; // Spacing to the left of the formatted percentage

.percentageBarContainer {
    font-family: $fontBase;
    display: flex;
    flex-direction: row;
    width: 100%;

    color: $midnight;
    line-height: $percentageBarContainerHeight;
}

// The utilization bar that visually represents space utilization in a horizontal fashion
.percentageBar {
    // overridden in media query below
    display: none;
    background-color: $gray200;

    width: 100%;
    height: $percentageBarHeight;
    flex: 1;

    margin-top: ($percentageBarContainerHeight - $percentageBarHeight) / 2;

    @media (min-width: $screenXsMax) {
        display: inline-block;
    }
}
.percentageBarColoredSection {
    // a width is set as an inline style in the component, which overrides the style set below
    width: 0%;

    background-color: $midnight;
    height: $percentageBarHeight;
    transition: all 250ms ease-in-out;
}

.percentageBarText {
    width: 32px;
    margin-right: $percentageBarPercentageTextSpacing;
    font-weight: bold;
    font-size: 14px;

    @media (min-width: $screenXsMax) {
        text-align: right;
        width: 48px;
    }
}

.percentageBarTextDisabled {
    color: $gray300;
    font-size: $fontSizeLarge;
}

.contextListView.percentageBar {
    height: 9px;
    border-radius: 5px;
    margin-top: ($percentageBarContainerHeight - 8px) / 2;
}
.contextListView.percentageBarColoredSection {
    background-color: $blue;
    height: 9px;
    border-radius: 5px;

    &.isSubOnePercent {
        border-top-left-radius: 9px;
        border-bottom-left-radius: 9px;
    }
}

.contextListView.percentageBarText {
    color: $gray600;
    font-weight: 500;
    font-size: 14px;
}
