$color_A : #039c99;
$color_B : #e44e62;

.swell-block-abTest {

    .swl-tabControl {
        position: relative;
        z-index: 1;
        margin-bottom: -1px;

        .components-button:first-child {
            --wp-admin-theme-color: #{$color_A};
        }

        .components-button:last-child {
            --wp-admin-theme-color: #{$color_B};
        }

        .components-button {
            position: relative;
            display: block;
            width: 50%;
            font-weight: bold;
            letter-spacing: 1px;
            text-align: center;
            box-shadow: var(--swl-box_shadow) !important;
        }

        // .components-button.is-primary {
        //     font-weight: bold;
        // }

        .components-button.is-primary::before {
            position: absolute;
            bottom: -8px;
            left: 50%;
            display: block;
            width: 0;
            height: 0;
            border: 8px solid transparent;
            border-top: 8px solid var(--wp-admin-theme-color);
            border-bottom: 0;
            -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
            opacity: 1;
            transition: opacity .25s;
            content: "";
        }

        .components-button.is-secondary {
            color: #353535;
            background-color: #e9e9e9;
        }

        .components-button:hover {
            color: #fff !important;
            background: var(--wp-admin-theme-color) !important;
        }


    }

    .swell-block-abTest__body {
        margin-top: 0;
        margin-bottom: 0;
        padding: 2em 1.25em !important;

        &::before {
            border: none !important;
        }
    }

    &.tab-a > [data-type="loos/ab-test-b"],
    &.tab-b > [data-type="loos/ab-test-a"] {
        display: none;
    }


    // .swell-block-abTest__a {
    //     border: solid 1px $color_A !important;
    // }

    // .swell-block-abTest__b {
    //     border: solid 1px $color_B !important;
    // }
}


.swl-control--abRate {

    align-items: flex-start;

    .__abLabel {
        font-size: 2em;

        &.-A {
            color: $color_A;
        }

        &.-B {
            color: $color_B;
        }
    }

    // .__abRate {
    //     font-weight: 700;
    // }


    [data-wp-component="FlexItem"] {
        min-width: 3em;
        text-align: center;
    }

    .components-flex-block {
        margin: 0 4px;
    }

    .components-base-control__label,
    .components-base-control__help {
        text-align: center;
    }

    @include pc {

        .components-range-control__number {
            display: none;
        }
    }

    .components-range-control__root {
        flex-wrap: wrap;

        // resetボタン
        > span:last-child {
            margin: 0 auto;
        }
    }

    .components-range-control__wrapper {
        flex-basis: 100%;
    }

    .components-range-control__slider + span {
        background-color: $color_B;
    }

    .components-range-control__track {
        color: $color_A;
    }
}
