html {
    scroll-behavior: smooth;
}

/* Modal Expense OCR */
.modalExpense .modal-footer {
    display: none;
}

.modalExpense .modal-dialog {
    margin: 10vh auto;
}

.modalExpense .modal-body {
    padding: 0;
}

.modalExpense .modal-content {
    min-height: 30vh;
    background: #EDEDED;
}

.modal-previz {
    display: flex;
    align-items: center;
}

.modalPreviewPanel {
    width: 100%;
    height: 100%;
}

.OCRTextBase {
    /*background: #D1E9FF;*/
    background: #ebf5ff;
    padding: 20px;
    position: relative;
    height: 100%;
}

.OCRTextBase form {
    height: 100%;
}
.OCRTextBase label {
    border: 2px dashed #2D95F8;
    color: #2D95F8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    border-radius: 10px;
}
.OCRTextBase > label:hover {
    background : white;
}

.OCRTextBase span {
    font-size: 1.4em;
    text-align: center;
}

.OCRTextBase small {
    display: inline-block;
    color: grey;
    margin: 10px auto 0 auto;
}

.OCRTextBase .button {
    color: white;
    background: #2D95F8;
    border-radius: 5px;
    display: inline-block;
    padding: 10px 20px;
    margin: 20px auto 0 auto;
    border: 0;
    position: relative;
    font-size: 1.2em;
    cursor: pointer;
}

.OCRTextBase .button i {
    margin-right: 10px;
}

.modalExpense .advanceTax {
    border: 1px dashed rgba(0, 0, 0, .1);
    border-radius: 10px;
    margin: 10px 0;
    padding: 10px 0px;
    position: relative;
}

.modalExpense .advanceTax > div {
    clear: both;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.modalExpense .advanceTax label {
}

.modalExpense .advanceTax label small {
    /*display: block;*/
}

.modalExpense .advanceTax i {
    position: absolute;
    top: 10px;
    right: 10px;
}

/*.OCRImage, .OCRImagePDF {
    display : none;
}
.OCRImage {
    display : none;
}
.OCRImageHide {
    overflow: hidden;
    width: 0px;
    height : 100px;
    z-index: 1000;
    position: relative;
}*/
.OCRImage {
    display : none;
}

.OCRImageAlready {
    display : none;
}

.OCRResult {
    margin: auto;
    position: relative;
    display: none;
    width: 100% !important;
    height: 100% !important;
}

#canvasOCR {
    display:block;
    background:grey;
    position : absolute;
    top : 3px;
    left : 3px;
    cursor: move;
}

.OCROverlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.frameOverlay {
    position: absolute;
    border: 2px dashed red;
    border-radius: 5px;

    padding: 3px;
    margin-left: -5px;
    margin-top: -5px;
    box-sizing: content-box;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, .2);
}

.OCRZip {
    display: none;
}

.OCRResult.isZip .zoomOCR,
.OCRResult.isZip .OCRImage,
.OCRResult.isZip .OCROverlay {
    display: none;
}

.OCRResult.isZip .OCRZip {
    display: block;
}

.titleZip {
    font-size: 1.5em;
    padding: 40px 0;
    display: block;
}

.previewActive .OCRTextBase,
.previewActive .OCROverlay {
    display: none;
}

.previewActive .OCRResult,
.previewActive .OCRReset {
    display: block;
}

.previewLink a {
    display: block;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, .3);
    border-radius: 10px;
    margin: 30px 50px;
}

.previewLink a:hover {
    background: #58bbee;
}

.OCRProcess, .OCRProcessAlready {
    display: none;
    position: absolute;
    top : 0;
    left : 0;
    right : 0;
    bottom : 0;
    color : white;
    font-size: 1.3em;
}
.OCRProcess > div, .OCRProcessAlready > div {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap : 5%;
}
.OCRNotPreviewable {
    position: absolute;
    top : 0;
    left : 0;
    right : 0;
    bottom : 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap : 20px;
    padding : 30px;
    text-align: center;
}
.OCRNotPreviewable .fa-file-o {
    font-size: 3em;
    color: rgba(0, 0, 0, .3);
}
.OCRAnim {
    height: calc(100% - 60px);
    width: calc(100% - 60px);
    position: absolute;
    top: 0;
}
.overlayCanvas {
    display : none;
}
.overlayCanvasContainer {
    position: absolute;
    top : 0;
    left : 0;
    right : 0;
    bottom : 0;
}

.sizer {
    width : 100%;
    height : 100%;
    background : transparent;
    position: absolute;
    top : 0px;
    left : 0px;
    bottom : 0;
    right : 0;
    padding : 3px;
    background: grey;

}

.buttonZoom {
    position : absolute;
    top : 10px;
    right : 10px;
    font-size : 16px
}
.buttonPagination {
    position : absolute;
    top : 10px;
    left : 10px;
    font-size : 16px
}
.OCRReset {
    position: absolute;
    bottom : 10px;
    left : 10px;
    text-align: center;
}
.buttonZoom button, .buttonPagination button, .OCRReset a{
    background: rgba(0, 0, 0, 0.46);
    color : rgba(255, 255, 255, 0.6);
    --color-base: rgba(255, 255, 255, 0.6);
    box-shadow: -2px 2px 5px rgba(0,0,0,.2);
    border-radius: 5px;
    display : inline-block;
    border : 0;
    padding : 5px;
    margin : 0 5px
}
.buttonZoom button:hover, .buttonPagination button:hover, .OCRReset a:hover {
    background: white;
    color: #2D95F8;
    --color-base: #2D95F8;
    cursor: pointer;
    opacity: 1;
    text-decoration: none;
}
.buttonPagination button.disabled {
    opacity: .2;
}

@media only screen and (max-width: 767px) {

    .sizer {
        width : 100% !important;
        height : 100% !important;
        /* background : blue !important; */
    }
    .buttonZoom button{
        display: block;
        margin-bottom : 20px;
    }

}

#OCRModal .zoneValidInfoPrice {
    margin: 0 0 30px 0;
    padding: 10px;
    display: block;
    background: #44596E;
    text-align: center;
    color: white;
    border-radius: 0 0 10px 10px;
    width: 100%;
    border-top: 2px dashed white;
}

#OCRModal .zoneValidInfoPrice .labelTotal {
    display: inline-block;
}

.modalFormPanel {
    position: relative;
    /*float: left;*/
    /* width: calc(100% - 280px); */
    /*background: white;*/
    /*min-height: 80vh;*/
    /*box-shadow: -20px 0 20px -20px rgba(0, 0, 0, .3);
    padding: 40px;
    border-radius: 0 15px 15px 0;*/
}

.isHideSupplier #inputSupplier,
.isHideSupplier #taxSimple,
.isHideSupplier #taxAdvance,
.isHideSupplier .advanceExpenseLines,
.isHideSupplier #expenseByEmployee,
.isHideSupplier #divExpenseAdvancedOptionsAlreadyPaid,
.isHideSupplier #divExpenseAdvancedOptionsReceivedDate,
.isHideSupplier #divExpenseAdvancedOptionsProject,
.isHideSupplier #divExpenseAdvancedOptionsContract,
.isHideSupplier #divExepenseMainAccountingCode {
    display: none !important;
}

#expenseFileLabel {
    position: relative;
}
#expenseFileLabel:hover {
    filter : brightness(1.2);
}
#expenseFileLabel input{
    display: block;
    position: absolute;
    top : 0;
    left : 0;
    right : 0;
    bottom : 0;
    opacity : 0;
    cursor: pointer;
}
#expenseFilePreview {
    /*max-width: 400px;
    min-width: 400px;
    min-height: 400px;
    background: white;
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .1);
    transform: rotate(-5deg);
    */
    height : 100%;
}

#expenseFilePreview .OCRImage, #expenseFilePreview .OCRIframe {
    max-width: 100%;
    max-height: 70vh;
    position: relative;
}

#expenseFilePreview .OCRImage {
    image-orientation: none;
}

#expenseFilePreview form {
    border: 10px solid white
}

#expenseFilePreview form, #expenseFilePreview #expenseFile {
    display: block;
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
}

#expenseFilePreview form input:hover {
    cursor: pointer !important;
}

#expenseFilePreview:hover button {
    opacity: .8;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .1);
}

.zoomOCR {
    display: none;
    position: absolute;
    z-index: 10000;
    top: 10px;
    right: 10px;
    background: white;
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 18px;
    text-align: center;
    color: grey;
    box-shadow: 0 3px 5px rgba(0, 0, 0, .2);
    border-radius: 20px;
    opacity: .8;
}

.zoomOCR:hover {
    color: black;
    opacity: 1;
    box-shadow: 0 8px 8px rgba(0, 0, 0, .4);
}

.advanceExpenseLines {
    /*padding: 20px 20px;
    border: 1px solid #a2a6af;
    margin: 30px 0px;*/
    border-radius: 20px;
}

#formAccountingOCRExpenseData {
    /*width: 440px;*/
    margin: auto;
    max-width: 100%;
}
.notAdvanceExpensePrice {
    background: #D1E9FF;
    padding: 10px 30px;
    margin : 30px 0;
    border-radius: 10px;
}
.notAdvanceExpensePrice hr {
    color : transparent;
    border : 0px;
    border-bottom: 2px dashed #ffffff;
    margin: 0 -30px;

}

#divExpenseLines .inload {
    height: 30px;
    background: rgba(227, 227, 227, 0.76);
    border-radius: 10px;
    margin-bottom: 20px;
}

/*.oneExpenseLine {;
    background: #D1E9FF;
    border-radius: 5px;
    padding: 10px;
    margin: 0 0 20px 0;
    clear: both;
    position: relative;
}
*/
.oneExpenseLine {;
    background: #F1F1F1;
    border-radius: 10px;
    margin: 20px 0;
    clear: both;
    position: relative;
}


.advanceExpenseLines .btn-select {
    /*display : block;
    width : 100%;*/
}

.advanceExpenseLines .btn-secondary{
    display: block;
    background: #EBF5FF;
    border: 1px dashed #A8D3FC !important;
    border-radius: 10px;
    margin: auto;
    margin-bottom: 30px;
}

.advanceExpenseLines .advanceTax {
    border: 0;
    border-radius: 10px 10px 0 0;
    padding : 20px;
    background: #F1F1F1;
}

.advanceExpenseLines .advanceTax div {
    justify-content: center;
}

.advanceExpenseLines .advanceTax label {
    float: none;
    width: 200px;
}

.advanceExpenseLines .labelTotal {
    border: none;
}

.stockProduct {
    /* float : left; */
    display: flex;
    padding: 10px 30px 10px 20px;
    gap : 20px;
}
.stockProduct .stockProductToggle{
    text-align : center;
}
.stockProduct .stockProductToggle b{
    display: block;
    margin-bottom : 10px;
}

form .oneExpenseTitle .productType > div {
    padding-bottom: 10px;
    display: flex;
}

form .oneExpenseTitle .productType select {
    margin-right: 10px;
}

form .oneExpenseLine .divUnitPriceAndStuff {
    margin: 0;
    border-radius: 0 0 10px 10px;
    border-top: 2px dashed white;
    padding: 15px 20px 10px 20px;
    background: #D1E9FF;
    display: flex;
    justify-content: space-between;
}

form .oneExpenseLine .stockProduct .form-floating label {
    /*float: none;
    width: unset;
    padding: 0;
    margin-bottom: 0;
    margin-right: 10px;
    line-height: 2.5em;
    white-space: nowrap;*/
    background: linear-gradient(0deg, transparent 45%, white 45%, white 55%, transparent 55%) !important;
}

form .oneExpenseLine .divUnitPriceAndStuff > div {
    margin: 0 0 5px 0;
}
form .oneExpenseLine .lineExpenseCalcul {
    display : flex;
    align-items: center;
}

form .oneExpenseLine .divTaxRateAndStuff > div {
    margin: 0 0 5px 0;
}


form .oneExpenseLine .totalTTC {
    margin-top: 10px;
}

.deleteOneExpenseLine {
    position: absolute !important;
    top: 10px;
    right: -35px;
    z-index: 1000;
    opacity: .3;
    font-size: 1em !important;
    height: 2.5em !important;
    width: 2.5em !important;
    border-radius: 0 10px 10px 0 !important;
}

.deleteOneExpenseLine:hover {
    opacity: 1;
}

.divUnitPriceAndStuff .formGroup {
    margin-bottom: 5px;
}

#expenseDescription {
    /*width: 60%;*/
    height: 40px;
    min-height: 80px;
}

/*.manualInput {background: lightgreen;}*/

form .oneExpenseLine .form-control, form .oneExpenseLine input {
    border-radius: 7px;
    padding: 7px 10px;
    height: auto;
}

.oneExpenseLine .isProduct, .oneExpenseLine .select2 {
    display: none;
}

.oneExpenseLine.forProduct .isProduct, .oneExpenseLine.forProduct .select2 {
    display: block;
}
.oneExpenseLine:not(.forProduct) .formGroup {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap : 10px;
}
.oneExpenseLine:not(.forProduct) .formGroup label{
    font-weight: bold;
}
.oneExpenseLine.forProduct .formGroup {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}
.oneExpenseLine.forProduct .isProduct, .oneExpenseLine .isNotProduct ,  .oneExpenseLine .expenseLineType {
    /*max-width: calc(60% + 20px) !important;*/
}

.oneExpenseLine.forProduct .isNotProduct {
    display: none !important;
}

.oneExpenseLine [class^="onlyProductItem"] {
    display: none;
}

.oneExpenseLine.forProduct [class^="onlyProductItem"] {
    display: unset;
}

.forToggle {
    cursor: pointer;
}

.forToggle:hover {
    opacity: 1;
    color: #58bbee;
}

.colorLight {
    opacity: .8;
}

.toggleHide {
    display: none;
}

.toggleSection {
    position: relative;
    cursor: pointer;
}

.toggleSection:hover {
    background: #58bbee55;
}

.toggleSection i {
    padding: 10px;
    color: #58bbee;
    font-size: 1.8em;
    vertical-align: middle;
}

.toggleSection:after {
    margin-left: 10px;
    font-family: FontAwesome;
    content: "\f107";
}

.toggleSection.active:after {
    content: "\f106";
}