﻿.password-wrapper {
    position: relative;
}

    .password-wrapper.has-strength-indicator {
        margin-bottom: 30px;
    }

.password-strength-indicator {
    -webkit-transition: all 0.2s linear;
    transition: all 0.2s linear;
    content: 'ok';
    display: block;
    opacity: 0;
    width: 100%;
    height: 3px;
    position: absolute;
    bottom: -8px;
    border-radius: 2px;
    background: -webkit-linear-gradient(left, #ff1821 0%, #ff6900 25%, #ffb400 50%, #ffeb00 75%, #78b900 100%);
    background: -o-linear-gradient(left, #ff1821 0%, #ff6900 25%, #ffb400 50%, #ffeb00 75%, #78b900 100%);
    background: -ms-linear-gradient(left, #ff1821 0%, #ff6900 25%, #ffb400 50%, #ffeb00 75%, #78b900 100%);
    background: linear-gradient(to right, #ff1821 0%, #ff6900 25%, #ffb400 50%, #ffeb00 75%, #78b900 100%);
}

    .password-strength-indicator:before {
        content: 'weak';
        margin-top: 4px;
        float: left;
        text-transform: uppercase;
        font-size: 0.7em;
        color: #ff1821;
    }

    .password-strength-indicator:after {
        content: 'strong';
        margin-top: 4px;
        float: right;
        text-transform: uppercase;
        font-size: 0.7em;
        color: #78b900;
    }

    .password-strength-indicator .slider {
        width: 0;
        height: 0;
        position: absolute;
        top: -5px;
        -webkit-transition: all 0.3s linear;
        transition: all 0.3s linear;
        border-left: solid 5px transparent;
        border-right: solid 5px transparent;
        border-top: solid 5px;
    }

.password {
    -webkit-transition: all 0.3s linear;
    transition: all 0.3s linear;
}

    .password[data-password-strength] ~ .password-strength-indicator {
        opacity: 1;
    }

    .password[data-password-strength="0"] {
        border-color: #ff1821 !important;
    }

        .password[data-password-strength="0"]:focus {
            box-shadow: 0 0 4px #ff1821 !important;
        }

        .password[data-password-strength="0"] ~ .password-strength-indicator .slider {
            left: 1%;
            border-top-color: #ff1821;
        }

    .password[data-password-strength="1"] {
        border-color: #ff6900 !important;
    }

        .password[data-password-strength="1"]:focus {
            box-shadow: 0 0 4px #ff6900 !important;
        }

        .password[data-password-strength="1"] ~ .password-strength-indicator .slider {
            left: 25%;
            border-top-color: #ff6900;
        }

    .password[data-password-strength="2"] {
        border-color: #ffb400 !important;
    }

        .password[data-password-strength="2"]:focus {
            box-shadow: 0 0 4px #ffb400 !important;
        }

        .password[data-password-strength="2"] ~ .password-strength-indicator .slider {
            left: 50%;
            border-top-color: #ffb400;
        }

    .password[data-password-strength="3"] {
        border-color: #ffeb00 !important;
    }

        .password[data-password-strength="3"]:focus {
            box-shadow: 0 0 4px #ffeb00 !important;
        }

        .password[data-password-strength="3"] ~ .password-strength-indicator .slider {
            left: 75%;
            border-top-color: #ffeb00;
        }

    .password[data-password-strength="4"] {
        border-color: #78b900 !important;
    }

        .password[data-password-strength="4"]:focus {
            box-shadow: 0 0 4px #78b900 !important;
        }

        .password[data-password-strength="4"] ~ .password-strength-indicator .slider {
            left: auto;
            right: 1%;
            border-top-color: #78b900;
        }

.password-complexity-indicator {
    margin-top: 4px;
    line-height: initial;
    min-height: 18px;
}

    .password-complexity-indicator:after {
        visibility: hidden;
        display: block;
        content: "";
        clear: both;
        height: 0;
    }

    .password-complexity-indicator > div {
        -webkit-transition: all 0.2s linear;
        transition: all 0.2s linear;
        float: left;
        opacity: 0.5;
        padding: 2px 4px;
        color: #fff;
        font-size: 10px;
        background: rgba(0, 0, 0, 0.6);
        background-clip: padding-box;
        border-left: solid 1px transparent;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
    }

.password.complexity-parameters-1 + .password-complexity-indicator > div {
    width: 100%;
}

.password.complexity-parameters-2 + .password-complexity-indicator > div {
    width: 50%;
}

.password.complexity-parameters-3 + .password-complexity-indicator > div {
    width: 33.333333%;
}

.password.complexity-parameters-4 + .password-complexity-indicator > div {
    width: 25%;
}

.password.complexity-parameters-5 + .password-complexity-indicator > div {
    width: 20%;
}

.password-complexity-indicator > div:first-child {
    border-left: 0;
}

.password[data-uppercase="true"] ~ .password-complexity-indicator .password-requirement-uppercase {
    display: block;
    opacity: 1;
    background-color: #487427;
}

.password[data-lowercase="true"] ~ .password-complexity-indicator .password-requirement-lowercase {
    display: block;
    opacity: 1;
    background-color: #487427;
}

.password[data-number="true"] ~ .password-complexity-indicator .password-requirement-number {
    display: block;
    opacity: 1;
    background-color: #487427;
}

.password[data-length="true"] ~ .password-complexity-indicator .password-requirement-length {
    display: block;
    opacity: 1;
    background-color: #487427;
}

.password[data-special-char="true"] ~ .password-complexity-indicator .password-requirement-special-char {
    display: block;
    opacity: 1;
    background-color: #487427;
}

    .password[data-uppercase="true"] ~ .password-complexity-indicator .password-requirement-uppercase:before,
    .password[data-lowercase="true"] ~ .password-complexity-indicator .password-requirement-lowercase:before,
    .password[data-number="true"] ~ .password-complexity-indicator .password-requirement-number:before,
    .password[data-length="true"] ~ .password-complexity-indicator .password-requirement-length:before,
    .password[data-special-char="true"] ~ .password-complexity-indicator .password-requirement-special-char:before {
        content: ' \2713';
        display: inline-block;
        margin-right: 4px;
        line-height: 10px;
    }

.password[data-uppercase="true"][data-lowercase="true"][data-number="true"][data-length="true"] {
    border-color: #78b900 !important;
}

    .password[data-uppercase="true"][data-lowercase="true"][data-number="true"][data-length="true"]:focus {
        box-shadow: 0 0 4px #78b900 !important;
    }

    .password[data-uppercase="true"][data-lowercase="true"][data-number="true"][data-length="true"] ~ .password-complexity-indicator > div {
        background-color: #78b900 !important;
    }

.password-wrapper .btn-show-password {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    color: #888;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    cursor:pointer
}
