html {
    font-size: 14px;
}

body {
    font-family: "Sarabun", sans-serif;
    background-color: #fff;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-kanit {
    font-family: "Kanit", sans-serif;
}

a {
    -webkit-transition: .3s all ease;
    -o-transition: .3s all ease;
    transition: .3s all ease;
}

a:hover {
    text-decoration: none !important;
}

.half .bg {
    height: 200px;
    background: #edeafd url('../images/bg-expenses-login.jpg') no-repeat center center;
    background-size: cover;
}

.half .contents {
    background: #edeafd;
    min-height: calc(100vh - 200px);
}

.half .contents,
.half .bg {
    width: 100%;
}

.logo-block {
    margin-top: 1.6rem;
}

.logo-block img {
    height: 75px;
    border: 3px solid #fff;
    border-radius: 50%;
}

.logo-block .text-th {
    font-size: 1.7rem;
    margin-top: 5px;
}

.logo-block .text-en {
    font-size: 1.14rem;
}

.form-block {
    background: #fff;
    padding: 30px;
    margin-top: -75px;
    border-radius: 10px;
}

.text-project {
    font-size: 1.1rem;
    color: #1565C0;
}

.swal2-modal,
.swal2-confirm {
    font-family: 'Kanit', sans-serif;
    font-weight: 400;
}

.swal2-title {
    font-size: 1.25rem !important;
    font-weight: 400 !important;
}

.swal2-actions .btn {
    font-size: 1.1rem !important;
    padding: .5em 1.5em !important;
}

.swal2-actions .btn:focus {
    box-shadow: none;
}

.btn-primary {
    color: #fff;
    background-color: #7f5feb;
    border-color: #7f5feb;
}

.btn-primary:hover {
    color: #fff;
    background-color: #7352e5;
    border-color: #7352e5;
}

.btn-primary:focus,
.btn-primary.focus {
    color: #fff;
    background-color: #7352e5;
    border-color: #7352e5;
    box-shadow: 0 0 0 0.2rem rgba(127, 95, 235, 0.5);
}

.btn-primary.disabled,
.btn-primary:disabled {
    color: #fff;
    background-color: #7352e5;
    border-color: #7352e5;
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: #7352e5;
    border-color: #7352e5;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus {
    box-shadow: 0 0 0 0.2rem rgba(127, 95, 235, 0.5);
}

@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }

    .logo-block img {
        height: 65px;
        border: 3px solid #fff;
        border-radius: 50%;
    }

    .logo-block .text-th {
        font-size: 1.2rem;
        margin-top: 8px;
    }

    .logo-block .text-en {
        font-size: 0.86rem;
    }

    .half,
    .half .container>.row-form {
        min-height: 470px;
    }

    .form-block {
        margin-top: -100px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 0.95rem;
    }

    .text-project {
        font-size: 0.95rem;
    }
}

.required:after {
    display: inline-block;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: "\f069";
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #F00;
    font-size: 0.6rem;
    vertical-align: super;
    padding-left: 3px;
    padding-right: 3px;
}

.tab-content .form-header {
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 20px;
    color: #543d9a;
}

.tab-content .form-header.mt-5 {
    margin-top: 2.5rem !important;
}

.tab-content .alert {
    font-size: 1.05rem;
}

.tab-content .form-group {
    margin-bottom: 1.8rem;
}

.tab-content .form-group label {
    font-size: 1.05rem;
}

.tab-content .form-group .form-control {
    font-size: 1.05rem;
    height: calc(1.8em + .75rem + 2px);
    line-height: 2.67em;
}

.tab-content .form-group .form-control[disabled],
.tab-content .form-control[readonly],
.tab-content fieldset[disabled] .form-control {
    background-color: rgba(236, 239, 241, .5);
    color: inherit;
}

.tab-content .form-group .form-control.is-invalid {
    color: #dc3545;
}

.tab-content .invalid-feedback,
.tab-content .invalid-feedback {
    font-size: 0.9rem !important;
}

.select2-container--default .select2-selection--single {
    /*padding-top: 0.15rem;*/
    height: calc(1.8em + .75rem + 2px);
    border-color: #ced4da;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 1.05rem;
    line-height: calc(1.8em + .75rem - 3px);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.8em + .75rem);
}

.select2-dropdown {
    border-color: #ced4da;
}

.select2-container .is-valid {
    border-color: #28a745;
}

.select2-container .is-valid:focus,
.select2-container--default.select2-container--open .select2-selection--single.is-valid,
.select2-container--default.select2-container--focus .select2-selection--multiple.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.select2-container .is-invalid {
    border-color: #dc3545;
}

.select2-container .is-invalid:focus,
.select2-container--default.select2-container--open .select2-selection--single.is-invalid,
.select2-container--default.select2-container--focus .select2-selection--multiple.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin-bottom: 0;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin: 0;
    overflow: hidden;
    opacity: 0;
}

.custom-file-input~.custom-file-label {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-file-input:focus~.custom-file-label {
    background-color: var(--bs-body-bg);
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}

.custom-file-input[disabled]~.custom-file-label,
.custom-file-input:disabled~.custom-file-label {
    background-color: #e9ecef;
}

.custom-file-input:lang(en)~.custom-file-label::after {
    content: "Browse";
}

.custom-file-input~.custom-file-label[data-browse]::after {
    content: attr(data-browse);
    padding-right: 30px;
}

.custom-file-input.is-invalid~.custom-file-label {
    border-color: #dc3545;
}

.custom-file-input.is-invalid:focus~.custom-file-label {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 0.75rem + 2px);
    padding: .375rem .75rem;
    overflow: hidden;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(1.5em + 0.75rem);
    padding: .375rem .75rem;
    line-height: 1.5;
    color: #495057;
    content: "Browse";
    background-color: #e9ecef;
    border-left: inherit;
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

.custom-file-label {
    padding-right: 70px;
}

.custom-file .delete-file {
    position: absolute;
    right: 75px;
    top: 0.45rem;
    z-index: 10;
    color: #78909C;
    font-size: 1rem;
}

.custom-file .delete-file:hover {
    color: #e53935;
    cursor: pointer;
}

.form-choice .card {
    border-width: 1px;
    border-color: rgba(96, 125, 139, 0.25);
    cursor: pointer;
    color: #455A64;
    font-size: 1.05rem;
    line-height: 1.7;
}

.form-choice .card:hover {
    background: #f9f9f9;
}

.form-choice input[type="radio"]:empty {
    position: absolute;
    opacity: 0;
}

.form-choice input[type="radio"]:checked~label {
    border-color: #4CAF50 !important;
    background: rgba(232, 245, 233, 0.7);
    color: #2E7D32 !important;
}

.form-choice input[type="radio"]:checked~label.choice-danger {
    border-color: #E57373 !important;
    background: rgba(255, 235, 238, 0.6);
    color: #D32F2F !important;
}

.form-choice input[type="radio"]:checked~label.choice-relation {
    border-color: #FB8C00 !important;
    background: rgba(255, 243, 224, 0.5);
    color: #EF6C00 !important;
}

.mat-radio-container {
    box-sizing: border-box;
    display: inline-block;
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    vertical-align: middle;
    margin-right: 8px;
    margin-top: -5px;
}

.mat-radio-outer-circle {
    box-sizing: border-box;
    display: inline-block;
    height: 20px;
    left: 0;
    position: absolute;
    top: 0;
    transition: border-color ease 280ms;
    width: 20px;
    border-width: 2px;
    border-style: solid;
    border-radius: 50%;
    background: #FFF;
}

.mat-radio-inner-circle {
    border-radius: 50%;
    box-sizing: border-box;
    display: inline-block;
    height: 20px;
    left: 0;
    position: absolute;
    top: 0;
    opacity: 0;
    transition: transform ease 280ms, background-color ease 280ms, opacity linear 1ms 280ms;
    width: 20px;
    transform: scale(0.001);
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
}

.form-choice input[type="radio"]:checked~label .mat-radio-inner-circle {
    transform: scale(0.5);
    opacity: 1;
    transition: transform ease 280ms, background-color ease 280ms;
    background: #388E3C;
}

.form-choice input[type="radio"]:checked~label.choice-danger .mat-radio-inner-circle {
    background: #D32F2F;
}

.form-choice input[type="radio"]:checked~label.choice-relation .mat-radio-inner-circle {
    background: #D84315;
}

.custom-file {
    width: 100%;
    max-width: 100%;
    height: calc(1.8em + .75rem + 2px);
}

/* upload preview */
.upload-preview-loading {
    display: none;
    color: #AD1457;
    font-size: 1rem;
    font-weight: normal;
    margin-top: 3px;
}

.upload-preview-img {
    display: none;
    border-radius: 5px;
    max-width: 100%;
    max-height: 600px;
    margin-top: 1.2rem !important;
}

.upload-preview-img-box {
    max-width: 100%;
    overflow: auto;
}

.upload-preview-pdf {
    display: none;
    max-width: 100%;
    max-height: 600px;
    border: 1px solid #E0E0E0;
    border-radius: 5px;
}

.upload-preview-pdf-box {
    display: none;
    margin-top: 1.2rem !important;
    /*margin-bottom: 1rem;*/
    padding: .3rem 0rem;
}

.upload-preview-pdf {
    max-height: 450px;
    max-width: 100%;
    border: 1px dashed #dee2e6 !important;
    margin-top: 15px;
}

.upload-preview-img {
    max-height: 450px;
    max-width: 100%;
    border: 1px dashed #dee2e6 !important;
    border-radius: 4px;
}

.upload-preview-pdf-page,
.upload-preview-img-box {
    /*text-align: center;*/
}

.upload-preview-pdf-box .btn {
    font-size: 0.9rem;
    padding: .3rem .5rem;
}

.wizard-card .tab-content {
    padding: 135px 0px 0px;
}

.list-group .list-group-item {
    font-size: 1.05rem;
}

.list-group .list-group-item:last-child {
    border-bottom: 0px;
}

.list-group-item .row>div:first-child,
.list-group-item .text-label {
    text-align: right;
    color: #455A64;
}

.list-group-item .row>div.font-weight-bold:last-child {
    font-weight: 400 !important;
}

@media (max-width: 767px) {
    .form-choice .card {
        font-size: 1.05rem;
    }

    .list-group-item .row>div:first-child,
    .list-group-item .text-label {
        text-align: left;
    }

    .list-group-item .row>div:first-child {
        padding-bottom: 0.5rem;
    }

    .list-group-item .row>div {
        padding-right: 5px;
        padding-left: 5px;
    }

    .pdf-preview iframe {
        min-height: 550px !important;
    }
}

.custom-switch label{
    cursor: pointer;
}

.form-row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-right: -5px;
    margin-left: -5px;
}

.form-row>.col,
.form-row>[class*="col-"] {
    padding-right: 5px;
    padding-left: 5px;
}

.form-row>.col>.valid-tooltip,
.form-row>[class*="col-"]>.valid-tooltip {
    left: 5px;
}

.form-row > .col > .invalid-tooltip,
.form-row > [class*="col-"] > .invalid-tooltip {
  left: 5px;
}