@import "shared/mixins-and-vars";

.sprite {
    display: block;
    overflow: hidden;
    background-repeat: no-repeat;
    float: left;

    &.card_icons {
        background-image: data-uri("../images/card_icons.png");
        background-size: 88px 83px;
    }

    &.card_icons.amex {
        width: 43px;
        height: 27px;
        background-position: -44px -29px;
    }

    &.card_icons.discover {
        width: 43px;
        height: 27px;
        background-position: 0 -57px;
    }

    &.card_icons.visa {
        width: 44px;
        height: 27px;
        background-position: -45px 0;
    }

    &.card_icons.master {
        width: 43px;
        height: 27px;
        background-position: 0 -29px;
    }

    &.card_icons.debit {
        width: 44px;
        height: 28px;
        background-position: 0 0;
    }
}

.decorative-example {
    min-height: 140px;
    &__icon {
        float: left;
        margin-right: 20px;

        .enable__is-dark-mode & {
            filter: drop-shadow(0px 0px 14px #fff);
        }
    }
}

#svg-sprite-example {
    p {
        text-align: center;
    }

    a {
        display: inline-block;
    }

    ul {
        display: table;
        margin: 0 auto;
        padding-top: 10px;
        padding-bottom: 7px;

        .enable__is-dark-mode & {
            background: @dark-mode-white;
        }
    }

    li {
        margin-right: 10px;
    }

    svg,
    a {
        width: (45 / @px);
        height: (45 / @px);
        display: inline-block;
        &:focus,
        &:focus-within {
            outline-offset: 2px;
        }

        &.svg-sprite-example__scaled-icon {
            svg {
                transform: scale(2);
            }

            &:focus,
            &:focus-within {
                outline-width: 1px;
                outline-offset: -5px;
            }
        }
    }

}

#icon-font-example {
    .center {
        text-align: center;
    }

    ul {
        list-style: none;
        padding: 0;
    }

    a {
        display: inline-block;
        text-decoration: none;
        vertical-align: top;

        small {
            display: block;
            font-size: (10 / @px);
        }
    }

    /*------------------------------------------------------------------
                    SECTION STYLES
  -------------------------------------------------------------------*/

    section {
        margin: 50px 0;
    }

    section ul {
        text-align: center;
    }

    section a {
        padding: 7px;
        color: black;

        .enable__is-dark-mode & {
            color: @dark-mode-white;
        }
    }

    section a:not(:first-child) {
        margin-left: 20px;
    }

    section i {
        vertical-align: middle;
        transition: color 0.3s ease-in-out;
    }

    section a:nth-child(1):hover i {
        color: #3b5998;

        .enable__is-dark-mode & {
            color: #6292f9;
        }
    }

    section a:nth-child(2):hover i {
        color: #4099ff;
    }

    section a:nth-child(3):hover i {
        color: #007bb6;
    }

    section a:nth-child(4):hover i {
        color: #ccc;
    }

    section a:nth-child(5):hover i {
        color: steelblue;
    }

    .p {
        text-align: center;
        margin-top: 120px;
    }
}
