@import '~@thumbtack/thumbprint-tokens/dist/scss/_index';

.root {
    position: relative;
    display: flex;

    &RadioVerticalAlignTop {
        align-items: flex-start;
    }

    &RadioVerticalAlignCenter {
        align-items: center;
    }
}

.input {
    position: absolute;
    opacity: 0;
    z-index: -1;
    width: 1px;
    height: 1px;

    &:focus ~ .radioImage {
        box-shadow: 0 0 0px 4px $tp-color__gray-300;
    }
}

.radioImage {
    width: 20px;
    height: 20px;
    border-radius: $tp-border-radius__full;

    // Margin that makes the input appear decently aligned against
    // various Thumbprint <Text> sizes
    .rootRadioVerticalAlignTop & {
        margin-top: 1px;
    }

    .rootRadioVerticalAlignCenter & {
        margin-top: -1px;
    }
}

.text {
    // This must take up the remaining available space for content that must be right-aligned.
    flex: 1 0 0%;
    // 'min-width' is needed to allow text within the radio to truncate.
    min-width: 0;
    font-size: $tp-font__body__1__size;
    font-weight: 400;
    padding-left: 8px;
}
