/**
 * link.scss - Theme Base Link Styles
 *
 * This source-code is part of Windows XP stuff for XFCE:
 * <<https://www.oddmatics.uk>>
 *
 * Author(s): Rory Fewell <roryf@oddmatics.uk>
 */

%link,
*:link
{
    color: $link_color;

    &:visited
    {
        color: $link_visited_color;

        *:selected &
        {
            color: mix($selected_fg_color, $link_visited_color, 60%);
        }
    }

    &:hover
    {
        $_fg:  lighten($link_color, 10%);
        color: $_fg;

        *:selected &
        {
            color: mix($selected_fg_color, $_fg, 90%);
        }
    }

    &:active
    {
        color: $link_active_color;

        *:selected &
        {
            color: mix($selected_fg_color, $link_color, 80%);
        }
    }

    &:disabled,
    {
        color: transparentize(desaturate($link_color, 100%), 0.2);
    }

    @at-root %link_selected,
    &:selected,
    *:selected &
    {
        color: mix($selected_fg_color, $link_color, 80%);
    }
}

button:link,
button:visited
{
    @extend %undecorated_button;

    @extend %link;

    &,
    &:focus,
    &:hover,
    &:active,
    &:checked
    {
        @extend %undecorated_button;

        border: 0px;
    }

    > label
    {
        @extend %link;

        text-decoration-line: underline;
    }
}
