@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

: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;
}

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

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

.card-title {
    float: none;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Sarabun', sans-serif;
    font-weight: bold;
}

.card-title {
    font-size: 1.2rem;
}

.card-subtitle {
    font-size: 1rem !important;
    line-height: 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;
}

.form-control,
.form-check-input,
.ew-file-drop-zone {
    border-color: #cacaca;
}

/* 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;
}

input[dischange="true"],
select[dischange="true"],
span[dischange="true"] {
    font-style: italic;
    pointer-events: none;
    background-color: #dadada;
}


div[id^='r_']:has(input[dischange="true"]),
div[id^='r_']:has(select[dischange="true"]),
{
pointer-events: 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;
}

.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-profile-image {
        top: 0px !important;
        left: 25px !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 {
    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;
    border: solid 0px;
}

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

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

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

.status-box:nth-of-type(1) .small-box {
    background-color: var(--info-color);
    border-color: var(--default-color);
    color: #222;
}

.status-box:nth-of-type(2) .small-box {
    background-color: var(--warning-color);
    border-color: var(--consid-color);
    color: #222;
}

.status-box:nth-of-type(3) .small-box {
    background-color: var(--danger-color);
    border-color: var(--process-color);
    color: #222;
}

.status-box:nth-of-type(4) .small-box {
    background-color: var(--success-color);
    border-color: var(--thick-success-color);
    color: #222;
}

.status-box .small-box .icon {
    font-size: 40px;
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.7;
}

.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;
}

.fc .fc-toolbar {
    flex-direction: row;
}

body:not(.sidebar-collapse)>.upload-header {

    background-position-x: 320px;
}

th[data-name='map'],
td[data-name='map'] {
    display: none;
}

.ew-detail-count-badge {
    background-color: #3fdfff !important;
}

.req-status-group-btn {
    display: flex;
    justify-content: space-around;
}

.req-status-group-btn a {
    font-size: 12px;
    white-space: nowrap;
    margin: 3px;
}

.btn-consid,
.btn-consid:hover {
    background-color: var(--consid-color);
    color: #fff;
}

.stat-badge {
    padding: 5px;
    display: block;
    width: 30px;
    height: 10px;
    border-radius: 20px;
    margin: auto;
    background-color: var(--default-color);
}

.stat-badge.consid {
    background-color: var(--consid-color);
}

.stat-badge.process {
    background-color: var(--process-color);
}

.stat-badge.done {
    background-color: var(--done-color);
}

.btn-process,
.btn-process:hover {
    background-color: var(--process-color);
    color: #fff;
}

.btn-done,
.btn-done:hover {
    background-color: var(--done-color);
    color: #fff;
}

.report-content {
    position: relative;
    width: 100%;
    padding-bottom: 10px;
}

.remind_job_card {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.remind_job_card .card {
    flex: 0.22;
    align-items: center;
}

.remind_job_card .card.issue {
    flex: 0.18;
    align-items: center;
}

.remind_job_card .card-body {
    padding: 0.5em;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.remind_job_card .card-value {
    font-size: 22px;
    text-align: center;
}

.remind_job_card .card-title {
    font-size: 15px;
}

/* Dashboard */
@media (min-width: 768px) {
    #satisfactionChart {
        height: 570px !important;
    }
}

#teacherChart,
#studentIssueChart {
    height: 185px;
}

.close {
    border: 0;
    font-size: large;
}

.fc a[data-navlink] {
    color: #19262f;
}

/* ปรับสีพื้นหลังของทั้งปฏิทิน */
.fc {
    background-color: #f0f0f0;
    /* สีพื้นหลังของปฏิทิน */
}

/* ปรับสีพื้นหลังของวันที่ในปฏิทิน */
.fc-daygrid-day {
    background-color: #ffffff;
    /* สีพื้นหลังของวันในปฏิทิน */
}

/* ปรับสีพื้นหลังเมื่อ hover บนวันที่ */
.fc-daygrid-day:hover {
    background-color: rgb(204, 204, 204);
    /* สีพื้นหลังเมื่อ hover */
}

/* ปรับสีพื้นหลังของวันนี้ */
.fc-daygrid-day.fc-day-today {
    background-color: #2980b9;
    /* สีพื้นหลังของวันนี้ */
    color: white;
}

.fc .fc-daygrid-event-harness {
    cursor: pointer;
}

.fc .fc-daygrid-event-harness a {
    background-color: #eee;
}

.fc .fc-daygrid-event-harness a:hover {
    background-color: #19262f;
    color: #fff;
}

.fc-toolbar,
.fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
}

.bg-success-dark {
    background-color: #04361e;
}

.is-correct {
    position: relative;
}

.is-correct::after {
    content: "✔";
    font-size: 16px;
    color: green;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.quiz-card-header {
    display: flex;
    /* ✅ ใช้ Flexbox */
    justify-content: space-between;
    /* ✅ กระจายคอลัมน์ */
    align-items: center;
    /* ✅ จัดกึ่งกลางแนวตั้ง */
}

.quiz-card-header .card-item:nth-child(1) {
    width: 60%;
}

.quiz-card-header .card-item:nth-child(2) {
    width: 15%;
}

.quiz-card-header .card-item:nth-child(3) {
    width: 25%;
}

.progress-group {
    width: 100%;
}

.progress,
.progress-stacked {
    background-color: #bdbdbd;
}

.question-item {
    display: flex;
    align-items: center;
}

.question-item .img {
    width: 100%;
}

