/* -------------------------------- 

File#: _1_password
Title: Password Visibility Control
Descr: Password input field with option to toggle password visibility
Usage: codyhouse.co/license

-------------------------------- */
:root {
    --password-btn-width: 3.5em;
    --password-icon-size: 1.5em
}

.password {
    position: relative
}

.password__input {
    height: 100%
}

.password__btn {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    height: 100%;
    width: var(--password-btn-width);
    background-color: rgba(255, 255, 255, 0);
    justify-content: center;
    align-items: center;
    display: none
}

.password__btn:focus {
    color: var(--color-primary)
}

.password__btn-label:last-child {
    display: none
}

.password__btn-label .icon {
    width: var(--password-icon-size);
    height: var(--password-icon-size)
}

.password--text-is-visible .password__btn-label:first-child {
    display: none
}

.password--text-is-visible .password__btn-label:last-child {
    display: inline-block
}

.password__input {
    padding-right: calc(var(--space-sm) + var(--password-btn-width))
}

.password__input::-ms-reveal {
    display: none
}

.password__btn {
    display: flex
}

/* -------------------------------- 

File#: _2_password-strength
Title: Password Strength Indicator
Descr: Password requirements and strength indicator
Usage: codyhouse.co/license

-------------------------------- */
:root {
    --password-strength-meter-height: 8px;
    --password-strength-meter-radius: 50em;
    --password-strength-icon-size: 16px;
    --password-strength-icon-margin-right: 4px;
    --password-strength-icon-stroke-width: 2px
}

.password-strength__req {
    line-height: 1.2;
    margin-bottom: var(--space-4xs);
    display: flex;
    align-items: center
}

.password-strength__req .icon {
    font-size: var(--password-strength-icon-size);
    margin-right: var(--password-strength-icon-margin-right)
}

.password-strength__icon-group {
    stroke-width: var(--password-strength-icon-stroke-width)
}

.password-strength__icon-group * {
    transition: transform 0.3s var(--ease-out-back), stroke-dashoffset 0.3s var(--ease-out-back);
    transform-origin: 8px 8px;
    stroke-dasharray: 16
}

.password-strength__icon-group *:first-child {
    stroke-dashoffset: 24
}

.password-strength__icon-group *:last-child {
    stroke-dashoffset: 10
}

.password-strength__req--met {
    color: var(--color-success-darker);
    transition: color 0.3s
}

.password-strength__req--met .password-strength__icon-group *:first-child {
    stroke-dashoffset: 23;
    transform: translateX(-2px) translateY(4px) rotate(45deg)
}

.password-strength__req--met .password-strength__icon-group *:last-child {
    stroke-dashoffset: 5;
    transform: translateX(-2px) translateY(4px) rotate(-45deg)
}

.password-strength__req--no-met {
    color: var(--color-error)
}

.password-strength__req--no-met .password-strength__icon-group *:first-child {
    stroke-dashoffset: 32;
    transform: translateX(5px) translateY(5px) rotate(45deg)
}

.password-strength__req--no-met .password-strength__icon-group *:last-child {
    stroke-dashoffset: 2;
    transform: translateX(-5px) translateY(5px) rotate(-45deg)
}

.password-strength__meter {
    height: var(--password-strength-meter-height);
    border-radius: var(--password-strength-meter-radius);
    overflow: hidden
}

.password-strength__meter * {
    will-change: width;
    transition: width 0.3s var(--ease-in-out), background-color 0.3s
}

.password-strength__meter--fill-1 * {
    background-color: var(--color-error)
}

.password-strength__meter--fill-2 * {
    background-color: var(--color-warning)
}

.password-strength__meter--fill-3 * {
    background-color: var(--color-success)
}

.password-strength__meter--fill-4 * {
    background-color: var(--color-success)
}

/* -------------------------------- 

File#: _1_file-upload
Title: File Upload
Descr: Custom file input element used to select and upload a file
Usage: codyhouse.co/license

-------------------------------- */
.file-upload__input {
    /* visually hide input file element */
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    width: 1px;
    height: 1px
}

.file-upload__text--has-max-width {
    /* set a max width to the label text */
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

/* -------------------------------- 

File#: _1_choice-images
Title: Choice Images
Descr: Selectable images that behave like radio/checkbox buttons
Usage: codyhouse.co/license

-------------------------------- */
:root {
    --choice-img-input-size: 85px;
    --choice-img-input-icon-size: 24px
}

.choice-img {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    -webkit-user-select: none;
    user-select: none;
    transition: 0.3s
}

.choice-img:hover {
    cursor: pointer;
    box-shadow: var(--shadow-md)
}

.choice-img:active {
    transform: translateY(2px)
}

.choice-img[aria-checked=true] {
    transition: transform 0.3s;
    box-shadow: var(--shadow-sm), 0 0 0 2px var(--color-primary)
}

.choice-img__input {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(1px, -1px);
    background-color: var(--color-primary);
    width: var(--choice-img-input-size);
    height: var(--choice-img-input-size);
    -webkit-clip-path: polygon(15% 0%, 100% 0%, 100% 85%);
    clip-path: polygon(15% 0%, 100% 0%, 100% 85%);
    pointer-events: none;
    opacity: 0
}

.choice-img__input .icon {
    position: absolute;
    top: calc(var(--choice-img-input-size) / 4 - var(--choice-img-input-icon-size) / 2);
    right: calc(var(--choice-img-input-size) / 4 - var(--choice-img-input-icon-size) / 2);
    font-size: var(--choice-img-input-icon-size);
    color: var(--color-white)
}

.choice-img__input .icon>* {
    transition: stroke-dashoffset 0.3s;
    stroke-dasharray: 18;
    stroke-dashoffset: 18
}

.choice-img[aria-checked=true] .choice-img__input {
    opacity: 1
}

.choice-img[aria-checked=true] .choice-img__input .icon>* {
    stroke-dashoffset: 0
}

/* -------------------------------- 

File#: _1_choice-buttons
Title: Choice Buttons
Descr: Visually enhanced radio/checkbox buttons
Usage: codyhouse.co/license

-------------------------------- */
:root {
    --choice-btn-border-width: 1px;
    --choice-btn-border-radius: var(--radius-md);
    --choice-btn-align-items: center;
    --choice-btn-input-size: 20px;
    --choice-btn-input-icon-size: 16px;
    --choice-btn-input-border-width: 1px;
    --choice-btn-input-margin-right: var(--space-sm);
    --choice-btn-input-translate-y: 0em
}

.choice-btn__grid {
    display: none
}

.choice-btn__fallback {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%)
}

.choice-btn {
    position: relative;
    background-color: var(--color-bg-light);
    border-radius: var(--choice-btn-border-radius);
    box-shadow: 0 0 0 var(--choice-btn-border-width) var(--color-contrast-lower);
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    transition: 0.2s
}

.choice-btn.choice-btn--focus,
.choice-btn.choice-btn--checked,
.choice-btn:active {
    box-shadow: 0 0 0 2px var(--color-primary)
}

.choice-btn.choice-btn--focus,
.choice-btn:active {
    box-shadow: 0 0 0 2px var(--color-primary), 0 0 0 4px hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.2)
}

.choice-btn__grid {
    display: block;
    display: grid;
    grid-template-columns: var(--choice-btn-input-size) 1fr;
    grid-gap: var(--choice-btn-input-margin-right);
    align-items: var(--choice-btn-align-items)
}

.choice-btn__input {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-bg-light);
    width: var(--choice-btn-input-size);
    height: var(--choice-btn-input-size);
    border-width: var(--choice-btn-input-border-width);
    border-style: solid;
    border-color: hsla(var(--color-contrast-low-h), var(--color-contrast-low-s), var(--color-contrast-low-l), 0.65);
    box-shadow: var(--shadow-xs);
    position: relative;
    top: var(--choice-btn-input-translate-y);
    transition: 0.2s
}

.choice-btn__input .icon {
    color: var(--color-white);
    font-size: var(--choice-btn-input-icon-size)
}

.choice-btn:hover:not(.choice-btn--checked) .choice-btn__input {
    border-color: hsla(var(--color-contrast-low-h), var(--color-contrast-low-s), var(--color-contrast-low-l), 1)
}

.choice-btn--checked .choice-btn__input {
    border-color: var(--color-primary);
    background-color: var(--color-primary)
}

.choice-btn__input--checkbox {
    border-radius: 4px
}

.choice-btn__input--checkbox .icon>* {
    transition: stroke-dashoffset 0.3s;
    stroke-dasharray: 18;
    stroke-dashoffset: 18
}

.choice-btn--checked .choice-btn__input--checkbox .icon>* {
    stroke-dasharray: 18;
    stroke-dashoffset: 0
}

.choice-btn__input--radio {
    border-radius: 50%
}

.choice-btn__input--radio .icon {
    transition: transform 0.3s var(--ease-out-back);
    transform: scale(0)
}

.choice-btn--checked .choice-btn__input--radio .icon {
    transform: scale(1)
}

/* -------------------------------- 

File#: _1_steps-v2
Title: Steps v2
Descr: Multi-step navigation with bar indicator
Usage: codyhouse.co/license

-------------------------------- */
:root {
    --steps-v2-steps-nr: 10
        /* number of steps */
}

@supports (--css: variables) {
    .steps-v2__indicator {
        position: relative;
        height: 8px;
        border-radius: 50em;
        background-color: var(--color-contrast-lower)
    }

    .steps-v2__indicator::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: calc(100% / var(--steps-v2-steps-nr) * var(--step-v2-current-step, 1));
        background-color: var(--color-primary);
        border-radius: inherit;
        transition: width 0.2s
    }
}

/* -------------------------------- 

File#: _1_form-validator
Title: Form Validator
Descr: A plugin to validate form fields
Usage: codyhouse.co/license

-------------------------------- */
.form-validate__error-msg {
    display: none
}

.form-validate__input-wrapper--error .form-validate__error-msg {
    display: block
}

/* -------------------------------- 

File#: _3_wizard-form
Title: Wizard Form
Descr: Multi-step form
Usage: codyhouse.co/license

-------------------------------- */
.wiz-form {
    display: flex;
    flex-direction: column;
    height: 70vh;
    height: 70dvh
}

@media (min-width: 64rem) {
    .wiz-form {
        height: 87vh;
        height: 87dvh
    }
}

.wiz-form,
.wiz-form__body {
    position: relative;
    z-index: 1;
    overflow: hidden
}

.wiz-form__body {
    flex-grow: 1
}

.wiz-form__footer {
    flex-shrink: 0
}

.wiz-form__step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.3s var(--ease-out), opacity 0.3s
}

.wiz-form__step--prev,
.wiz-form__step--next {
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease-out), opacity 0.3s, visibility 0s 0.3s
}

.wiz-form__step--prev {
    transform: translateX(-40px)
}

.wiz-form__step--next {
    transform: translateX(40px)
}

/* --fixed height */
.wiz-form--fixed-height {
    height: 480px
}

@media (min-width: 64rem) {
    .wiz-form--fixed-height {
        height: 620px
    }
}
















:root {
    --choice-tag-icon-size: 16px
}

.choice-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 50em;
    box-shadow: 0 0 0 1px var(--color-contrast-lower);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: 0.2s
}

.choice-tag:hover {
    box-shadow: 0 0 0 1px hsl(var(--color-contrast-low-h), var(--color-contrast-low-s), calc(var(--color-contrast-low-l) * 0.85))
}

.choice-tag:active,
.choice-tag:focus-within,
.choice-tag.choice-tag--checked {
    box-shadow: 0 0 0 2px var(--color-primary)
}

.choice-tag:active,
.choice-tag:focus-within {
    box-shadow: 0 0 0 2px var(--color-primary), 0 0 0 4px hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.2)
}

.choice-tag:focus-within:not(.choice-tag--checked) {
    box-shadow: 0 0 0 1px var(--color-contrast-higher), 0 0 0 3px hsla(var(--color-contrast-higher-h), var(--color-contrast-higher-s), var(--color-contrast-higher-l), 0.2)
}

.choice-tag.choice-tag--checked {
    background-color: hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.08)
}

.choice-tag__icon {
    font-size: var(--choice-tag-icon-size)
}

.choice-tag__icon-group * {
    transform-origin: 8px 8px
}

.choice-tag--checkbox .choice-tag__icon {
    color: var(--color-contrast-low)
}

.choice-tag--checkbox .choice-tag__icon-group {
    stroke-width: 2px
}

.choice-tag--checkbox .choice-tag__icon-group * {
    stroke-dasharray: 16
}

.choice-tag--checkbox .choice-tag__icon-group :nth-child(1),
.choice-tag--checkbox .choice-tag__icon-group :nth-child(2) {
    transition: transform 0.3s var(--ease-out-back), stroke-dashoffset 0.3s var(--ease-out-back)
}

.choice-tag--checkbox .choice-tag__icon-group :nth-child(1) {
    stroke-dashoffset: 24
}

.choice-tag--checkbox .choice-tag__icon-group :nth-child(2) {
    stroke-dashoffset: 10
}

.choice-tag--checkbox .choice-tag__icon-group :nth-child(3) {
    transition: stroke-dashoffset 0.3s;
    stroke-dashoffset: 0
}

.choice-tag--checkbox input:checked+.choice-tag__icon {
    color: var(--color-primary)
}

.choice-tag--checkbox input:checked+.choice-tag__icon .choice-tag__icon-group :nth-child(1) {
    stroke-dashoffset: 23;
    transform: translateX(-2px) translateY(4px) rotate(45deg)
}

.choice-tag--checkbox input:checked+.choice-tag__icon .choice-tag__icon-group :nth-child(2) {
    stroke-dashoffset: 5;
    transform: translateX(-2px) translateY(4px) rotate(-45deg)
}

.choice-tag--checkbox input:checked+.choice-tag__icon .choice-tag__icon-group :nth-child(3) {
    transition: none;
    stroke-dashoffset: 16;
    opacity: 0
}

.choice-tag--radio .choice-tag__icon {
    color: var(--color-contrast-low)
}

.choice-tag--radio .choice-tag__icon-group :nth-child(1) {
    fill: none;
    stroke-width: 1px
}

.choice-tag--radio .choice-tag__icon-group :nth-child(2) {
    fill: var(--color-white);
    transform: scale(0);
    transition: transform 0.3s var(--ease-out-back)
}

.choice-tag--radio input:checked+.choice-tag__icon .choice-tag__icon-group :nth-child(1) {
    stroke: var(--color-primary);
    fill: var(--color-primary)
}

.choice-tag--radio input:checked+.choice-tag__icon .choice-tag__icon-group :nth-child(2) {
    transform: scale(1)
}