:root {
    --consid-color: #ffc107;
    --process-color: #dc3545;
    --thick-success-color: #28a745;
    --default-color: #17a2b8;
    --info-color: #81e4f9;
    --warning-color: #fee080;
    --danger-color: #ec99a1;
    --success-color: #8cc3ac;
    --primary-color: var(--default-color);
}

body {
    font-family: 'Sarabun', 'Arial', sans-serif;
}

body,
.content-wrapper {
    background-color: #ededed;
}

h1,
h2,
h3,
h4,
.card-title {
    font-family: 'Sarabun', sans-serif;
    font-size: 1.2rem;
}

.brand-container,
.layout-navbar-fixed .wrapper .sidebar-light-primary .brand-link:not([class*=navbar]) {
    background-color: var(--primary-color);
    text-align: center;
}

.brand-container .brand-text {
    color: #fff;
}

[class*=sidebar-light-] {
    background-color: #c6c6c6;
}

[class*=sidebar-light-] .nav-treeview>.nav-item>.nav-link {
    color: #333333;
}

.nav-sidebar .nav-header:not(:first-of-type) {
    padding: 1rem 1rem .5rem;
    border-bottom: solid 1px #dee2e6;
    font-weight: bold;
}

.form-control-sidebar::placeholder {
    font-size: 11px;
}

/* datepicker */

div[class^='cal'] {
    max-width: 300px;
    min-width: 303px;
    position: absolute;
    top: 35px;
    z-index: 10;
    background-color: var(--bs-body-bg);
    border: solid 1px #4f4f4f;
    border-radius: 5px;
    padding: 5px;
}

div[class^='cal'] .row>* {
    width: auto;
    display: flex;
    align-items: center;
}

div[class^='cal'] .row>.col select {
    width: 100%;
}

div[class^='cal'] table td,
div[class^='cal'] table th {
    text-align: center;
}

.ew-add-form input[dischange="true"],
.ew-add-form select[dischange="true"] {
    font-style: italic;
    pointer-events: none;
    background-color: #ccc;
}


/* div[id^='r_']:has(input[dischange="true"]),
div[id^='r_']:has(select[dischange="true"]) {
    display: none;
} */

.ew-search-panel {
    width: 100%;
}

.ew-extended-search {
    display: flex;
    border: solid 1px var(--bs-border-color-translucent);
    border-radius: 3px;
    padding: 10px 10px 0px;
    margin: 0 auto 15px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: flex-start;
    background-color: #f7f7f7;
}

.ew-extended-search .ew-row {
    margin-bottom: 0;
}

.ew-extended-search .row {
    margin: 20px;
}

.ew-grid .ew-table>thead>tr>th {
    white-space: nowrap;
    text-align: center;
}

.ew-grid .ew-table>tbody>tr>td,
.ew-grid .ew-table>tfoot>tr>td {
    text-align: center;
    white-space: normal;
}

.ew-grid,
.ew-form:not(.ew-list-form):not(.ew-pager-form),
table.ew-master-table.ew-vertical {
    width: 100%;
    max-width: 100%;
}

.hide-print .ewListOtherOptions {
    font-size: 1.5rem;
    position: fixed;
    align-items: center;
    justify-content: center;
    bottom: 10%;
    right: 2%;
}

.hide-print .ewAdd {
    border: solid 1px var(--primary-color);
    color: var(--primary-color);
    width: 60px;
    height: 60px !important;
    border-radius: 50px;
    padding-top: 15px !important;
}

.hide-print .ewAdd:hover {
    color: #fff;
    background-color: var(--primary-color);
}

.navbar-search-block.navbar-search-open {
    left: 50px;
    right: 120px;
}

.select2-container--bootstrap5 .select2-dropdown .select2-results__option--selected,
.select2-container--bootstrap5 .select2-dropdown .select2-results__option[aria-selected=true] {
    background-color: var(--primary-color);
    color: #fff;
}

@media print {
    body * {
        color: black !important;
    }

    .print-request-type {
        top: 0 !important;
        right: 0 !important;
    }

    .page-next {
        display: block;
        page-break-after: always;
    }

    .page-break {
        display: block;
        page-break-before: always;
    }

    .print-btn {
        display: none;
    }

    .for-print {
        display: block;
    }

    .main-footer,
    .hide-print {
        display: none;
    }
}

/* จัดเรียงรูปหน้า view */
.ew-view-form table td .d-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    /* ช่องว่างระหว่างรูป */
}

.ew-view-form table td .d-flex a,
.ew-view-form table td .d-flex div {
    flex: 1 1 calc(33.333% - 10px);
    /* คำนวณความกว้างของรูปแต่ละรูป */
    max-width: calc(33.333% - 10px);
    /* คำนวณความกว้างสูงสุดของรูปแต่ละรูป */
    max-height: 250px;
    box-sizing: border-box;
    overflow: hidden;
}

.ew-view-form table td .d-flex .ew-pdfobject {
    min-height: 550px;
}

.view td[data-name='attach_files'] span span> :only-of-type:not(.d-flex) {
    height: 500px;
    /* กำหนดความสูงตามที่ต้องการ */
}

.list .ew-pdfobject {
    max-height: 65px;
}

.list td {
    vertical-align: middle;
}

.ew-view-form table td .d-flex a img {
    width: 100% !important;
    padding: 0 !important;
    min-height: 250px;
}

/* Pag Content */

.category .d-flex {

    align-items: center;
    justify-content: space-evenly;
    ;
    flex-wrap: wrap;

}

.category-img {
    flex: 1 1 calc(12.55% - 0px);
    /* คำนวณความกว้างของรูปแต่ละรูป */
    max-width: calc(12.55% - 0px);
    /* คำนวณความกว้างสูงสุดของรูปแต่ละรูป */
    margin: 10px;
}


@media (max-width: 768px) {
    .category-img {
        flex: 1 1 33.333%;
        max-width: 33.333%;
        margin: 10px 0;
        /* ลดระยะห่างเพื่อให้ดูดีในจอมือถือ */
    }
}

.category-img figure {
    display: inline-block;
    margin: 0;
    position: relative;

}

.category-img img,
.category-img figcaption {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* การกำหนดการเปลี่ยนแปลง */
}

.category-img img {
    display: block;
    margin: 0 auto;
    padding: 1px;
    border-radius: 6px;

}

.category-img figcaption {
    margin-top: 10px;
    /* เพิ่มระยะห่างระหว่างรูปภาพกับ caption */
    transform-origin: top;
    /* กำหนดจุดเริ่มต้นของการเปลี่ยนแปลงในแนวแกน Y */
    height: 55px;
    overflow: hidden;
}

.category-img:hover img {
    transform: scale(1.1);
    /* ขยายขนาดขึ้น */
    border: solid 1px var(--primary-color);
    border-radius: 6px;
    padding: 3px;
}

.category-img:hover figcaption {
    transform: scale(1.1);
    /* ขยายขนาดขึ้น */

}

.category-img figcaption {
    font-size: 14px;
    line-height: 16px;
    color: var(--secondary-color);
    text-align: center;
    padding-top: 5px;
    font-weight: bold;
    font-family: 'Sarabun', sans-serif;

}

/* .category-img figure a{
    color: var(--primary-color);
} */

#ct_ViewPersonAllRequestsList .viewpersonall-req-icon {
    width: 100%;
}

#ct_ViewPersonAllRequestsList .table>:not(caption)>*>* {
    padding: 3px 10px;
}

#fview_person_all_requestssrch,
.hide {
    display: none;
}

#ct_ViewPersonAllRequestsList table tbody tr:nth-child(n+13) {
    display: none;
}

#ct_ViewPersonAllRequestsList table tr td:not(:nth-of-type(2)) {
    font-weight: bold;
}

#ct_ViewPersonAllRequestsList table tr td a {
    color: var(--secondary-color);
    font-weight: bold;
}

#ct_ViewPersonAllRequestsList table tr td a:hover {
    color: var(--primary-color);
}

.sidebar .user-panel .info {
    display: flex;
    column-gap: 10px;
}

.sidebar .user-panel .info a {
    font-weight: bold;
}

.fa-bell::before {
    content: "\f1f6";
}

.fa-bell-slash::before {
    content: "\f0f3";
    color: var(--primary-color);
}

.modal-backdrop {
    display: none;
}

#x_get_location,#x_get_path {
    display: none;
}

.leaflet-container {
    border: solid 1px #666;
    border-radius: 3px;
}

.navbar-nav .nav-link,
.navbar-nav .nav-link.active {
    color: #615ac8;
}

.ew-table-header,
.ew-rpt-grand-summary {
    font-weight: bold !important;
    text-align: center;
}

.ew-top {
    justify-content: center;
}

/* canvas[id^='chart_'] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto 1200 / 500;
    margin: auto;
} */
.small-box {
    text-align: center;
    color: #fff;
}

.small-box h3 sup {
    font-size: 1rem;
    top: -0.8em;
}

.small-box h3 sup span::before {
    content: '(';
}

.small-box h3 sup span::after {
    content: '%)';
}

.row.kpi {
    display: flex; /* ใช้ Flexbox */
    flex-wrap: nowrap; /* ป้องกันการขึ้นบรรทัดใหม่ */
    justify-content: space-between; /* จัดให้มีช่องว่างระหว่าง item เท่าๆ กัน */
    align-items: stretch; /* ทำให้ความสูงของ item เท่ากัน */
    width: 100%; /* ให้เต็มความกว้างของ container */
}

.kpi-item {
    flex: 1; /* ทำให้แต่ละ item มีความกว้างเท่ากัน */
    margin: 0 5px; /* เพิ่มช่องว่างระหว่าง item */
    min-width: 0; /* ป้องกัน item ล้น */
}

.kpi-item .small-box {

    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center; /* จัดข้อความให้อยู่ตรงกลาง */
    padding: 10px;
    border-radius: 5px; /* เพิ่มความสวยงาม */
    color: rgb(0, 0, 0); /* ทำให้ข้อความอ่านง่ายบนพื้นหลังสีเข้ม */
}

.kpi-item .inner {
    flex-grow: 1; /* ให้ inner ขยายเต็มพื้นที่ */
}

.kpi-item h3 {
    margin: 0;
    font-size: 1.8rem; /* ปรับขนาดตัวอักษรให้เหมาะสม */
}

.kpi-item p {
    margin: 5px 0 0;
    font-size: 0.9rem; /* ปรับขนาดตัวอักษร */
}

/* ป้องกันการล้นของเนื้อหา */
.kpi-item .small-box sup {
    font-size: 0.8rem;
}

/* Responsive design สำหรับหน้าจอเล็ก */
@media (max-width: 768px) {
    .row.kpi {
        flex-wrap: wrap; /* อนุญาตให้ขึ้นบรรทัดใหม่ในหน้าจอเล็ก */
    }
    .kpi-item {
        flex: 1 1 45%; /* ในหน้าจอเล็กให้แบ่งเป็น 2 คอลัมน์ */
        margin: 5px;
    }
}

@media (max-width: 480px) {
    .kpi-item {
        flex: 1 1 100%; /* ในหน้าจอเล็กมากให้เป็น 1 คอลัมน์ */
    }
}

.content-header .h1,
.content-header h1 {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    #dashboard-search-form .d-flex {
        flex-direction: column;
        row-gap: 5px;
    }
}

.modal-body .ew-add-opt-btn {
    display: none;
}

.viewpost-crumb {
    display: flex;
    align-items: center;
}

.content-item h5{
    font-size: 1rem;
    line-height: 1.2rem;
}
.content-author-date{
    display: flex;
    font-size: small;
}
.content-header .col-sm-6:first-child {
    width: 100%;
}
#fcontentssrch .field-help{
    display: none;
}
.card-img-top {
    cursor: pointer;
    width: 100%; /* ให้ภาพขยายเต็มความกว้างของ card */
    height: 200px; /* กำหนดความสูงคงที่ */
    aspect-ratio: 4 / 3; /* กำหนดสัดส่วน 4:3 */
    object-fit: cover; /* ครอบภาพให้อยู่ในกรอบโดยไม่บิดเบี้ยว */
    object-position: left; /* จัดตำแหน่งภาพให้อยู่ตรงกลาง */
}
.brand-link .brand-image{
    width: 100%;
    max-height: fit-content;
    margin: 0;
}
.brand-link{
    padding: 0;
}
.select2-container--bootstrap5 .select2-selection--multiple,.ew-basic-search-keyword{
    border-color: #a1a1a1;
}
.layout-fixed .brand-link{
    width: 100%;
    position: relative;
}
th[data-name='map'],td[data-name='map']{
    display: none;
}
.ew-detail-count-badge{
    background-color: #17a2b8;
}
/* td[data-name="device_id"]{
    padding-left: 50px !important;
} */