﻿/*===================================================================================================*/
/*       Stylesheet for input elements and particularly for the autoComplete javascript class.       */
/*===================================================================================================*/

input, textarea {
    border: 1px solid;
    border-style: inset;
    background-color: var(--inputBgColor);
    padding: 3px;
    font-size: 0.9rem;
}
.inpContact {
    margin-top:4px;
    margin-bottom:1px;
}

    input[type=search], input[type=text] {
        height: calc(var(--heightModalInputLine) - 4px);
        width: 100%;
    }
    input[type=color] {
        height: calc(var(--heightModalInputLine) - 2px);
        padding: 0;
        border: 1px solid silver;
        cursor: pointer;
        background-color: transparent;
        grid-column: 2/4;
        min-width: 100px;
        width: calc(var(--widStyleCtrlCol2) + var(--widStyleCtrlCol3) - 2px);
    }
    input[type=color]:disabled {
        background-color: #ccc;
    }

    input[type="range"] {
        background: grey;
        border-radius: 2px;
        cursor: pointer;
        grid-column: 2/4;
        height: 16px;
        margin: 5px 0 0 0;
        width: calc(100% - 1px);
    }

    ::placeholder {
        font-style:italic;
        font-size:smaller;
    }

    /* numeric input is discourage to use, use 'range' instead if ever possible
    input[type=number] { } */

    input[type=file] {
        /* used sending of e-Mail attachments */
        height:30px;
    }

    input[type=file].fileInput, input[type=file].FI {
        /* used to hide original input element for settings file and background image */
        width: 1px; height: 1px;
        position: absolute;
        opacity: 0;         /* Hide the original input element. It is replaced with the <label> element below */
        overflow: hidden;
        z-index: -1;
    }


label.FI {
    /* replacement UI for the original file input element. Used for upload of background image. */
    border-radius:5px;
    grid-column: 2/5;
    height:     24px;
    width:      calc(100% - 3px);
    padding:    2px 10px 3px 8px;
    text-align: center;
}
    label.FI:focus, label.FI:hover {
        border-color: #bbb #777 #555 #999;
        background: linear-gradient(to bottom, rgba(255,255,255,1.0), rgba(224,224,224,1.0)) !important;
        cursor: pointer;
    }

.fileInput + label {
    /* replacement UI for the original file input element. Used for restoring settings file. */
    position:relative; top: 4px;
    height: 24px;
    width: var(--widStyleCtrlCol3);
    background-color: #ddd;
    border-style:   solid;
    border-width:   1px;
    border-color:   #ddd #999 #777 #bbb;
    border-radius:  7px;
    padding:        2px 10px 3px 8px;
}
    .fileInput:focus + label, .fileInput + label:hover {
        border: 1px solid #666;
        background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(200,200,200,0.5)) !important;
        cursor: pointer;
    }

input[type=checkbox] {
    margin-left: 0;
    margin-top: 6px;
    grid-column: 2/3;
}
label.checkbox + label.checkbox {
    grid-column: 3/6;       /* 2nd label AFTER the checkbox */
    margin-top:3px;
    margin-left:3px;
}

textarea.taContact{
    margin-bottom:4px;
}

label.lblLeft { /* 1st label for checkboxes in the style control windows */
    grid-column: 1;
    justify-self: end;
    margin-right: 5px;
    margin-top: calc(var(--heightModalInputLine) / 7);
}
label.lblRight { /* 2nd label for checkboxes in style control windows */
    grid-column: 3/6;
    margin-left: 2px;
    margin-top: calc(var(--heightModalInputLine) / 7);
}
label.lblAbove { /* label above multiple input elements in style control window */
    align-self: center;
    color: white;
    background-color: #888;
    font-family: var(--standardFont);
    font-size: 1em;
    font-weight: 700;
    grid-column: 1/7;
    justify-self: center;
    padding:3px 0;
    position: relative;
    text-align:center;
    /*top: 3px;*/
    width: 100%;
}

span.dispNumValue { /* to display the value of a color or range input element in the style control window */
    font-size: 0.6rem;
    grid-column-start: 4;
    margin-top: 5px;
    margin-left: 0;
    height: 15px;
    width: calc(var(--widStyleCtrlCol4) - 0px);
    padding: 1px;
    text-align: center;
    border: 1px solid #eee;
}

button.btnInfo, button.btnReset, button.btnRemove {
    background-size: calc(var(--stdIconSize) - 8px);
    background-position:center;
    background-repeat:no-repeat;
    height: var(--stdIconSize);
    width:  var(--stdIconSize);     /* i.e. 24px */
    margin-top:1px;
}
button.btnReset {
    background-image: url('../../images/reset.svg');
    grid-column-start: 5;
    justify-self:end;
}
button.btnRemove {
    background-image: url('../../images/remove.svg');
    grid-column-start: 5;
    justify-self:end;
}
button.btnInfo {
    background-image: url('../../images/InfoIcon.png');
    grid-column-start: 6;
    justify-self:end;
}

.auxInputDiv {
    display: flex;
    grid-column: 2/5;
    border:0px dotted orange;
}

ol.draggable {
    background-color: var(--inputBgColor);
    border-top: 1px solid #999;
    border-bottom: 1px solid #fff;
    border-left: 1px solid #bbb;
    border-right: 1px solid #ddd;
    border-radius: 3px;
    list-style-type:none;
    margin: 0;
    overflow-x:hidden;
    padding: 2px 3px;
    user-select:none;
    font-size: 0.9rem;
    cursor: pointer;
}

        ol.draggable li.marked, li.selected {
            background-color: #ccc;
        }

    ol.draggable li.pointerDown {
        border-left: 1px solid grey;
        border-top: 1px solid grey;
        color: brown !important;
        background-color: gold !important;
        box-shadow: 2px 2px 2px #000;
        cursor: move !important;
    }

    ol.draggable li.longTouch {
        color: brown !important;
        background-color: #dba02b !important;
        cursor: ns-resize!important;
    }

ul.instruction {
    padding-left:12px;
    padding-right:0px;
    margin-top:0;
}
ul.instruction li {}



select {
    background-color: var(--inputBgColor);
    border-top: 1px solid #999;
    border-bottom: 1px solid #fff;
    border-left: 1px solid #bbb;
    border-right: 1px solid #ddd;
    border-radius: 3px;
    margin-top: 1px;
    padding: 2px 3px;
    font-size: 0.9rem;
    height: calc(var(--heightModalInputLine) - 4px);
    cursor: pointer;
}
    select.inpFont {
        font-family: var(--standardFont);
        font-size: 0.9rem;
        grid-column: 2/4;
        width: calc(var(--widStyleCtrlCol2) + var(--widStyleCtrlCol3) + var(--widStyleCtrlCol4) - 3px);
    }
    select.inpStyleChoice {
        font-size: var(--smallFontSize);
        grid-column:    2/5;
        width:          calc(100% - 3px);
    }
        select.inpStyleChoice:disabled{
            background-color:#ccc;
        }

    select.inactive {
        background-color: #E2E0BD !important;
        font-style: italic;
    }
        select.inactive > option {
            background-color: var(--inputBgColor);
            font-style: normal;
        }

    select.inpStyleChoice > option {
        font-size: var(--smallFontSize);
    }

    select.threeDigits {
        width: calc(3 * var(--OneDigitWidth));
    }

    optgroup {
        background-color:ghostwhite;
        font-style:normal;
        font-weight:200;
    }

option {
    font-size: 0.9rem;
    background-color: var(--inputBgColor);
}

option.mouseDown {
    border-left:1px solid grey;
    border-top: 1px solid grey;
    color:white;
    background-color:cornflowerblue;
    box-shadow: 2px 2px 2px #000; cursor: move;
}
    /*option.mouseDown::before {  content: "⇕ ";  }*/

    option.opFont, option.opStyle {
        font-size: 0.9rem;
        text-align: left;
        padding-left: 0;
        background-color: var(--inputBgColor);
    }

.gridA {
    display: grid;
    grid-template-columns: var(--widStyleCtrlCol1) var(--widStyleCtrlCol2) var(--widStyleCtrlCol3) var(--widStyleCtrlCol4) var(--widStyleCtrlCol5) var(--widStyleCtrlCol6);
    grid-auto-rows: var(--heightModalInputLine);
}

#gridRearrange {
    display: grid;
    grid-column-gap: 2px;
    grid-template-columns: auto 225px auto;
    grid-template-rows: var(--heightModalInputLine) 12px repeat(2, var(--heightModalInputLine)) auto;
    margin: 0;
    padding: 0;
}

#gridRearrangeNarrow {      /* narrow version of #gridRearrange above for use in MS Office */
    display: grid;
    grid-column-gap: 2px;
    grid-template-columns: auto 175px auto;
    grid-template-rows: var(--heightModalInputLine) 12px repeat(2, var(--heightModalInputLine)) auto;
    margin: 0;
    padding: 0;
}



/*----------------------------------------------------------------------------------
  Styles for input with auto completion (currently only the 'language' selection)
  ---------------------------------------------------------------------------------- */
.autocomplete {
    position: relative; /* the container must be positioned relative */
    display: inline-block;
}

.autocomplete-items {
    position: absolute;
    border-left: 1px solid #999;
    box-shadow: 10px 10px 7px #666;
    font-size: 0.8rem;
    z-index: 99;
    /* position the autocomplete items to be the same width as the container */
    top: 26px;
    left: 0px;
    max-height: 480px;
    overflow-y: auto;
    width:calc(100% - 0px);
}

    .autocomplete-items div {
        padding: 5px;
        cursor: pointer;
        background-color: #eee;
        border-bottom: 1px solid #d4d4d4;
/*        width:100%;*/
    }

        .autocomplete-items div:hover { /* when hovering an item */
            background-color: #888;
            color: yellow;
        }

/* when navigating through the items using the arrow keys */
.autocomplete-active {
    background-color: #888 !important;
    color: navajowhite;
}

