/* HELPER */
.text-left {
    text-align: left;
}

.margin-left-15 {
    margin-left: 15px;
}

.margin-top-8-force {
    margin-top: 8px !important;
}

.margin-bottom-30 {
    margin-bottom: 30px !important;
}

.font-18 {
    font-size: 18px;
}

.font-18-force {
    font-size: 18px !important;
}

.font-16 {
    font-size: 16px;
}

.font-16-force {
    font-size: 16px !important;
}

.font-13 {
    font-size: 13px;
}

.font-13-force {
    font-size: 13px !important;
}


/* CUSTOMIZE */
.content-top-padding {
    margin-top: 65px !important;
}

.btn-transparent {
    color: #fff !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

.btn-transparent:hover {
    color: #fff !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

.btn-transparent:focus, .btn-transparent.focus {
    outline: 0 !important;
    color: #ffffff !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.btn-deep {
    color: #fff !important;
    background-color: #179c9b !important;
    border-color: #179c9b !important;
}

.btn-deep:hover, .btn-deep:focus {
    color: #fff !important;
    background-color: #148584 !important;
    border-color: #148584 !important;
}

.dropdown-transparent.active, .dropdown-transparent:active {
    outline: 0 !important;
    color: #fff;
    text-decoration: none;
    background-color: transparent !important;
}

.dropdown-menu .dropdown-item .dropdown-icon {
    color: #adb3b6;
    font-size: 16px;
    margin-right: 10px;
}

.hk-navbar {
    height: 57px !important;
    flex-flow: nowrap !important;
}

.modal-backdrop {
    z-index: 1000000 !important;
}

.nav-treeview .nav-item > .nav-link {
    padding: 0.35rem 1rem 0.35rem 3.3rem !important;
    font-size: 16px !important;
}

.sidebar {
    margin-top: 7px !important;
}

.main-sidebar {
    width: 290px;
}

.sidebar-collapse .main-sidebar {
    width: 250px;
}

.content-wrapper {
    margin-left: 290px !important;
}

.sidebar-collapse .content-wrapper {
    margin-left: 0px !important;
}

.nav-separator {
    border-top: 1px solid #eaecec;
    border-color: rgba(255, 255, 255, 0.05);
    width: 100%;
    margin: 15px 0;
}

.subtitle-profile {
    font-size: 13px !important;
    color: #5e7d8a !important;
}

.box-main-shadow {
    box-shadow: 5px 0px 10px rgba(0, 0, 0, 0.5) !important;
}

.box-shadow-none {
    box-shadow: none !important;
}

.bg-main {
    background-color: #fcf8f9 !important;
}

.text-light-dark {
    color: #656a70 !important;
}

.page-heading {
    border-left: 6px solid;
    padding-left: 15px;
    font-size: 20px !important;
}

.content-header {
    padding: 15px .5rem;
}


/* OVERRIDE */
.modal-content {
    border-radius: .25rem !important;
    border: none !important;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1) !important;
}

#profile-menu {
    color: rgba(255, 255, 255, 0.7) !important;
}

#profile-menu:hover {
    color: rgba(255, 255, 255, 1.0) !important;
}

.content-wrapper {
    background-color: #fcf8f9 !important;
}

/* LOADING */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: linear-gradient(to top, #ea689f, #df4b93);
}

.loading-container .loading-wrap .loading {
    border:7px solid;
    width:100px;
    height:100px;
    border-radius:50%;
    border-color:#31653b transparent transparent;
    animation:spin 2s linear infinite;
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    margin:auto;
    z-index: 10;
}

.loading-container .loading-wrap .bg-loading {
    border:7px solid;
    width:100px;
    height:100px;
    border-radius:50%;
    border-color: rgba(173, 173, 173, 0.2);
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    margin:auto;
    z-index: 5;
}

.loading-container .branding, .loading-container .loading-wrap {
    grid-area: 1 / 1;
}

.loading-container .branding {
    position: absolute;
    top: 50%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

@keyframes spin{
    100% {
        transform:rotate(360deg);
        filter:rotate(360deg)
    }
}

@keyframes rotate {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}

.spinner {
    animation: rotate 1s linear infinite;
    background: #31653b;
    border-radius: 50%;
    height: 90px;
    width: 90px;
    position: relative;
    margin-top: -94%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    z-index: -1;
}

.spinner:before,
.spinner:after {
    content: '';
    position: absolute;
}

.spinner:before {
    border-radius: 50%;
    background:
            linear-gradient(0deg,   hsla(0, 0%, 100%, 1  ) 50%, hsla(0, 0%, 100%, 0.9) 100%)   0%   0%,
            linear-gradient(90deg,  hsla(0, 0%, 100%, 0.9)  0%, hsla(0, 0%, 100%, 0.8) 100%) 100%   0%,
            linear-gradient(180deg, hsla(0, 0%, 100%, 0.8)  0%, hsla(0, 0%, 100%, 0.3) 100%) 100% 100%,
            linear-gradient(360deg, hsla(0, 0%, 100%, 0.3)  0%, hsla(0, 0%, 100%, 0  ) 100%)   0% 100%
;
    background-repeat: no-repeat;
    background-size: 50% 50%;
    top: -1px;
    bottom: -1px;
    left: -1px;
    right: -1px;
}

.spinner:after {
    background: white;
    border-radius: 50%;
    top: 7%;
    bottom: 7%;
    left: 7%;
    right: 7%;
}

/* LABEL */
.label {
    display: inline-block;
    padding: .25em .4em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    -webkit-border-radius: .25rem;
    border-radius: .25rem;
}

.label-dark {
    background-color: #5e7d8a;
}

.label-color-dark {
    color: #5e7d8a;
}

/* LIST GROUP */
.list-group-flush {
    border-radius: 0;
}

.list-group {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    border-radius: .25rem;
}

.list-group-flush>.list-group-item:last-child {
    border-bottom-width: 0;
}

.list-group-flush>.list-group-item {
    border-width: 0 0 1px;
}

.list-group-item:last-child {
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
}

.list-group-item:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.list-group-item {
    border-color: #eaecec;
}

.list-group-item {
    position: relative;
    display: block;
    padding: .75rem 1.25rem;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.125);
}

/* SECTION */
@media (max-width: 1400px) {
    .section-wrapper {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

.section-wrapper {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #eaecec;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    border-radius: .25rem;
    margin-bottom: 30px;
}

/* VERTICAL TABS */
.tabs-box {
    margin-bottom: .75rem;
    margin-top: .75rem;
}

.vertical-tabs-section {
    display: flex;
    justify-content: flex-start;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

.vertical-section-nav {
    width: 21%;
    max-width: 21%;
}

.vertical-tbl {
    width: 100%;
}

.vertical-nav {
    display: block;
}

.vertical-nav-item {
    display: block !important;
}

.vertical-section-nav .vertical-nav-item .nav-link {
    border-left: 1px solid #d8e2e7;
    border-right: 1px solid #d8e2e7;
}

.vertical-section-nav .vertical-nav-item:first-child .nav-link {
    border-left: 1px solid #d8e2e7;
}

.vertical-section-nav .vertical-nav-item:last-child .nav-link {
    border-right: 1px solid #d8e2e7;
}

.vertical-section-nav.tabs-section-nav-icons .nav-link.active {
    color: #ea689f;
    border-right: 0px solid transparent;
    border-bottom: 1px solid #d8e2e7;
}

.vertical-section-nav .nav-link.active .nav-link-in {
    border-top: 4px solid transparent;
    border-left: 4px solid #ea689f;
}

.vertical-section-nav.tabs-section-nav-icons .nav-link-in {
    line-height: 1.5;
}

.vertical-section-nav.tabs-section-nav-icons .nav-link.active .wrap-nav-link .font-icon,
.vertical-section-nav.tabs-section-nav-icons .nav-link.active .wrap-nav-link .glyphicon,
.vertical-section-nav.tabs-section-nav-icons .nav-link.active .wrap-nav-link .fa,
.vertical-section-nav.tabs-section-nav-icons .nav-link.active .wrap-nav-link .fas,
.vertical-section-nav.tabs-section-nav-icons .nav-link.active .wrap-nav-link .far {
    color: #ea689f;
}

.vertical-tabs-section > .vertical-tab-content:not(.no-styled) {
    border-left: 0px solid transparent;
    border-top: solid 1px #d8e2e7;
    border-bottom: solid 1px #d8e2e7;
    border-right: solid 1px #d8e2e7;
    border-radius: 0 5px 5px 0px;
    padding: 9px;
    margin-left: -1px;
}

.desktop-nav-link {
    display: block;
    text-align: left;
}

.mobile-nav-link {
    display: none;
}

.vertical-tab-content {
    width: 100%;
}

.vtabs-content {
    padding: 10px 10px 10px 21px;
}

.bg-default-grey {
    background-color: #f5f5f6 !important;
}

.card-block {
    padding-top: 16px;
    padding-bottom: 16px;
}

.card {
    border-color: #d8e2e7;
}

/* **** TABLET MODE **** */
@media only screen and (max-width: 844px) {
    .vertical-tabs-section {
        display: block !important;
        justify-content: unset !important;
    }

    .tabs-section-nav {
        width: 100% !important;
        max-width: 100% !important;
    }

    .vertical-nav {
        display: table-row !important;
    }

    .vertical-nav-item {
        display: table-cell !important;
    }

    .vertical-section-nav .nav-link.active .nav-link-in {
        border-top: solid 4px #2C7ABD;
        border-left: 0px solid transparent;
    }

    .vertical-section-nav .nav-item:last-child .nav-link {
        border-right: solid 1px #d8e2e7;
    }

    .vertical-section-nav .nav-item:first-child .nav-link {
        border-right: solid 1px #d8e2e7;
    }


    .vertical-tab-content {
        border: solid 1px #d8e2e7 !important;
    }

    .vertical-tabs-section > .vertical-tab-content:not(.no-styled) {
        border-top: none !important;
        -webkit-border-radius: 0 0 5px 5px;
        border-radius: 0 0 5px 5px;
    }

    .desktop-nav-link {
        display: none;
        text-align: left;
    }

    .mobile-nav-link {
        display: block;
    }

}

@media only screen and (max-width: 479px) {
    .vertical-tab .nav-tabs {
        width: 100%;
        display: block;
        border: none;
    }

    .vertical-tab .tab-content{
        padding: 25px 20px;
        margin-top: 0;
        display: block;
    }

    .vertical-tab .tab-content h3 {
        font-size: 18px;
    }
}

.tabs-section {
    margin: 0 0 20px;
}

.tabs-section-nav {
    overflow: auto;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    border-top: solid 1px #d8e2e7;
}

.tabs-section-nav .tbl .nav-item {
    float: none;
    display: table-cell;
    vertical-align: middle;
}
.tabs-section-nav .nav-item {
    float: left;
    background: #f5f5f6;
    white-space: nowrap;
}

.tabs-section-nav .tbl .nav {
    display: table-row;
}

.tbl {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.tabs-section-nav .nav-link.active {
    border-left-color: #d8e2e7;
    border-right-color: #d8e2e7;
    background: #fff;
    color: #343434;
    border-bottom-color: #fff;
}

.tabs-section-nav .nav-link {
    display: block;
    color: #6c7a86;
    font-weight: 600;
    border: solid 1px #d8e2e7;
    border-left-color: transparent;
    border-right-color: transparent;
    border-top: none;
    padding: 0rem;
}

.tabs-section-nav .nav-link-in {
    display: block;
    padding: 10px;
    line-height: 28px;
    border-top: solid 4px transparent;
    -webkit-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
}

.vertical-tab-content, .tab-content {
    background-color: #FFF;
}

/* FORM */
.form-group {
    margin-bottom: 1rem !important;
}

.form-control:focus {
    box-shadow: none !important;
    border-color: #ea689f;
    border-width: 2px;
}


/* DATATABLE */
table.dataTable {
    margin-top: 20px !important;
}

.table thead tr {
    background-color: #E0E0E0 !important;
}

.table thead tr th {
    border-left: 1px solid #FFF;
    border-right: 1px solid #FFF;
    font-weight: bold;
    font-size: 15px;
}

.table tbody tr td {
    border-left: 1px solid #FFF;
    border-right: 1px solid #FFF;
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background-color: #f3dce4;
    color: #324148;
}

.datatable-length {
    display: block;
    width: 100%;
    height: 33px;
    padding: 2px .5rem .25rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #324148;
    background-color: #fff;
    border: 2px solid #eaecec;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-user-select: none;
}

.datatable-search {
    margin-left: 0;
    color: #5e7d8a;
    font-size: 0.875rem;
    padding: .25rem .5rem;
    height: calc(1.8125rem + 4px);
    line-height: 1.5;
    border-radius: .2rem;
    display: block;
    width: 100%;
    font-weight: 400;
    background-color: #fff;
    background-clip: padding-box;
    border: 2px solid #eaecec;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0;
    margin-left: 0;
    cursor: default;
    color: #666 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
}

.pagination .page-item.disabled .page-link {
    color: #c1c6c8;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: .25rem;
    border-bottom-left-radius: .25rem;
}

.pagination .page-item.active .page-link {
    background: #e84c93;
    border-color: #e84c93;
    color: #fff;
}

.pagination .page-item .page-link {
    background: #fff;
    color: #179c9b;
    font-weight: 700;
}

.pagination .page-item.next  .page-link {
    background: #fff;
    color: #179c9b;
    font-weight: 700;
}

table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>th:first-child:before {
    font-family: 'Courier New', Courier, monospace;
    line-height: 14px !important;
    content: '' !important;
    background-color: #e84c93 !important;
    background-image: url('../img/chevron-down-solid.svg') !important;
    background-size: 9px 15px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before {
    content: '-' !important;
    background-color: #d33333 !important;
    background-image: none !important;
}

div.dataTables_wrapper div.dataTables_processing {
    position: fixed !important;
}

.mark, mark {
    color: #FF0000 !important;
    padding: 0 !important;
    background-color: #ffffff00 !important;
    font-weight: bold !important;
}

.pdf-sign-viewer {
    text-align: center;
}

/* For pdf */
.react-pdf__Page {
    margin: 10px 0px;
}

.react-pdf__Page__canvas, .canvas-signature-area > .canvas-container {
    /*border: 1px solid darkgrey;*/
    box-shadow: 0px 0px 5px 1px #ccc;
    border-radius: 3px;
    margin: 0 auto;
}

.canvas-signature-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

#react-doc-viewer #msdoc-renderer {
    Height: 55vh;
}

.document-by {
    font-size: 16px;
}

.document-by.active {
    color: #e84c93;
    font-weight: bold;
}

.dropdown-item-min-width {
    min-width: 285px;
    white-space: normal !important
}

.ql-toolbar.ql-snow {
    width: 130mm;
}

.ql-editor {
    width: 130mm;
}

.ql-container.ql-snow {
    width: 130mm;
}

.quill {
    overflow: auto;
}

:root {
    --document-top-margin: 1.5cm;
    --document-teft-margin: 3cm;
    --document-bottom-margin: 1.5cm;
    --document-right-margin: 2cm;
    --document-text-indent: 2.5cm;
}

@media (min-width: 992px) {
    .fr-box.fr-document .fr-wrapper .fr-element {
        padding:var(--document-top-margin) var(--document-right-margin) var(--document-bottom-margin) var(--document-teft-margin) !important;
    }

    .fr-view::before {
        content: '';
        height: 100%;
        position: absolute;
        top: 0;
        left: var(--document-teft-margin);
        border: none;
        border-left: 1px dashed rgba(0, 0, 0, 0.1);
    }

    .fr-view::after {
        content: '';
        height: 100%;
        position: absolute;
        top: 0;
        right: var(--document-right-margin);
        border: none;
        border-right: 1px dashed rgba(0, 0, 0, 0.1);
    }
}

.fr-box.fr-basic .fr-element {
    font-family: THSarabun, sans-serif !important;
    font-size: 16pt !important;
    line-height: 1.1 !important;
}

.fr-box.fr-basic .fr-element p {
    text-indent: var(--document-text-indent);
    margin-top: 0;
    margin-bottom: 6pt;
}

.fr-command[data-cmd="fontSize"] span{
    width: 50px !important;
}
