﻿/*=======================================================*/
/* M S   O F F I C E :  Stylesheet for input elements    */
/*=======================================================*/

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: calc(100% - 3px);
    }
    input[type=color] {
        height: calc(var(--heightModalInputLine) - 2px);
        padding: 0;
        border: 1px solid silver;
        cursor: pointer;
        background-color: transparent;
        grid-column: 3/5;
        width: calc(100% - 3px);
    }
    input[type=color]:disabled {
        background-color: #ccc;
    }

    input[type="range"] {
        background: grey;
        border-radius: 2px;
        cursor: pointer;
        grid-column: 3/4;
        height: 16px;
        margin: 5px 0 0 0;
        width: calc(100% - 1px);
    }

    input[type="range"].smallRange, input[type="text"].smallRange {
        width: 50px;
        text-align:center;
    }

    input[type="text"].txtStyle {
        grid-column: 3/5;
        font-size: 0.8rem;
    }
        input[type="text"].txtStyle:disabled {
            color:#bbb;
        }

    ::placeholder {
        font-style:italic;
        font-size:smaller;
    }

    label.text, label.select-one, label.color, label.range, label.file {
        grid-column: 1/3;
        margin-top:3px;
    }

    /* numeric input is discourage to use, use 'range' instead if ever possible input[type=number] { } */

input[type=checkbox] {
    margin-left: 0;
    margin-top: 0px;
}
input[type=checkbox].cbxLeft {
    grid-column: 1/2;
}
label.checkbox {
    grid-column: 2/6;
    margin-top: 5px;
}


label.lblLeft { /* 1st label for checkboxes in the style control windows */
    grid-column: 1/3;
    justify-self: end;
    margin-right: 5px;
    margin-top: calc(var(--heightModalInputLine) / 7);
}
label.lblRight { /* 2nd label for checkboxes in style control windows */
    grid-column: 2/6;
    margin-left: 2px;
    margin-top: calc(var(--heightModalInputLine) / 7);
}
label.lblAbove, label.lblAboveReduced { /* standalone label in style control window */
    color: white;
    background-color: #888;
    font-family: var(--standardFont);
    font-size: 1em;
    font-weight: 700;
    grid-column: 1/6;
    margin-top:3px;
    padding:5px 0;
    height: calc(var(--stdIconSize) - 2px);
    text-align:center;
    width: 100%;
}
label.lblAboveReduced {    /* reduced width to leave space for info button */
    grid-column: 1/5;
    height: var(--stdIconSize);
    margin-top:1px;
    width: calc(100% - 3px);
}

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) - 2px);
    padding: 1px;
    text-align: center;
    border: 1px solid #eee;
}

button.btnInfo, button.btnInfoTab, button.btnReset, button.btnRemove {
    background-size: calc(var(--stdIconSize) - 4px);
    background-position:center;
    background-repeat:no-repeat;
    height: var(--stdIconSize);
    width:  var(--stdIconSize);
    margin-top:1px;
}
button.btnReset {
    background-image: url('../../images/reset.svg');
    grid-column-start: 5;
}
button.btnRemove {
    background-image: url('../../images/remove.svg');
    grid-column-start: 5;
}
button.btnInfo {
    background-image: url('../../images/InfoIcon.png');
    grid-column-start: 5;
}

button.btnInfoTab, button.btnInfoTab:hover {
    background-color:rgba(0,0,0,0);
    background-image: url('../../images/InfoIcon2.png');
    background-size: var(--stdIconSize);
    border:0;
    position:absolute;
    left:2px;
    top:2px;
}

.auxInputDiv {
    display: flex;
    grid-column: 3/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 #888;
    border-bottom: 1px solid #ddd;
    border-left: 1px solid #aaa;
    border-right: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 3px;
    font-size: 0.9rem;
    height: calc(var(--heightModalInputLine) - 4px);
    cursor: pointer;
}
    select.inpFont, select.inpWordStyle, select.inpStyleChoice {
        font-family:    var(--standardFont);
        font-size:      0.8rem;
        grid-column:    3/5;
        width:          calc(100% - 3px);
    }

    select.selectWide {
        font-family:    var(--standardFont);
        font-size:      0.8rem;
        grid-column:    1/5;
        width:          calc(var(--widStyleCtrlCol1) + auto + var(--widStyleCtrlCol3) + var(--widStyleCtrlCol4) - 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 {
        text-align:center;
        width: calc(3 * var(--OneDigitWidth));
    }



    optgroup {
        padding:0;
        font-style:normal;
        font-weight:200;
    }

option {
    font-size: 0.9rem;
    background-color: var(--inputBgColor);
}
option:disabled {
    color:rgb(180,180,180);
}

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) auto var(--widStyleCtrlCol3) var(--widStyleCtrlCol4) var(--widStyleCtrlCol5);
    grid-auto-rows: var(--heightModalInputLine);
}


/*----------------------------------------------------------------------------------
  Styles for input with auto completion (currently only the 'language' selection)
  ---------------------------------------------------------------------------------- */


div.selLang {
    position:relative;
    margin:10px 10px 15px 10px;
    max-height:calc(100vh - 48px) ;
}


.autocomplete {
    position: relative;
    display: inline-block;
}

.autocomplete-items {
    border-left: 1px solid #999;
    box-shadow: 10px 10px 7px #666;
    font-size: 0.8rem;
    z-index: 99;
    position:relative;top:-213px;
/*    max-height:calc(100vh - 148px) ;*/
    max-height:calc(100vh - 10px) ;
    width:calc(100% - 10px);
    overflow-y: auto;
}

    .autocomplete-items div {
        padding: 5px;
        cursor: pointer;
        background-color: #eee;
        border-bottom: 1px solid #d4d4d4;
    }

        .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;
}

