html, body {
    height: 100%;
    padding: 0px;
    margin: 0px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: none;
}

main {
    flex: 1 0 auto;
    padding: 20px;
    width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

header, nav, footer, hr, .button, .button_small, label, .show_section, .hide_section {
    -webkit-user-select: none;  
    -moz-user-select: none;    
    -ms-user-select: none;      
}





/* DEFAULT COLOR PALETTE */

/* WHITE */
.bluebg, .redbg, .greenbg, .button:hover, .button_small:hover, .button.yellowbg:hover, .ui-state-active {
    color: white;
}
.list li {
    background-color: white;
}

/* LIGHT GRAY */
.lightgraybg {
    background-color: #ddd;
}

/* GRAY */
.button:hover, .button_small:hover {
    background-color: #bbb;
}
input, table, th, td, textarea {
    border: 1px solid #bbb;
}
.list li {
    border-top: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
}
.field_spacer_with_line {
    border-top: 1px solid #bbb;
}

/* BLACK */
.button.bluebg:hover, .button.redbg:hover, .button.greenbg:hover, .button.yellowbg:hover,
.button_small.bluebg:hover, .button_small.redbg:hover, .button_small.greenbg:hover, .button_small.yellowbg:hover {
    background-color: black;
}
.button.lightgraybg, .button_small.lightgraybg, .button.yellowbg, .button_small.yellowbg, .button_processing, .button_processing:hover {
    color: black;
}

/* BLUE */
.bluebg, .ui-state-active {
    background-color: #0077bb;
}
.blue {
    color: #0077bb;
}

/* RED */
.redbg {
    background-color: #d1213c;
}
.red {
    color: #d1213c;
}

/* GREEN */
.greenbg {
    background-color: #1db23e;
}

/* YELLOW */
.yellowbg {
    background-color: #f8ec4a;
}







/* Body styles */
body {
    font-size: 16px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

header, footer {
    text-align: center;
}

.fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

input, textarea {
    -webkit-border-radius: 0;
}

.paddedbox {
    padding: 15px 20px;
    margin-bottom: 15px;
}





table {
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 5px;
}

th {
    text-align: left;
    text-transform: uppercase;
}



/* UI elements */
.button, .button_small {
    border: 0;
    text-align: center;
    line-height: 1;
    display: inline-block;
    box-sizing: content-box; /*border-box */
    border-right: 1px solid rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(0,0,0,0.2);
    border-radius: 3px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.button {
    min-width: 100px;
    padding: 12px;
    font-size: 16px;
    margin: 0 8px 8px 0;
}

.button_small {
    min-width: 60px;
    padding: 8px 8px 7px 8px;
    font-size: 12px;
    margin: 0 6px 6px 0;
}

.button:hover, .button_small:hover {
    text-decoration: none;
}

.button_processing, .button_processing:hover {
    text-decoration: none;
    background-image: url(/framework/images/button_processing.gif);
    border-right: 1px solid rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(0,0,0,0.2);
    cursor: default;
}



.content_simple {
    max-width: 800px;
    margin: 10px auto;
}



#popup_msg {
    position: fixed;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 3px;
    opacity: 0.9;
    background: #333;
    color: white;
}

.error_box {
    padding: 10px 15px;
    margin: 0 0 15px 0;
    border-radius: 2px;
    display: inline-block;
    min-width: 200px;
}

.error_image {
    width: 76px;
    height: auto;
    margin-bottom: 15px;
}



/* Forms */

#main_form {
    margin-top: 12px;
}

label {
    font-size: 14px;
}

.label.red {
    font-weight: bold;
}

.label_checkbox {
    cursor: pointer;
    display: inline !important;
    padding-left: 4px;
    float: none;
}

.field {
    margin-bottom: 15px;
}

.field_note {
    margin-top: 3px;
    font-size: 12px;
}

.field_spacer {
    height: 10px;
}

.field_spacer_with_line {
    margin-top: 40px;
    height: 30px;
}

.field .image_preview {
    max-width: 200px;
    max-height: 180px;
    margin-bottom: 6px;
    margin-left: 0;
    width: auto;
    height: auto;
    vertical-align: bottom;
}

.field .file_preview {
    padding: 0;
    font-size: 14px;
    margin: 4px 0;
    display: inline-block;
}

.file_link_wrapper {
    display: inline-block;
}

.file_delete_undo_div {
    display: none;
}

input {
    margin: 0;
    font-size: 16px;
    display: block;
    padding: 4px;
    box-sizing: content-box; /* border-box */
    -webkit-appearance: none;
}

input[type=file] {
    border: none;
}

input[type=checkbox] {
    cursor: pointer;
    vertical-align: top;
    margin-top: 5px;
    display: inline-block;
    -webkit-appearance: checkbox;
}

select {
    margin: 2px 0;
    font-size: 1.2em;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    display: block;
}

.input_width_large  { width: 480px; max-width: 100%; }
.input_width_normal { width: 240px; max-width: 100%; }
.input_width_small  { width: 120px; max-width: 100%; }

.colorpicker_wrapper {
    overflow: auto;
}

.colorpicker {
    width: 30px;
    height: 30px;
    border: 4px solid white;
    border-radius: 8px;
    float: left;
    margin: 0;
    cursor: pointer;
}

.colorpicker_selected {
    border: 4px solid #333 !important;
}

.colorpicker_custom {
    float: left;
    width: 68px;
    font-size: 12px;
    text-align: center;
    background: #e6e6e6;
    margin: 0;
    border: 4px solid white;
    border-radius: 8px;
    padding-top: 15px;
    line-height: 0;
    height: 15px;
    cursor: pointer;
}

.colorpicker_wrapper .input {
    display: none;
    width: 60px;
    font-size: 13px;
    text-align: center;
    padding: 7px 3px 5px 3px;
    margin: 0;
    outline: none;
    border: 4px solid #333 !important;
    border-radius: 8px;
    float: left;
}



.ui-autocomplete {
    position: absolute;
    background: white;
    overflow-y : scroll;
    margin: 0;
    max-height : 200px;
    list-style: none;
    border: 1px solid #555;
    padding: 0;
    cursor: pointer;
}

.ui-autocomplete .ui-menu-item-wrapper {
    padding: 4px 6px;
    font-size: 13px;
    margin: 0;
}

.ui-helper-hidden-accessible {
    display: none;
}



.show_section, .hide_section {
    cursor: pointer;
    margin-top: 10px;
    display: inline-block;
}

.show_section {
    margin-bottom: 25px;
}

.hide_section {
    margin-bottom: 15px;
}

.form_section {
    display: none;
}



/* Lists */
.list {
    list-style-type: none;
    padding: 0px;
    min-width: 280px;
    max-width: 650px;
}

.list li {
    margin-bottom: -1px;
    padding: 5px;
}

.list_buttons {
    float: right;
    padding-left: 8px;
}

.list_buttons a {
    margin-left: 8px;
}

.handle {
    background-image: url(/framework/images/handle_bg2.png);
    background-size: 65%;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 2px;
    cursor: move;
    display: block;
    float: right;
    width: 24px;
    height: 20px;
    margin-top: 2px;
    background-color: #eee;
}

.user_type_icon {
    float: left;
    margin: 1px 5px 0 0;
    width: 20px;
    height: 20px;
    background-image: url('/framework/images/user_type_icons.png');
    background-size: 20px auto;
    background-repeat: no-repeat;
}

.user_type_icon_2 { background-position: 0 -25px; }
.user_type_icon_3 { background-position: 0 -50px; }
.user_type_icon_4 { background-position: 0 -75px; }



/* Responsive */
@media screen and (max-width: 700px) {

    main {
        width: auto;
        padding: 15px;
    }
    
    .button {
        min-width: 70px;
    }

    .field {
        margin-bottom: 10px;
    }
    
    .error_outer {
        padding: 15px;
    }
    
    .error_inner {
        padding: 40px 15px;
    }
    
}



/* input placeholder text color */
::-webkit-input-placeholder {   color: #bbb; }
:-moz-placeholder {             color: #bbb; }
::-moz-placeholder {            color: #bbb; }
:-ms-input-placeholder {        color: #bbb; }
