

/***
    Cards
*/
.card {
    border: 1px solid $color-accent;
    color: tint($color-text-dark, $color-accent);
    display: inline-block;
    padding-bottom: $padding-big;
    max-width: $width-big;

    h1 {
        background: $color-accent;
        color: tint($color-text-dark, $color-accent);
        font: $font-header-3;
        padding: $padding-medium $padding-big;
        text-decoration: none;
    }
    a, p {
        margin-left: $padding-big;
        margin-right: $padding-big;
        margin-bottom: $padding-medium;
    }
}



/***
    Copyable Text
*/
.CopyableText {
    border: 1px solid $color-neutral;
    border-radius: 0;
    font: $font-small-size/#{$font-normal-line} $font-small-face;
    padding: 0 $padding-small;
    margin: 0;
    max-width: $width-paragraph;
    outline: none;
    width: 100%;
}


/***
    List
*/
.FormList {
    border-left: 1px solid lightened($color-primary);
    padding-top: 0;
    padding-left: $padding-big;
    h1 {
        font-size: $font-normal-size;
        margin: 0;
        padding: 0 0 $padding-big 0;
    }
    section {
        padding-left: $padding-big;
    }
}



/***
    Side Navigator
*/

$nav-complete: $color-primary;
$nav-next: $color-accent;
$nav-disabled: #888;

.side-nav {
    border-top: 1px solid tint($color-neutral, #fff);
    border-bottom: 1px solid tint($color-neutral, #fff);
    color: tint($color-text-dark, $color-neutral);
    margin: 0;
    padding: 0;

    footer {
        display: block;
    }

    h3 {
        font: $font-normal;
        margin: $padding-medium;
    }

    input[type='submit'] {
        background: inherit;
        border: none;
        cursor: pointer;
        display: block;
        font: inherit;
        height: auto;
        margin: 0;
        padding: $padding-big $padding-medium;
        text-align: left;
        width: 100%;
        white-space: normal;
    }

    nav {

        li {
            border-bottom: 1px solid $color-neutral;
            cursor: default;
            display: block;
            margin: 0;
            user-select: none;
        }

        a, span, .header::after {
            display: block;
            padding: $padding-big $padding-medium;
        }
        
        .selected {
            background: $color-neutral;
            color: tint(text-color-for($color-neutral), $color-neutral);
            font-weight: bold;
        }
        .complete {
            border-left: $padding-medium solid $nav-complete;
        }
        .current {
            border-left: $padding-medium solid $nav-next;
            &.current {
                cursor: default;
            }
        }
        .disabled {
            border-left: $padding-medium solid $color-neutral;
            input {
                cursor: default;
            }
        }
        .header {
            border-left: $padding-medium solid $nav-complete;
            color: $color-text-dark;
            font-weight: bold;
            position: relative;
            &::after {
                background: url('/_assets/images/expand_more.png') no-repeat center;
                box-sizing: border-box;
                content: '';
                height: 100%;
                position: absolute;
                right: 1em;
                top: 0;
            }
            &.expanded::after {
                background-image: url('/_assets/images/expand_less.png');
            }
        }
        .subitem {
            border-left: $padding-medium solid $nav-next;
        }
    }
}


/***
    Signature widget
*/
.signature {

    h3 {
        border: none;
        color: tint($color-text-dark, $color-accent);
        font: $font-small;
    }

    img {
        display: block;
        max-height: $height-big;
        max-width: 100%;
        width: $width-big - $padding-big*2;
    }

    p {
        color: tint($color-text-dark, $color-accent);
        font: $font-small;
        &.hidden {
            display: none;
        }
    }

    &>.content {
        background: #eee;
        border-bottom: 1px solid $color-neutral;
        cursor: pointer;
        margin-bottom: $padding-big;
        max-width: $width-big;
        padding: $padding-medium $padding-big;
        text-align: center;
    }

    .dialog .content {
        max-height: $height-big * 2;
        max-width: $width-big*2;
        width: 100%;
    }

    .fakePad {
        bottom: 0;
        display: none;
        height: 100%;
        left: 0;
        position: absolute;
        text-align: center;
        top: 0;
        width: 100%;
        z-index: 1;
        &>img {
            margin: auto;
            max-height: 100%; max-width: 100%;
            position: absolute;
            left: 50%; top: 50%; transform: translate(-50%, -50%);
        }
        &.show { display: block; }
    }
    .pad {
    }
    .padContainer {
        position: relative;   
    }

    .required[style='display: inline;'] {
        display: none;
        & + .content {
            background: tint(#fff, $color-error);
            border-color: $color-error;
        }
    }

}


/***
    Upload image preview
*/
.upload-image-preview {
    border: 1px solid $color-text-dark;
    margin: $padding-medium;
    max-height: $width-big;
    max-width: $width-big;
}


/***
    Yes No Picker
*/

.YesNoPicker {
    display: inline-block;
    height: 1em;
    margin: $padding-medium;
    overflow: visible;
    user-select: none;
    vertical-align: top;
    width: $width-small;

    input {
        display: none;
        width: auto;
    }

    label {
        box-shadow: inset 2px 2px 2px $color-neutral;
        color: $color-neutral;
        font: $font-input;
        padding: 0;
        width: 100%;
    }

    li {
        border: 1px solid $color-border;
        border-radius: $font-input-line / 8;
        display: inline-block;
        float: left;
        text-align: center;
        width: 50%;

        &:first-of-type {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        &:last-of-type {
            border-left: none;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
    }

    input:checked + label {
        background: $color-primary;
        color: text-color-for($color-primary);
        box-shadow: none;
        font-weight: bold;
    }
}


/***
    Tabs
*/

.tabs {
    background: #fff;

    .buttonStrip {
        overflow: visible;
        font: 0/0 serif;
        width: 100%;
    }

    .tab-button {
        background: $color-neutral;
        border-top: 1px solid $color-border;
        border-right: 1px solid $color-border;
        color: tint($color-text-dark, $color-neutral);
        cursor: default;
        display: inline-block;
        font: $font-normal;
        padding: $padding-medium;
        &:first-of-type {
            border-left: 1px solid $color-border;
        }
    }
    .tab-button.active {
        background: #fff;
        color: $color-text-dark;
        border-top: 3px solid $color-primary;
        position: relative;
        top: 1px;
        z-index: 90;
    }

    .tab-content {
        border: 1px solid $color-border;
        padding: $padding-big;
        display: none;
    }
    .tab-content.active {
        display: block;
    }
}


/****
    fix overrides from other files
*/

.formFields .YesNoPicker {
    label {
        line-height: $font-input-line;
        min-width: 53px;
        text-align: center;
    }

    label::after {
        content: '';
    }

    li {
        clear: none;
        display: inline-block;
        line-height: 0;
        margin: 0;
    }
}

.YesNoPicker {
    label:first-of-type {
        min-width: 53px;   
        text-align: center;
    }
}