﻿html {
    font-size: 14px;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media screen and (min-width: 0px) and (max-width:990px) {
    .card-sidebar {
        display: none;
    }

    .colp-260 {
        width: 0px !important;
        flex: none !important;
    }

    .colp-260-rev {
        width: 100% !important;
        flex: none !important;
    }
}

@media screen and (min-width: 0px) and (max-width:575px) {
    .show-hide-columns {
        justify-content: start !important;
    }
}


@media (min-width: 300px) {
    .modal-m {
        max-width: 550px;
    }
}


html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    color: #231F20;
}

/*-- FONT --*/
@font-face {
    font-family: 'Trirong';
    src: url('/fonts/Trirong-Regular.ttf') format('truetype');
}

body {
    font-family: 'Trirong' !important;
    background-image: url('../Image/bg-body.png'); /* ใช้ภาพเป็นพื้นหลัง */
    background-size: contain; /* ปรับขนาดภาพให้เหมาะสม */
    background-repeat: no-repeat; /* ไม่ให้ภาพซ้ำ */
    background-attachment: fixed; /* ทำให้ภาพพื้นหลังไม่เลื่อน */
}

:root {
    /* -- COLOR -- */
    --PRIMARY: #ED1C24;
    --SECONDARY: #6C6C6C;
    --SUCCESS: #46A44C;
    --LIGHT: #FFF;
    --DARK: #000;
    --GREEN: #46A44C;
    --RED: #ED1C24;
    --ORANGE: #f96d00;
    --YELLOW: #e6b800;
    --BLUE-BS: #007bff;
}



/*-- CUSTOM INPUT BUTTON --*/
.input-group > .form-control {
    border-radius: 10px;
    padding: .375rem .75rem;
}

.input-group-text {
    border-radius: 10px;
    border-left: none;
}

.form-control {
    line-height: 1.8 !important;
    border-radius: 10px;
}

    .form-control:focus {
        border-color: var(--PRIMARY) !important;
        box-shadow: 0 0 0 .25rem rgb(253 13 13 / 25%) !important;
    }

.form-select {
    line-height: 1.8 !important;
    border-radius: 10px;
}

    .form-select:focus {
        border-color: var(--PRIMARY) !important;
        box-shadow: 0 0 0 .25rem rgb(253 13 13 / 25%) !important;
    }

/*-- MODAL --*/
.modal-content {
    padding: 10px 30px 10px 30px;
}

.btn-close:focus {
    box-shadow: none;
}

/*-- FREE --*/
p {
    margin: 0px;
}

a {
    cursor: pointer;
}

hr {
    background-color: #C0C0C0;
    margin: 5px;
}

.bi {
    font-size: 20px !important;
}

.text-required, .text-red, .color-red {
    color: var(--PRIMARY);
}

.form-check-input {
    width: 1.4em;
    height: 1.4em;
    border: 1px solid var(--PRIMARY);
}

    .form-check-input:checked {
        background-color: var(--LIGHT);
        border-color: var(--PRIMARY);
    }

    .form-check-input:focus {
        border-color: var(--PRIMARY) !important;
        box-shadow: none;
    }

    .form-check-input:checked[type=radio] {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ED1C24'/%3e%3c/svg%3e");
    }

.check-box:checked {
    background-color: var(--PRIMARY) !important;
}

.check-box {
    cursor: pointer;
}

.ql-container.ql-snow {
    border-radius: 0 0 10px 10px !important;
}

.ql-toolbar.ql-snow {
    border-radius: 10px 10px 0 0 !important;
}

.ql-container {
    height: auto !important;
}

/*-- TABLE --*/
td {
    font-size: 14px;
}

    td > .form-select {
        font-size: 14px;
    }

    td > .form-control {
        font-size: 14px;
    }

.bi-arrow-left-short {
    font-size: 16px !important;
}

.bi-arrow-right-short {
    font-size: 16px !important;
}

.table-light {
    --bs-table-bg: #FBD2D3 !important;
    color: var(--PRIMARY);
}

thead {
    border-style: hidden !important;
}

.table-red {
    --bs-table-bg: #FBD2D3 !important;
    color: var(--PRIMARY);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-accent-bg: #FEF4F4 !important;
    border: var(--LIGHT) !important;
}

.table-scrolling {
    width: max-content;
    min-width: 100%;
}

.view {
    cursor: pointer;
    color: var(--PRIMARY);
}

/*-- SIZE TABLE WIDTH --*/
.TW-40 {
    width: 40px;
}

.TW-50 {
    width: 50px;
}

.TW-60 {
    width: 60px;
}

.TW-70 {
    width: 70px;
}

.TW-100 {
    width: 100px;
}

.TW-110 {
    width: 110px;
}

.TW-120 {
    width: 120px;
}

.TW-150 {
    width: 150px;
}

.TW-200 {
    width: 200px;
}

.TW-220 {
    width: 220px;
}

.TW-250 {
    min-width: 250px;
}

.TW-300 {
    width: 350px;
}

.TW-350 {
    width: 350px;
}

.TW-450 {
    width: 450px;
}

.TW-550 {
    width: 550px;
}

.TW-600 {
    width: 600px;
}

/*-- WIDTH & HEIGHT -- */
.W-28 {
    width: 28px;
}

.W-34 {
    width: 34px !important;
}

.W-50 {
    width: 50px;
}

.H-32 {
    height: 32px !important;
}

/*-- BUTTON --*/
.btn {
    line-height: 1.8em !important;
    border-radius: 10px;
    padding-left: 18px;
    padding-right: 18px;
    min-width: 9em;
}

    .btn:hover {
        color: var(--LIGHT) !important;
        background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
    }

    .btn:focus {
        box-shadow: none;
    }

.btn-red {
    background: var(--PRIMARY);
    color: var(--LIGHT);
}

.btn-blue {
    background: var(--BLUE-BS);
    color: var(--LIGHT);
}

    .btn-blue:hover {
        background: var(--BLUE-BS);
    }

.btn-yellow {
    background: var(--YELLOW);
    color: var(--LIGHT);
}

    .btn-yellow:hover {
        background: var(--YELLOW);
    }

.btn-orange {
    background: var(--ORANGE);
    color: var(--LIGHT);
}

    .btn-orange:hover {
        background: var(--ORANGE);
    }

.btn-green {
    border-radius: 10px;
    background: var(--SUCCESS);
    color: var(--LIGHT);
}

    .btn-green:hover {
        background: var(--SUCCESS);
    }

.btn-outline-red {
    border-radius: 10px;
    border: 1px solid var(--PRIMARY);
    background: var(--LIGHT);
    color: var(--PRIMARY);
}

.btn-outline-grey {
    border-radius: 10px;
    border: 1px solid var(--SECONDARY);
    background: var(--LIGHT);
    color: var(--SECONDARY);
}

    .btn-outline-grey:hover {
        background: var(--SECONDARY);
        color: var(--LIGHT);
    }

.btn-outline-green {
    border-radius: 10px;
    border: 1px solid var(--GREEN);
    background: var(--LIGHT);
    color: var(--GREEN);
}

    .btn-outline-green:hover {
        background: var(--GREEN);
        color: var(--LIGHT);
    }

.btn-table-red {
    background-color: var(--PRIMARY);
    color: var(--LIGHT);
    line-height: .8em !important;
    min-width: auto !important;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

.btn-table-yellow {
    background-color: #FFB800;
    color: var(--LIGHT);
    line-height: .8em !important;
    min-width: auto !important;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

.btn-table-blue {
    background-color: #E9F2FF;
    color: #277DFF;
    line-height: .8em !important;
    min-width: auto !important;
    border: 1px solid #277DFF;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

.btn-table-green {
    background-color: #ECF6ED;
    color: var(--SUCCESS);
    line-height: .8em !important;
    min-width: auto !important;
    border: 1px solid var(--SUCCESS);
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

.btn-outline-light-red {
    border-radius: 10px;
    background: rgba(244, 67, 54, 0.5);
    color: var(--LIGHT);
    min-width: auto !important;
}

.btn-outline-light-grey {
    border-radius: 10px;
    background: rgba(89, 89, 89, 0.50);
    color: var(--LIGHT);
}

.btn-search-input {
    min-width: 3.5em !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.btn-light-red {
    background-color: #FBD2D3 !important;
    color: var(--PRIMARY);
    min-width: 6em !important;
}

/*-- TEXT PAGES --*/
.text-maintopic {
    font-size: 22px;
    font-weight: 500;
    background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-subtopic {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/*-- UPLOAD FILE --*/

.in-group {
    flex-wrap: nowrap !important;
}

.input-group-append > p {
    margin: 0px;
}

.input-group-append {
    width: 24em;
    font-size: 12px;
    border-bottom: 1px solid #ECECEC !important;
}

.group-update {
    width: 15em;
}

.text-file {
    color: var(--DARK);
    font-size: 12px;
}

/*-- PAGINATION --*/
.text-pagination {
    color: #8B8F8E;
}

.page-link {
    color: var(--PRIMARY);
}

.page-item.active .page-link {
    background-color: var(--PRIMARY);
    border-color: var(--PRIMARY);
}

.page-link:focus {
    box-shadow: none;
}

/*-- INDEX --*/
.card-subtopic {
    border: 2px solid transparent;
    border-radius: 10px;
    background: linear-gradient(#FEF4F4, #FEF4F4) padding-box, /* สีพื้นหลังด้านใน */
    linear-gradient(90deg, #BA161C 0%, #400204 100%) border-box; /* ขอบไล่สี */
    background-origin: border-box;
    background-clip: padding-box, border-box;
    padding: 0.6em 1em;
    margin-bottom: 3px;
    cursor: pointer;
}

    .card-subtopic:hover {
        background: var(--PRIMARY);
        color: var(--LIGHT);
    }

.bi-file-earmark-post:hover {
    color: var(--LIGHT);
}

/*-- PROGRESS --*/
.circle-progress {
    width: 70px;
    height: 70px;
    background-color: #D9D9D9;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
}

    .circle-progress:hover {
        border: solid 2px var(--PRIMARY);
    }

    .circle-progress:active {
        background-color: var(--PRIMARY);
        color: var(--LIGHT);
    }

.CP-active {
    background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.CIP-active {
    background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
}

.bi-w {
    color: var(--LIGHT);
}

.center-progress {
    text-align-last: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 2em;
    cursor: pointer;
}

    .center-progress:hover {
        background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .center-progress:active {
        background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

/* -- ACCORDION -- */
.accordion-button {
    color: var(--DARK);
    background-color: #FEF4F4;
    box-shadow: none;
    border-top: 5px solid #410204;
    display: block !important;
    text-align: center;
}

    .accordion-button:not(.collapsed) {
        color: var(--LIGHT);
        background: linear-gradient(90deg, #BA161C 0%, #400204 100%);
        box-shadow: none;
        border-top: 5px solid #410204;
    }

    .accordion-button::after {
        background-image: none;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: none;
    }

    .accordion-button:focus {
        border-color: var(--PRIMARY) !important;
        box-shadow: none;
    }

.accordion-item {
    border: none;
}

/*-- CHECK BOX --*/
ul li:hover {
    background-color: #FEF4F4;
}

ul li {
    width: max-content;
}

/*-- COLOR --*/

.color-green {
    color: var(--SUCCESS);
}

.text-grey {
    color: #8F8F8F;
}

.FS-22 {
    font-size: 22px !important;
}

.FS-32 {
    font-size: 32px !important;
}

/* ปรับขนาดของ toggle โดยไม่ใช้ height */
.form-switch .form-check-switch {
    background-color: #ED1C24;
    width: 50px;
    height: 22px;
    position: relative;
    margin-right: 5px; /* ระยะห่างข้างปุ่มถัดไป */
    margin-top: 4px;
}


/* สีวงกลมภายใน toggle */
.form-check-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: left 0.2s ease;
}

/* เปลี่ยนสีพื้นหลังเป็นเขียวเมื่อ toggle ถูกเลือก */
.form-check-switch:checked {
    background-color: #4CAF50; /* เปลี่ยนเป็นสีเขียว */
    border-color: #4CAF50;
}

    /* เปลี่ยนตำแหน่งวงกลมเมื่อถูกเลือก */
    .form-check-switch:checked::before {
        left: 30px; /* ขยับวงกลมไปทางขวา */
    }


.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

    .tooltip-container .custom-tooltip {
        visibility: hidden;
        background-color: #333;
        color: #fff;
        text-align: center;
        border-radius: 4px;
        padding: 5px 10px;
        position: absolute;
        z-index: 1000;
        left: 170%; /* แสดง tooltip ด้านขวา */
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        font-size: 18px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        opacity: 0;
        transition: opacity 0.2s;
    }

        .tooltip-container .custom-tooltip::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 100%; /* ลูกศรชี้มาทางซ้าย */
            transform: translateY(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: transparent transparent transparent #333;
        }

    .tooltip-container:hover .custom-tooltip {
        visibility: visible;
        opacity: 1;
    }

/* -- DATE TIME -- */



.flatpickr-months .flatpickr-prev-month {
    width: 40px !important;
    height: 40px !important;
    padding: 8px !important;
    background-color: #FBD2D3;
    border-radius: 10px;
}


.flatpickr-months .flatpickr-next-month {
    width: 40px !important;
    height: 40px !important;
    padding: 8px !important;
    background-color: #FBD2D3;
    border-radius: 10px;
}

.flatpickr-months .flatpickr-prev-month {
    color: var(--PRIMARY) !important;
    fill: var(--PRIMARY) !important;
}

.flatpickr-months .flatpickr-next-month {
    color: var(--PRIMARY) !important;
    fill: var(--PRIMARY) !important;
}

.flatpickr-current-month {
    height: 40px !important;
    padding: 8px !important;
    background-color: #FBD2D3;
    border-radius: 10px;
    color: var(--PRIMARY) !important;
    font-size: 16px !important;
}

.flatpickr-monthDropdown-months {
    font-weight: bold !important;
}

.flatpickr-current-month input.cur-yea {
    font-weight: bold !important;
}

.flatpickr-months {
    height: 40px;
}

    .flatpickr-months .flatpickr-month {
        height: 40px !important;
    }

.flatpickr-weekdays {
    height: 40px !important;
}

.flatpickr-weekdaycontainer {
    height: 40px !important;
}

.flatpickr-weekday {
    height: 40px !important;
    background-color: #FBD2D3 !important;
    padding: 8px !important;
    border-radius: 10px;
    color: var(--PRIMARY) !important;
    font-size: 16px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.flatpickr-calendar.hasTime .flatpickr-time {
    border-radius: 10px;
    background-color: #FBD2D3;
    border: 1px solid #FBD2D3 !important;
}

.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time input:focus, .flatpickr-time .flatpickr-am-pm:focus {
    background: #FBD2D3 !important;
}

.flatpickr-time input.flatpickr-hour {
    color: var(--PRIMARY) !important;
    font-weight: bold !important;
}

.flatpickr-time input.flatpickr-minute {
    color: var(--PRIMARY) !important;
    font-weight: bold !important;
}

.flatpickr-time .flatpickr-time-separator {
    color: var(--PRIMARY) !important;
    font-weight: bold !important;
}

.flatpickr-day.selected {
    background-color: var(--PRIMARY) !important;
    border-color: var(--PRIMARY) !important;
}

.datepicker table tr td.active {
    background-image: -webkit-linear-gradient(top, var(--PRIMARY), var(--PRIMARY)) !important;
}

.textarea {
    white-space: pre-wrap !important;
}

.btn-menu-custom {
    width: -webkit-fill-available;
    border-left: 2px solid #ECECEC;
    border-radius: 0 10px 10px 0;
    text-align: start;
}

    .btn-menu-custom:hover {
        border-radius: 10px !important;
        border-left: 2px solid var(--PRIMARY) !important;
    }

.vh-90 {
    height: 90vh;
}

.vertical-divider {
    border-left: 2px solid #ffffff40;
    margin: 0 10px;
    height: 40px;
}

.img-logout {
    width: 35px !important;
}

.img-side {
    width: 24px;
}


.img-logout1 {
    width: 35px !important;
    cursor: pointer;
}

/* NEW INPUT */

.tagator_element {
    border-radius: 10px !important;
    padding: 2px 12px !important;
    display: flex !important;
    align-items: center;
    min-height: 42px !important;
    gap: 5px;
}

    .tagator_element:focus {
        border-color: var(--PRIMARY) !important;
        box-shadow: 0 0 0 .25rem rgb(253 13 13 / 25%) !important;
    }

.tagator_tags {
    display: flex !important;
    flex-wrap: wrap;
    gap: 2px;
}

.tagator_tag {
    background-color: #A5A5A5 !important;
    padding: 4px 22px 4px 12px !important;
    font-size: 15px !important;
    border-radius: 5px !important;
    margin: 0 !important;
    white-space: nowrap; /* Prevent text wrapping inside a tag */
}

.tagator_tag_remove {
    display: flex !important;
    align-items: center !important;
    background-color: #A5A5A5 !important;
    height: auto !important;
    border-radius: 5px !important;
    font-family: system-ui;
    color: #E9E9E9 !important;
}

    .tagator_tag_remove:hover {
        color: #111 !important;
    }

.tagator_input, .tagator_textlength {
    padding: 0 !important;
}
