﻿@font-face {
    font-family: THSarabunNew;
    src: url("../fonts/THSarabunNew.ttf?45905ce12b4739c794a5ebdaee506202") format("truetype")
}

@font-face {
    font-family: THSarabunNew;
    font-weight: 900;
    src: url("../fonts/THSarabunNew\ Bold.ttf?bdd8eb542ab9aa84e5809edb230f07cc") format("truetype")
}

@font-face {
    font-family: THSarabunNew;
    font-style: italic;
    src: url("../fonts/THSarabunNew\ Italic.ttf?05a052030bb61432929f643579b82ce1") format("truetype")
}

@font-face {
    font-family: THSarabunNew;
    font-style: italic;
    font-weight: 900;
    src: url("../fonts/THSarabunNew\ BoldItalic.ttf?0b381613886ea1af245b0a8120019ecb") format("truetype")
}

.spRequire, .required {
    color: red !important;
}

.spBlue {
    color: blue !important;
}

.spGreen {
    color: green !important;
}

.fnWhite {
    color: white !important;
}

.fnWPS {
    color: #562DB7;
}

.fnWeight600 {
    font-weight: 600 !important;
}

.fnWeight900 {
    font-weight: 900 !important;
}

.noDisplay {
    display: none;
}

.mouseClick {
    cursor: pointer;
}

.btnWidth {
    padding-left: 15px;
    padding-right: 20px;
}

.modal-lg1000 {
    max-width: 1000px;
}

.modal-lg1200 {
    max-width: 1200px;
}

.form-group label, form label {
    text-transform: none !important;
    margin-top: .5rem !important;
    margin-bottom: 0 !important;
}

.text-right {
 text-align:right;
}

.text-left {
    text-align: left;
}

/*Template*/
.gradient-wps {
    background-image: linear-gradient(45deg, #562DB7, #60AFF0);
    background-repeat: repeat-x;
}

.gradient-green-red-wps {
    background-image: linear-gradient(45deg, #32b714, #cc3415);
    background-repeat: repeat-x;
}


.modal {
    overflow: auto !important;
}

.control-label {
    font-weight: 900 !important;
    text-align:right;
}

/* Custom Template */
body {
    font-family: THSarabunNew !important;
    font-size: 1.3rem !important;
    color:black !important;
}

.auth-body-bg {
    background-image: url(../img/SAT_banner_01.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.bg-overlay {
    background-color: #0074BD !important;
    width: 100%;
    height: 100%;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0px;
    top: 0px;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-family: inherit !important;
}

.form-control {
    font-size: inherit !important;
    color: inherit !important;
    font-weight: 600 !important;
}

.btn {
    font-size: inherit !important;
    font-weight: 600 !important;
}

body[data-topbar=dark] #page-topbar {
    background-color: #0074BD;
}

#sidebar-menu ul li a {
    padding: .1rem 1rem;
    font-size: inherit !important;
    /*color: inherit !important;*/
    font-family: inherit !important;
    font-weight: 600;
}

.card-title {
    margin: 15px 0 7px 15px;
    font-weight: 700;
    font-family: inherit !important;
    font-size: inherit;
}

.metismenu li {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

#sidebar-menu ul li ul.sub-menu li a {
    padding: .1rem 0 .1rem 2.8rem !important;
}

#sidebar-menu ul li ul.sub-menu li ul.sub-menu li a {
    padding: 0.1rem 0rem .1rem 3.5rem !important;
}

.page-title-box h4 {
    font-size: inherit;
    font-weight: 600;
}

.page-title-box {
    padding-bottom: inherit !important;
    color: #0F9CF3 !important;
}

.form-select {
    font-size: 1.3rem !important;
}

.dropdown-menu {
    font-size: 1.3rem !important;
}

.toast {
    font-size: 2rem;
    font-weight: 700;
}

.swal2-container .swal2-title {
    font-size: 2em !important;
}

.swal2-content {
    font-size: 2em !important;
}

.swal2-styled.swal2-confirm {
    font-size: 1.5em !important;
}

.swal2-styled.swal2-cancel {
    font-size: 1.5em !important;
}

.icon-position-btn{
    position:relative;
    top: 3px;
}

/*.dropdown-menu {
    padding: .1rem 0;
    font-size: inherit !important;
    color: black;
}

#sidebar-menu ul li a i {
    font-size: 1.1rem;
    color: black;
    font-weight: 400;
}

#sidebar-menu ul li a {
    padding: .4rem 1rem;
    line-height: 1;
    display: flex;
}

#sidebar-menu ul li:hover {
    color: #0f9cf3 !important;
    border: 1px solid #e8ecf4;
    background-color: #eff2f7;
}

#sidebar-menu ul li.menu-title i {
    font-size: 1.1rem;
    color: black;
    font-weight: 400;
    vertical-align: middle;
}

.mm-active,
.mm-active .active {
    color: black !important;
}


.menu-title {
    font-size: 1.3rem;
    color: black;
    font-weight: 600;
    font-family: inherit !important;
    opacity: 1;
    vertical-align: middle;
}

.menu-dot {
    margin-right: 5px;
    font-size: 70px;
    line-height: 16px !important;
}

.form-control {
    padding: .1rem .75rem;
    line-height: 1.5;
}

.line {
    position: absolute;
    width: 2px;
    height: 21px;
    background-color: #1194f6;
    top: 0;
    margin: auto;
    margin-top:15px;
}

*/

/*Modal Overlay*/

.modal_shade {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: silver;
    opacity: 0.5;
    filter: alpha(opacity=50);
}

/*Swagger*/

.swagger-section {
    color: black;
}

.swagger-section div.heading {
    background-color: #e7f0f7;
    border: 1px solid #c3d9ec;
    float: none;
    clear: both;
    overflow: hidden;
    display: block;
    margin: 0;
    padding: 0;
}

.swagger-section div.heading h3 {
    display: block;
    clear: none;
    float: left;
    width: auto;
    margin: 0;
    padding: 0;
    line-height: 1.1em;
    color: black;
}

.swagger-section div.heading h3 span {
    margin: 0;
    padding: 0;
}

.swagger-section div.heading h3 span.http_method a {
    background-color: #0f6ab4;
}

.swagger-section div.heading h3 span.http_method a {
    text-transform: uppercase;
    text-decoration: none;
    color: white;
    display: inline-block;
    width: 50px;
    font-size: 0.7em;
    text-align: center;
    padding: 7px 0 4px;
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    -o-border-radius: 2px;
    -ms-border-radius: 2px;
    -khtml-border-radius: 2px;
    border-radius: 2px;
}

.swagger-section div.heading h3 span.path {
    padding-left: 10px;
}

.swagger-section div.heading h3 span.path a {
    color: black;
    text-decoration: none;
}

.swagger-section div.content {
    border-top: none;
    background-color: #ebf3f9;
    border: 1px solid #c3d9ec;
    padding: 10px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    margin: 0 0 20px;
}

.swagger-section div.content h4 {
    font-size: 1.1em;
    margin: 0;
    padding: 15px 0 5px;
    color: #0f6ab4;
}

.swagger-section-section .authorize-wrapper_operation {
    float: right;
}

.swagger-section .authorize-wrapper {
    margin: 15px 0 10px;
}

.swagger-section  ol, .swagger-section  ul {
    list-style: none;
}

.swagger-section .authorize__btn_operation_logout {
    background-position: -30px 0;
    width: 18px;
    margin-top: -6px;
    margin-left: 4px;
}

.swagger-section .authorize__btn_operation {
    height: 18px;
    vertical-align: middle;
    display: inline-block;
    background: url(../customize/img/explorer_icons.png) no-repeat;
}

.swagger-section .authorize-scopes {
    position: absolute;
    margin-top: 20px;
    background: #FFF;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: none;
    font-size: 13px;
    max-width: 300px;
    line-height: 30px;
    color: black;
    padding: 5px;
}

.swagger-section  .model-signature {
    font-size: 1em;
    line-height: 1.5em;
}

.swagger-section  p {
    line-height: 1.4em;
    padding: 0 0 10px;
    color: #333333;
}

.swagger-section  .model-signature ul.signature-nav {
    display: block;
    min-width: 230px;
    margin: 0;
    padding: 0;
}

.swagger-section  .model-signature .signature-nav a {
    text-decoration: none;
    color: #AAA;
}

.swagger-section  .model-signature .signature-container {
    clear: both;
}

.swagger-section .model-signature pre {
    /*font-size: .75em;*/
    line-height: 1.2em;
    overflow: auto;
    max-height: 200px;
    cursor: pointer;
}

.swagger-section pre {
    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
    background-color: #fcf6db;
    border: 1px solid #e5e0c6;
    font-size: .65em;
    line-height: 1.2em;
    overflow: auto;
    max-height: 200px;
    cursor: pointer;
    margin-top: 5px;
    padding: 5px;
}

.swagger-section .hljs-type, .swagger-section .hljs-string, .swagger-section .hljs-number, .swagger-section .hljs-selector-id, .swagger-section .hljs-selector-class, .swagger-section .hljs-quote, .swagger-section .hljs-template-tag, .swagger-section .hljs-deletion {
    color: #880000;
}

.swagger-section .hljs, .swagger-section .hljs-subst {
    color: #444;
}

.swagger-section  table.fullwidth {
    width: 100%;
}

.swagger-section  table {
    border-collapse: collapse;
    border-spacing: 0;
}

.swagger-section  table tbody tr:last-child td {
    border-bottom: none;
}

.swagger-section  .required {
    font-weight: bold;
}

.swagger-section  table tbody tr td {
    padding: 6px;
    font-size: 0.9em;
    vertical-align: top;
    line-height: 1.3em;
}

.swagger-section  caption, .swagger-section  th, .swagger-section  td {
    text-align: left;
}

.swagger-section  table thead tr th {
    padding: 5px;
    font-size: 0.9em;
    color: #666666;
    border-bottom: 1px solid #999999;
}

.swagger-section  caption, .swagger-section  th, .swagger-section  td {
    text-align: left;
    font-weight: normal;
    vertical-align: middle;
}

.swagger-section .model-signature {
    font-size: 1em;
    line-height: 0.85em;
}

.swagger-section p {
    padding: 0 0 2px;
    color: #333333;
}

.swagger-section .strong {
    font-weight: 800;
    color: #000;
    font-size: 1em;
}

.swagger-section .propType {
    color: #5555aa;
}

.swagger-section .propOptKey {
    font-style: italic;
}

.swagger-section .description div {
    font-size: 0.9em;
    line-height: 1.5em;
    margin-left: 1em;
}

.swagger-section ul.signature-nav {
    display: block;
    min-width: 230px;
    margin: 0;
    padding: 0;
}

.swagger-section ul {
    list-style: none;
}

.swagger-section ul.signature-nav li {
    float: left;
    margin: 0 5px 5px 0;
    padding: 2px 5px 2px 0;
    border-right: 1px solid #ddd;
}

.swagger-section pre code {
    /*line-height: 1.6em;*/
    background: none;
    display: block;
    padding: 0.5em;
}

.swagger-section ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
    font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
    padding: 10px;
    font-size: 0.9em;
    max-height: 400px;
    overflow-y: auto;
}


/*AI*/

/* ===== เนื้อหา AI ===== */
.ai-markup {
    font-size: .95rem;
    line-height: 1.6;
    color: #1f2937;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

    .ai-markup b
    .ai-markup strong {
        color: #1f2937;
        font-weight: 600;
    }

    .ai-markup ul {
        margin: .5rem 0 .5rem 1.2rem;
        padding: 0;
    }

    .ai-markup li {
        margin: .2rem 0;
    }

    .ai-markup h1, .ai-markup h2, .ai-markup h3 {
        margin: .4rem 0 .3rem
    }

    .ai-markup h1 {
        font-size: 1.35rem
    }

    .ai-markup h2 {
        font-size: 1.2rem
    }

    .ai-markup h3 {
        font-size: 1.05rem
    }

    .ai-markup blockquote {
        border-left: 3px solid #e5e7eb;
        margin: .4rem 0;
        padding: .2rem .8rem;
        color: #374151;
        background: #f9fafb;
        border-radius: .25rem
    }

    .ai-markup pre {
        background: #1e293b; /* พื้นหลังโทน Slate ชัดกว่า #0f172a */
        color: #f8fafc; /* สีตัวหนังสือขาว */
        padding: .75rem 1rem;
        border-radius: .5rem;
        white-space: pre-wrap;
        word-break: break-word;
        overflow-x: auto;
        max-width: 100%;
        font-family: 'Fira Code', 'Courier New', monospace; /* ฟอนต์อ่านง่าย */
        font-size: .9rem;
    }

    .ai-markup code {
        background: none !important;
        color: white !important;
        padding: .15rem .4rem;
        border-radius: .35rem;
        font-family: 'Fira Code', 'Courier New', monospace;
        font-size: .9rem;
    }


    .ai-markup a {
        color: #2563eb;
        text-decoration: none
    }

        .ai-markup a:hover {
            text-decoration: underline
        }

    .ai-markup img, .ai-markup table {
        max-width: 100%;
        height: auto
    }

.ai-toolbar {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding-top: .25rem;
    border-top: 1px dashed #e5e7eb;
    margin-top: .5rem
}

.icon-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: .5rem;
    padding: .35rem .45rem;
    cursor: pointer
}

    .icon-btn:hover {
        background: #f8fafc
    }

    .icon-btn:disabled {
        opacity: .5;
        cursor: not-allowed
    }

.icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle
}

.card .card-body {
    overflow: hidden
}

.e-grid .e-rowcell {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word
}

/* ==== THINK STYLE ==== */
.ai-think-wrap {
    display: block;
    margin: .25rem 0 .6rem;
    background-color: #f9f9f9;
    border-radius: 1rem;
    padding: 15px 0px 10px 10px;
}

.ai-think-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: .2rem;
    font-weight: 800;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: linear-gradient(90deg, #0f9cf3 0%, #374151 25%, #6b7280 50%, #562DB7 75%, #111827 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: thinkFade 3s linear infinite;
}

.ai-think-text {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: .85rem;
  
    background: linear-gradient(90deg, #111827 0%, #374151 25%, #6b7280 50%, #9ca3af 75%, #111827 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: thinkFade 3s linear infinite;
}

.think {
    color: #6b7280; /* เทา */
    font-style: italic;
    background: #f9fafb;
    padding: 2px 4px;
    border-radius: 4px;
}

.think-block {
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: opacity 0.5s ease-in-out;
}

.ai-think-wrap {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f9fafb;
    border-left: 3px solid #6366f1;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* block reasoning ทีละก้อน */
.ai-think-text {
    display: block;
    margin: 0.25rem 0;
    color: #374151;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

    /* ทำให้ข้อความที่ mark fade ค่อยๆ หายไป */
    .ai-think-text.fade {
        opacity: 0;
    }

.fade {
    animation: fadeInOut 4s linear;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.scroll-down-btn {
    position: fixed;
    bottom: 90px;
    left: 50%; /* จัดให้อยู่กึ่งกลาง */
    transform: translateX(-50%); /* เลื่อนกลับครึ่งนึง */
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex; /* ทำให้ icon อยู่ตรงกลาง */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,.2);
    transition: opacity 0.3s ease;
    z-index: 999;
}

    .scroll-down-btn:hover {
        background: #f0f0f0;
    }