﻿/************
   Formlib 
************/

:root { /* base theme */
    --frmborder: 1px solid #c5c5c5; /* .ui-widget.ui-widget-content */
    --frmborderhover: 1px solid #003eff; /* ui-state-active */
    --frmborderhover: 1px solid black; /* ui-state-active */
    --frmbgcolor: #f8f8f8;
    --frmbghover: #ededed; /*.ui-state-focus*/
    --frmlabeldisabled: darkgray;
    --frmindicator: #f6f6f6; /* ui-state-default */
    --frmchecked: #007fff; /* ui-state-active */
    --frmcheckedhover: #454545; /* ui-state-default color */
    --frmdisabled: #d7ebf9; /* ui-state-default */
    --frmunchecked: lightgray;
    --frmuncheckedhover: darkgray;
}

/************
   General 
************/

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
    background-color: var(--frmbghover);
}

input,
select,
textarea {
    font-size: 12px;
    color: black;
    margin: 2px;
    padding: 4px;
    border: var(--frmborder);
    border-radius: 6px;
    background-color: var(--frmbgcolor);
}

    input:disabled,
    select:disabled, 
    textarea:disabled,
    .labeldisabled {
        color: var(--frmlabeldisabled);
        cursor: default;
    }

    input:hover,
    select:hover,
    textarea:hover {
        border: var(--frmborderhover);
    }

/************
    Label 
************/

.frm-body td.tdlabel {
    vertical-align: top;
    padding-top: 10px;
}

label {
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

/************
    Select 
************/

select {
    cursor: pointer;
}

    select:disabled {
        -webkit-appearance: none;
        appearance: none;
    }

optgroup {
    font-style: italic;
}

    option,
    optgroup option {
        background-color: var(--frmborderhover);
        cursor: pointer;
        font-style: normal;
    }

        option:disabled,
        optgroup:disabled {
            color: var(--frmlabeldisabled);
            cursor: default;
        }

        option.align-right {
            direction: rtl;
        }

/************
    Input 
************/

    input:not(.float)::-webkit-outer-spin-button,
    input:not(.float)::-webkit-inner-spin-button {
        width: 1em;
        opacity: .5;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
    }

    input.float::-webkit-outer-spin-button,
    input.float::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input::-webkit-calendar-picker-indicator {
        background-color: var(--frmindicator);
    }

    input[type="date"],
    input[type="datetime-local"],
    input[type="time"],
    input[type="month"],
    input[type="week"] {
        font-family: Lucida Grande,Lucida Sans,Arial,sans-serif;
    }

output {
    vertical-align: top;
}

/************
  Checkbox 
************/

.check {
    display: block;
    position: relative;
    margin-bottom: 12px;
    padding-left: 20px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

    .check input,
    .switch input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark,
.radiobtn {
    position: absolute;
    top: -4px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--frmunchecked);
}

.checkmark {
    border-radius: 5px;
}

.radiobtn {
    border-radius: 50%;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--frmunchecked);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 5px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

.check:hover input ~ .checkmark,
.check:hover input ~ .radiobtn,
.switch:hover input ~ .slider {
    background-color: var(--frmuncheckedhover);
}

.check input:checked ~ .checkmark,
.check input:checked ~ .radiobtn,
.switch input:checked ~ .slider {
    background-color: var(--frmchecked); /* #3baae3; ui-state-active */
}

    .check input:checked ~ .checkmark:hover,
    .check input:checked ~ .radiobtn:hover,
    .switch input:checked ~ .slider:hover {
        background-color: var(--frmcheckedhover); /* #2779aa; ui-state-default color */
    }

.check input:disabled ~ .checkmark,
.check input:disabled ~ .radiobtn,
.switch input:disabled ~ .slider,
.check input:disabled ~ .checkmark:hover,
.check input:disabled ~ .radiobtn:hover,
.switch input:disabled ~ .slider:hover {
    background-color: var(--frmdisabled); /*  #d7ebf9; ui-state-default */
    cursor: default;
}

.checkmark:after,
.radiobtn:after {
    content: "";
    position: absolute;
    display: none;
}

.check input:checked ~ .checkmark:after,
.check input:checked ~ .radiobtn:after {
    display: block;
}

.check .checkmark:after {
    top: 3px;
    left: 7px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.check .radiobtn:after {
    top: 5px;
    left: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
}

.switch input:checked ~ .slider:before {
    -webkit-transform: translateX(16px);
    -ms-transform: translateX(16px);
    transform: translateX(16px);
}

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }

/****************************/
/* Combobox  */
/****************************/

    input.custom-combobox-input {
        border-bottom-right-radius: 0px;
        border-top-right-radius: 0px;
    }

.custom-combobox {
    position: relative;
    display: inline-block;
}

.custom-combobox-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    margin-left: -1px;
    padding: 0;
}

.custom-combobox-input {
    margin: 0;
    padding: 5px 10px;
}

    .custom-combobox-input:hover {
        border: var(--frmborderhover);
    }

    .custom-combobox-input:focus {
        background-color: var(--frmbghover);
    }

.ui-autocomplete {
    overflow-y: auto;
    max-height: 200px;
    overflow-x: hidden;
    z-index: 1000 !important;
}

.ui-widget {
    font-size: 1.0em;
}

.ui-menu .ui-menu-item-wrapper {
    padding: 0px 1em 0px .4em;
}

/****************************/
/* Report styles */
/****************************/

.view-content {
    padding-top: 20px;
    clear: both;
}

.view-title {
    font-size: 1.5em;
    font-weight: bold;
    text-align: left;
    margin-top: 10px;
    padding: 7px 5px 2px 5px;
    vertical-align: middle;
    color: var(--color);
    font-size: 1.5em;
    font-weight: bold;
    min-width: 350px;
    float: left;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                      supported by Chrome and Opera */
}

.view-toolbar {
    margin-top: 10px;
    padding: 2px;
    float: left;
    display: inline-block;
}

/****************************/
/* Form styles */
/****************************/

.frm-div {
    display: inline-block;
    line-height: 1.3;
    text-decoration: none;
    list-style: none;
    position: relative;
    margin: 2px 0 0 0;
    padding: .5em .5em .5em .7em;
    clear: both;
}

.frm-body {
    border-spacing: 0;
}

    .frm-body th, .frm-body td {
        padding: 5px 5px 5px 5px;
    }

.frm-submit {
    display: none;
}

.frm-header {
    margin: 2px 0 0 0;
    padding: .5em .5em .5em .7em;
    font-size: 12px;
}

.frm-label {
    float: left;
    margin: 2px;
    padding-right: 5px;
    min-width: 7em;
    height: 30px;
    display: flex;
    justify-content: left;
    align-items: center;
    background-color: cyan;
}

.frm-field {
    float: left;
    margin: 2px;
    padding-right: 20px;
    min-width: 7em;
    height: 30px;
    display: flex;
    justify-content: left;
    align-items: center;
    background-color: yellow;
}

.frm-textarea {
    float: left;
    margin: 2px;
    padding-right: 20px;
}

.frm-newline {
    clear: both;
}
