@keyframes opacityPulse {
    0% {opacity: 1;}
    50% {opacity: 0.5; }
    100% {opacity: 1;}
}

@keyframes barberpole {
    from { background-position: 0 0; }
    to   { background-position: 60px 30px; }
}

@keyframes spin {
    from {transform:rotate(0deg);}
    to {transform:rotate(360deg);}
}

@keyframes highlight {
    0% {background-color: rgba(224,255,226,0);}
    25% {background-color: rgba(224,255,226,1);}
    100% {background-color: rgba(224,255,226,0);}
}
@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

@mixin striped-bg ($color-a:rgba(black, 0.05), $color-b:rgba(0, 0, 0, 0), $direction: 45deg) {
    background-size: 30px 30px;
    background-image: linear-gradient(
        $direction,
        $color-a    25%,
        $color-b    25%,
        $color-b    50%,
        $color-a    50%,
        $color-a    75%,
        $color-b    75%,
        $color-b
    );
    animation: barberpole 0.5s linear infinite;
}

ul.comma-list{
    list-style: none;
    display:inline;
    > li{
        display:inline;
        &:not(:last-child):after {
          content: ", ";
        }
    }
}

input{
    &.input-loading{
        @extend .wpsstm-freeze;
        @include striped-bg();
    }

    &.wpsstm-fullwidth{
        width:100%;
    }
    &[type='checkbox'][readonly]{
        @extend .wpsstm-freeze;
    }
}

.wpsstm-no-underline{
    text-decoration:none;
    border-bottom:none!important; //fix for twentyfifteen
}

.wpsstm-can-click{
    cursor: pointer;
    cursor: hand;
}

.wpsstm-freeze{
    pointer-events: none;
    opacity:.5;
}

.wpsstm-icon{
    &:before{
        font-weight: normal;
        font-style: normal;
        font-family: 'FontAwesome';
        width: 1.28571429em;
        text-align: center;
        display: inline-block;
    }
}

.wpsstm-loading-icon{
    @extend .wpsstm-icon;
    &:before{
        animation: spin 2s linear infinite;
        content: "\f1ce"!important; //.fa-circle-o-notch;
    }
}

.wpsstm-action-icon{
    a{
        @extend .wpsstm-icon;
        &:before{
            margin-right:0;
        }
        > span{
            display:none;
        }
    }
}

.wpsstm-ellipsis{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wpsstm-icon-input{
    position:relative;
    margin: 0.5em;
    input{
        padding: 0.5em;
        &[type="text"]{
            padding-right:4em;
        }

    }
    [type="submit"]{ //input & button
        position: absolute;
        top:0;
        right: 0;
        border: none;
        @extend .wpsstm-can-click;
        &.wpsstm-icon-button{
            display: block;
            height: 100%;
            box-sizing: border-box;
            padding: 0 2em;
        }
    }
}

.wpsstm-block-notice{
    background: #fff3d4;
    border:0px solid #f6b73c;
    border-left-width: 5px;
    padding:.75em;
    position:relative;
    z-index:10;
    display:flex;
    > *{
        flex:1;
        &.wpsstm-close-notice{
            flex-grow:0;
            text-align:center;
        }
    }
}

.wpsstm-align-both{
    display:flex;
    justify-content: center;
    align-items:center;
}
