@import 'vendor/c3.min.css';

$color-control: #0c0073;
$color-variant: #ef746f;

$light-teal: #e1f0f0;
$dark-teal: #007273;

$charcoal-grey: #333;

.abtest-progressbar {
    position: relative;

    &__sample-size {
        width: 100%;
        height: 160px;
    }

    &__sample-size line {
        stroke: black;
        stroke-width: 2px;
    }

    &__sample-size-bg {
        fill: $light-teal;
    }

    &__sample-size-bar {
        fill: $dark-teal;
    }

    &__sample-size-percentage {
        font-weight: bold;
        font-size: 40px;
        fill: white;
    }

    &__sample-size-complete {
        font-size: 17px;
        fill: white;
    }
}

.abtest-results {
    margin-bottom: 20px;
    overflow: auto;

    &__version {
        float: left;
        width: 50%;
        box-sizing: border-box;

        &--control {
            padding-right: 10px;
            color: $color-control;

            a {
                color: $color-control !important;

                &:hover {
                    color: darken($color-control, 10%) !important;
                }
            }
        }

        &--variant {
            right: 0;
            padding-left: 10px;
            color: $color-variant;

            a {
                color: $color-variant !important;

                &:hover {
                    color: darken($color-variant, 10%) !important;
                }
            }
        }

        h3 .icon {
            width: 20px;
            height: 20px;
        }
    }

    &__version-heading {
        height: 30px;
        border-bottom-width: 5px;
        border-bottom-style: solid;
        color: white;
        text-transform: uppercase;
        text-align: center;
        font-size: 15px;
        font-weight: bold;
        line-height: 30px;

        .icon-crown {
            margin-top: 4px;
            margin-right: 1px;
            width: 22px;
            height: 22px;
            vertical-align: -11%;
        }
    }
    &__version--control &__version-heading {
        border-bottom-color: $color-control;
    }
    &__version--variant &__version-heading {
        border-bottom-color: $color-variant;
    }

    &__version--control &__version-heading--winner {
        background-color: $color-control;
    }
    &__version--variant &__version-heading--winner {
        background-color: $color-variant;
    }

    &__version-inner {
        border: 1px solid #eeeeee;
        border-top: none;
        box-sizing: border-box;
        padding: 20px;

        h3 {
            text-transform: uppercase;
            margin-top: 0;
            font-weight: bold;
            font-size: 20px;
        }

        .button span {
            font-weight: bold;
        }
    }

    &__version-stats {
        list-style-type: none;
        margin: 0;
        padding: 0;
        margin-bottom: 30px;

        &:after {
            content: ' ';
            clear: both;
            display: block;
        }
    }

    &__version-stats > li {
        float: left;
        padding-right: 30px;
        margin-top: 30px;
    }

    &__version-stat {
        font-weight: bold;
        font-size: 50px;
    }

    &__version-stat-name {
        text-transform: uppercase;
        font-size: 20px;
        color: $charcoal-grey;
        margin-top: 20px;

        span {
            text-transform: none;
        }
    }
}

.abtest-chart {
    padding-top: 20px;
}
