/*
 * Copyright (C) 2015 Apple Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */

.scope-radio-button-navigation-item {
    position: relative;

    --scope-radio-button-navigation-item-select-offset-start: 0;
    --scope-radio-button-navigation-item-arrows-margin-start: 4px;
}

.scope-radio-button-navigation-item > .scope-radio-button-item-select {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    -webkit-appearance: none;
    background: transparent;
    color: transparent;
    outline: none;
}

body[dir=ltr] .scope-radio-button-navigation-item > .scope-radio-button-item-select {
    left: var(--scope-radio-button-navigation-item-select-offset-start);
}

body[dir=rtl] .scope-radio-button-navigation-item > .scope-radio-button-item-select {
    right: var(--scope-radio-button-navigation-item-select-offset-start);
}

/* Positions the "Style" text almost exactly over the radio-button-item */
.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus {
    top: -2px;
    border: none;
}

.scope-radio-button-navigation-item > .arrows {
    width: 5px;
    height: 11px;
    pointer-events: none;
    transform: translateY(1px);
}

body[dir=ltr] .scope-radio-button-navigation-item > .arrows {
    margin-left: var(--scope-radio-button-navigation-item-arrows-margin-start);
}

body[dir=rtl] .scope-radio-button-navigation-item > .arrows {
    margin-right: var(--scope-radio-button-navigation-item-arrows-margin-start);
}

.scope-radio-button-navigation-item.selected > .arrows {
    display: inline-block;
}

.scope-radio-button-navigation-item:hover > .arrows {
    color: white;
}
