@font-face {
    font-family: 'dbozone';
    src: url('../../font/DBOZone/DBOzoneX.woff2') format('woff2'), url('../../font/DBOZone/DBOzoneX.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'dbozonebold';
    src: url('../../font/DBOZone/DBOzoneXBold.woff2') format('woff2'), url('../../font/DBOZone/DBOzoneXBold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'tahoma';
    src: url('../../font/DBOZone/Tahoma.woff2') format('woff2'), url('../../font/DBOZone/Tahoma.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

/* Root Variables สำหรับ Font Scaling */
:root {
    --font-scale: 1;
    --base-font-size: 1.1rem;
    --header-font-size: clamp(1.5rem, 4vw, 1.5rem);
    --badge-font-size: clamp(1.5rem, 3vw, 1.1rem);
    --min-height: 60px;
    --main-title-size: clamp(2rem, 8vw, 3rem);
    --section-title-size: clamp(1.25rem, 5vw, 1.875rem);
    --vh: 1vh;
}

.font-level-1 {
    --font-scale: 1.1;
    --base-font-size: 1.21rem;
    --header-font-size: clamp(1.1rem, 4.4vw, 1.65rem);
    --badge-font-size: clamp(1.65rem, 3.3vw, 1.21rem);
    --min-height: 65px;
    --main-title-size: clamp(2.2rem, 8.8vw, 3.3rem);
    --section-title-size: clamp(1.375rem, 5.5vw, 2.0625rem);
}

.font-level-2 {
    --font-scale: 1.2;
    --base-font-size: 1.32rem;
    --header-font-size: clamp(1.2rem, 4.8vw, 1.8rem);
    --badge-font-size: clamp(1.8rem, 3.6vw, 1.32rem);
    --min-height: 70px;
    --main-title-size: clamp(2.4rem, 9.6vw, 3.6rem);
    --section-title-size: clamp(1.5rem, 6vw, 2.25rem);
}

.font-level-3 {
    --font-scale: 1.3;
    --base-font-size: 1.43rem;
    --header-font-size: clamp(1.3rem, 5.2vw, 1.95rem);
    --badge-font-size: clamp(1.95rem, 3.9vw, 1.43rem);
    --min-height: 75px;
    --main-title-size: clamp(2.6rem, 10.4vw, 3.9rem);
    --section-title-size: clamp(1.625rem, 6.5vw, 2.4375rem);
}

.font_DBOZone {
    font-family: dbozone !important;
}

.font_DBOZoneBold {
    font-family: dbozonebold !important;
}

.font_Sarabun {
    font-family: Tahoma !important;
}

html {
    font-family: th_sarabun;
}

/* Base body font size ที่ใช้ CSS Variables */
body, .tooltip, .popover, p, .context-menu-item span {
    font-family: dbozone;
    padding-bottom: 0px;
    font-size: var(--base-font-size);
}

.toggle-icon {
    font-size: calc(0.8em * var(--font-scale));
    cursor: pointer;
}



/* Main title scaling */
h3[style*="font-size: 48px"] {
    font-size: var(--main-title-size) !important;
    margin: 0;
}

/* Section title scaling */
span[style*="font-size: 30px"] {
    font-size: var(--section-title-size) !important;
}

h3 {
    margin: 0;
}

.field-validation-error {
    display: block;
    margin-top: 0.2rem;
}

.input-validation-error {
    border: 1px solid #dc3545;
}

.card-footers {
    max-height: 60px;
    height: 60px;
    overflow-y: auto;
}

.card-headers {
    margin-bottom: 70px;
}

.card-headers-title {
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 15px;
    width: 100%;
    border-bottom: 2px solid rgba(0, 0, 0, 0.125);
    height: 50px;
    line-height: 20px;
    font-size: calc(0.75rem * var(--font-scale));
    text-align: right;
}

.navbar .user .name {
    color: #fff !important;
}

.menu .sub-menu {
    box-shadow: inset -20px 0px 20px 0px rgb(0 0 0 / 5%), -20px 0px 20px 0px rgb(0 0 0 / 5%);
}

.rounded .sub-menu {
    border-radius: unset !important;
}

.menu .main-menu ul li a {
    height: 80px;
    color: white;
    border-bottom: unset;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.scroll {
    padding-bottom: 150px;
}

.classList {
    margin-left: 330px;
    margin-right: 20px;
    margin-top: 0px;
}

.fixed-user-button {
    position: fixed !important;
    bottom: 0px;
    width: 80px;
    cursor: pointer;
    background-color: #19449c;
}

.rounded.sub-hidden .main-menu, .rounded.menu-sub-hidden .main-menu {
    border-radius: unset;
}

#app-container.sub-hidden main, #app-container.menu-sub-hidden main, #app-container.menu-hidden main {
    margin-left: 100px;
}

.menu .main-menu ul li.active:after {
    content: unset;
}

ul li {
    margin-bottom: unset;
}

.menu .main-menu ul li:not(.active,.fixed-user-buttons) a {
    background-size: 200%;
}

.menu .main-menu ul li.active a {
    color: white;
    background-color: #19449c;
}

.menu .main-menu ul li:not(.fixed-user-buttons) a:hover {
    color: white;
    background-position: left;
    transition: .2s ease-out;
}

.menu .main-menu ul li div a.icons {
    position: relative;
    background-color: red !important;
}

.menu .main-menu ul li div a:hover {
    background-position: unset !important;
    transition: unset !important;
}

.menu .main-menu {
    background: #19449C;
}

.menu .sub-menu {
    background: #f6f7fb;
    padding: 0px;
}

.menu .main-menu ul li a:hover, .menu .main-menu ul li a:focus {
    color: white;
}

.menu .main-menu ul li a.icons {
    position: relative;
}

.menu .main-menu ul li:not(.active) a.icons:after {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    transform-origin: left;
    transition: width .25s ease;
    background: rgba(253,253,253,.18);
}

.menu .main-menu ul li a.icons:hover:after {
    width: 100%;
}

#app-container.menu-mobile .main-menu {
    transform: unset;
}

input[type="radio"]:checked + label {
    background-color: unset;
    color: unset;
}

input[type="radio"] + label {
    padding: unset;
    background-color: unset;
    display: unset;
    border: unset;
}

input[type="radio"] {
    display: unset;
}

.menu .main-menu ul li.active a.icons {
    background: rgba(253,253,253,.18);
}

:root {
    --primary: #19449c;
    --secondary: #fec13a;
    --submit: #19449c;
    --submit-hover: #0069d9;
    --submit-hover-border: #0062cc;
    --outline-cancel: #131113;
}
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

    .btn-primary:hover {
        color: #fff;
        background-color: #0069d9;
        border-color: #0062cc;
    }

    .btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle {
        color: #fff;
        background-color: #0062cc;
        border-color: #005cbf;
    }

.btn-submit {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

    .btn-submit:hover {
        color: #fff;
        background-color: var(--submit-hover);
        border-color: var(--submit-hover-border);
    }

.btn-outline-cancel {
    color: var(--outline-cancel);
    border-color: var(--outline-cancel);
}

    .btn-outline-cancel:hover {
        color: white;
        background-color: var(--outline-cancel);
        border-color: var(--outline-cancel);
    }

.mw-120 {
    min-width: 120px;
}

.mw-100 {
    min-width: 100px;
}

div.colp-container-button {
    display: block;
    box-shadow: #091e4214 0 0 0 1px, #091e4214 0 2px 4px 1px;
    color: #6b778c;
    cursor: pointer;
    height: 24px;
    opacity: 1;
    position: absolute;
    top: 47px;
    transform: translate(-50%);
    width: 24px;
    background: 0px center white;
    border: 1px;
    border-radius: 50%;
    left: 230px;
    z-index: 5;
    text-align: center;
    font-size: calc(1rem * var(--font-scale));
    line-height: 1.5;
}

#app-container.menu-sub-hide-mod .sub-menu {
    transform: translateX(-215px);
}

#app-container.menu-sub-hide-mod main.classList {
    margin-left: 120px;
}

.menu .sub-menu ul.inner-level-menu li a, .menu .sub-menu ul.inner-level-menu li i {
    color: #8f8f8f;
}

.menu .sub-menu ul li {
    margin: 5px 20px 5px 10px;
}

    .menu .sub-menu ul li a {
        padding: 10px;
        margin-bottom: 0px;
        line-height: 1.2;
        font-size: calc(1rem * var(--font-scale));
    }

    .menu .sub-menu ul li.active:after {
        content: unset;
    }

    .menu .sub-menu ul li.sub-menu-click:hover {
        background: #19449c;
        border-radius: 5px;
        transition: all 0.2s ease-in-out;
    }

    .menu .sub-menu ul li.active {
        background: #19449c;
        border-radius: 5px;
    }

    .menu .sub-menu ul li.sub-menu-click:hover a, .menu .sub-menu ul li.sub-menu-click:hover i {
        color: #fec13a !important;
        transition: all 0.2s ease-in-out;
    }

.colp-long-button {
    top: -50px;
    height: 100vh;
    left: 5px;
    width: 10px;
    position: absolute;
}

.menu .sub-menu ul li.active a, .menu .sub-menu ul li.active i {
    color: #fec13a !important;
}

.show-spinner-hide {
    opacity: 0;
}

.spinner-html:after {
    content: " ";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    border-top-color: rgba(0, 0, 0, 0.3);
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
    left: calc(50% - 15px);
    top: calc(50% - 15px);
    position: fixed;
    z-index: 10;
}

.application-header {
    line-height: 2.5;
    margin-bottom: 10px;
    font-size: calc(1.2rem * var(--font-scale));
    font-weight: 600;
    color: var(--primary);
}

.appilication-line-head {
    width: 100%;
    border-bottom: 1px solid #e6e9ee;
    position: absolute;
    left: 0;
}

.menu .main-menu ul li span {
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.2;
    white-space: nowrap;
    width: 100%;
    font-size: calc(11px * var(--font-scale));
}

.option-div {
    border-bottom: 1px solid white;
    margin: 0px 15px 0px 15px;
}

.form-control:focus {
    -webkit-box-shadow: unset;
    box-shadow: unset;
}

.search-box-dropdown {
    display: none;
    background-color: white;
    border: 1px solid #cbcbcb;
    width: 500px;
    position: absolute;
    border-radius: 0.4rem;
    z-index: 1;
    top: 48px;
}

.search-group-list {
    position: relative;
}

.pull-left {
    float: left;
}

.pull-right {
    float: right;
}

.search-box-btn {
    border-top: 1px solid #cbcbcb;
    padding: 10px 15px 10px 15px;
    line-height: 3;
    background: #f6f7fb;
    border-bottom-left-radius: 0.4rem;
    border-bottom-right-radius: 0.4rem;
}

.search-box-basic {
    padding: 15px;
}

.search-button-content button {
    text-align: center;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    padding: 10px;
    line-height: 1;
}

.search-flex-head {
    display: flex;
    align-items: stretch;
    max-width: 200px;
    height: 40px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    background: white;
    cursor: pointer;
}

    .search-flex-head > div {
        white-space: nowrap;
        text-overflow: ellipsis;
        color: var(--primary);
        padding: 10px;
    }

        .search-flex-head > div.search-icon-search {
            flex: 1;
            line-height: 1.2;
            text-align: center;
        }

        .search-flex-head > div.search-icon-content {
            flex: 8;
            text-align: left;
            line-height: 1.2;
        }

        .search-flex-head > div.search-icon-close {
            flex: 1;
            text-align: center;
            color: #ccc;
            font-size: calc(18px * var(--font-scale));
            line-height: 1;
        }

            .search-flex-head > div.search-icon-close:hover {
                color: var(--danger);
            }

.icon-button {
    font-size: calc(22px * var(--font-scale));
    border: none;
    background-color: transparent;
    padding: 0;
}

.form-control-md {
    line-height: 3;
    font-family: dbozone,DB Ozone X;
}

.form-group {
    margin-bottom: 0.6rem;
}

.menu .main-menu ul li i {
    font-size: calc(25px * var(--font-scale));
}

.menu .main-menu {
    width: 80px;
}

.menu .sub-menu {
    left: 80px;
}

i.default-icons {
    height: calc(30px * var(--font-scale));
    width: calc(30px * var(--font-scale));
    background: white;
    border-radius: 50%;
    margin-bottom: 5px;
    color: #19449c;
    text-align: center;
    line-height: 1.5 !important;
    font-style: normal;
    font-size: calc(18px * var(--font-scale)) !important;
    margin-top: 5px;
    font-weight: 500;
}

.sub-menu i.default-icons {
    height: calc(20px * var(--font-scale));
    width: calc(20px * var(--font-scale));
    background: #8f8f8f;
    border-radius: 50%;
    margin: 0px;
    color: #fff !important;
    line-height: 1.6 !important;
    font-size: calc(12px * var(--font-scale)) !important;
}

.span-font-awesome {
    justify-items: center;
    border-radius: 5px;
    margin: 5px;
    padding: 5px;
    height: calc(40px * var(--font-scale));
    background: #c1c1c1;
    display: inline-flex;
    width: calc(40px * var(--font-scale));
    cursor: pointer;
    text-align: center;
}

    .span-font-awesome i {
        width: 100%;
        line-height: 2;
    }

.font-awesome-html-detail {
    height: 300px;
    overflow: auto;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 5px;
}

.font-awesome-html-head i.default-icons {
    height: calc(30px * var(--font-scale));
    width: calc(30px * var(--font-scale));
    margin: 0;
    background: #3a3a3a;
    color: #c1c1c1;
    line-height: 1.6 !important;
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 0.6rem !important;
}

.btn:focus, .btn.focus {
    box-shadow: none !important;
}

.page-link:hover {
    z-index: unset;
}

.page-link:focus {
    box-shadow: none !important;
}

.page-link {
    color: var(--primary);
}

.page-item:first-child .page-link, .page-item:last-child .page-link, .page-item.active .page-link {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

table.row-border {
    border-collapse: collapse !important;
}

th {
    width: auto;
}

.row-border th, .row-border td {
    border-color: unset !important;
    vertical-align: middle;
    padding: 5px;
    font-size: calc(1rem * var(--font-scale));
}

.row-border thead th {
    border-color: #dee2e6 !important;
}

table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #bebebe3b !important;
}

ul.pagination li {
    margin: 0px 2px;
}

::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

.row-overflow {
    overflow: auto;
    max-height: 600px;
}

.label-validation {
    color: red;
    margin-bottom: 0px;
    font-size: calc(1.5rem * var(--font-scale));
}

.select2-container--default .select2-selection--single {
    height: 38px;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 38px;
        height: 100%;
        padding-left: 15px;
        font-size: calc(1rem * var(--font-scale));
    }

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

/* Don't Copy*/
.no-copy {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/*Input Number*/
.otp-container {
    text-align: center;
    margin-top: 20px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.otp-input {
    width: calc(40px * var(--font-scale));
    height: calc(40px * var(--font-scale));
    text-align: center;
    font-size: calc(20px * var(--font-scale));
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

    .otp-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }

.otp-request {
    margin-top: 10px;
    background-color: transparent;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: calc(16px * var(--font-scale));
}

    .otp-request:hover {
        text-decoration: underline;
    }

.otp-input.invalid {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    border-color: red;
}

.otp-inputetc {
    width: calc(40px * var(--font-scale));
    height: calc(40px * var(--font-scale));
    text-align: center;
    font-size: calc(24px * var(--font-scale));
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

    .otp-inputetc:focus {
        border-color: #007bff;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }

    .otp-inputetc.invalid {
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
        border-color: red;
    }

.modal-header {
    border-bottom: dotted;
}

.modal-footer {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    padding: 1rem;
}

.loader {
    margin: auto;
    border: 10px solid #EAF0F6;
    border-radius: 50%;
    border-top: 10px solid #105CD1;
    width: 100px;
    height: 100px;
    animation: spinner 4s linear infinite;
    position: relative;
    z-index: 10;
}

@keyframes countdown {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.5;
    }
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.5);
    z-index: 9998;
}

    .overlay.show {
        display: block;
    }

.title-text {
    color: #0d3ea5;
}

.overlayRt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.5);
    z-index: 9998;
}

.loaderRt {
    position: fixed !important;
    top: 40% !important;
    left: 48% !important;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 10px solid lightgray;
    border-top: 10px solid #3456db;
    border-radius: 50%;
    animation: spin 1s linear infinite !important;
    z-index: 9999;
}

.search {
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 20px;
    padding: 10px;
    transition-duration: 500ms;
    cursor: pointer;
    background-repeat: no-repeat;
    font-size: calc(15px * var(--font-scale));
    color: transparent;
    border: 1px solid white;
    overflow: hidden;
    background: url('../../icons/search-white.svg') no-repeat transparent;
    background-size: 22px;
    background-position: 45% 50%;
}

    .search:hover {
        cursor: pointer;
        border: 1px solid #FF9950;
        background: url('../../icons/search.svg') no-repeat transparent;
        background-size: 22px;
        background-position: 45% 50%;
    }

    .search:focus {
        width: 200px;
        cursor: pointer;
        padding-left: 40px;
        color: white;
        outline: none;
        border: 1px solid #FF9950;
        background-color: transparent;
        background: url('../../icons/search.svg') no-repeat;
        background-size: 22px;
        background-position: 10px 50%;
    }

#loadingContainer {
    position: relative;
}

#loadingSpinner {
    position: absolute;
    top: 45%;
    left: 45%;
    transform: translate(-50%, -50%);
    z-index: 100;
}
