@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');
:root {
    --primary-color: #3EA3CB;
    --secondary-color: #223352;
    --primary-text-color: #4d4d4d;
    --secondary-text-color: #222222;
    --white-color: #ffffff;
    --light-gray-bg-color: #f2f2f2;
    --dark-gray-color: #aaaaac;
    --light-blue-bg-color: #D9EDF4;
}

h1,
h2,
h3 {
    line-height: 32px
}

h1 {
    font-size: 30px
}

h2 {
    font-size: 24px
}

h3 {
    font-size: 18px
}

html {
    min-height: 100%;
    position: relative
}

body {
    font-family: "Kanit", sans-serif;
}

:first-child.list-group-item {
    border-radius: 0
}

:last-child.list-group-item {
    border-radius: 0
}
.header {
    border-top: 8px solid var(--primary-color);
    box-shadow: 0px 4px 10px 2px #CCCCCC40;
}

.navbar {
    padding: 12px 24px;
}

.navbar-brand {
    padding: 0;
    margin-right: 0;
    width: min(100%, 156.67px);
}

.logo-img {
    padding-right: 16px;
    width: 100%;
}

.mainLogo img {
    width: min(100%, 392px);
    padding: 0 20px;
}

.navbar-form {
    max-width: 100%;
}

 /* main */
main.container {
    width: min(100%, 1207px);
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 136px;
}

#searchForm {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.mainLogo {
    margin-bottom: 32px;
}

.col-lg-6 {
    max-width: 86%;
    padding: 0;
}

.btn-group {
    flex-direction: row-reverse;
    gap: 10px;
    margin-top: 32px;
}

.btn {
    padding: 8px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#contentQuery {
    background-image: url('/images/search-md.svg');
    background-repeat: no-repeat;
    background-position: 20px;
    padding: 8px 24px 8px 52px;
    height: auto;
}

.clearfix #searchButton.btn-primary, .clearfix #searchOptionsButton.btn-outline-secondary {
    border-radius: 4px;
    font-weight: 600;
}

.clearfix #searchButton.btn-primary {
    width: 118px;
}

.clearfix #searchOptionsButton.btn-outline-secondary {
    width: 140px;
}

/* search options */
legend {
    display: none
}

#searchOptions {
    position: fixed;
    z-index: 10
}

#searchOptions .container {
    width: 274px;
    max-width: 100%;
    height: 100%;
    overflow: auto;
    position: fixed;
    top: 0;
    bottom: 0;
    right: -500px;
    padding: 112px 32px 0 32px;
    color: var(--white-color);
    background-color: var(--secondary-color);
    transition: all .4s ease 0s
}

#searchOptions.active .container {
    right: 0
}

#searchOptions .search-form-optsions {
    margin-top: 24px;
}

#searchOptionsLabel {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 26px;
}

.search-form-options .form-group {
    font-family: "Sarabun", sans-serif;
    margin: 24px 0;
    border-radius: 4px;
}

label {
    margin-bottom: 6px;
}

.dropdown {
    appearance: none;
    background-image: url('/images/dropdown.svg');
    background-repeat: no-repeat;
    background-position: calc(100% - 10px);
}

#searchOptions .options-btn {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 10px;
}

#langSearchOption::-webkit-scrollbar {
    width: 4px;
}

#langSearchOption::-webkit-scrollbar-track {
    background-color: var(--dark-gray-color);
    border-radius: 31px;
}

#langSearchOption::-webkit-scrollbar-thumb {
    max-height: 17px;
    background: var(--primary-text-color);
    border-radius: 31px;
}

.options-btn #searchOptionsClearButton.btn-light {
    font-weight: 600;
    line-height: 24px;
    color: var(--white-color);
    background-color: transparent;
    border: 1px solid var(--white-color);
}

.options-btn .btn-outline-secondary {
    font-weight: 600;
}

.options-btn .btn-info {
    grid-column: 1/3;
    color: var(--white-color);
    background-color: transparent;
    border: none;
    text-align: center;
    outline: none;
}

.btn-info:not(:disabled):not(.disabled):active {
    background: transparent;
    border: none;
}

.btn:focus, .btn-primary:focus, .btn-outline-secondary:focus, .btn-info:focus, .btn-info:active, .page-link:focus {
    box-shadow: none;
}

/* advanced search */
#content h2 {
    text-align: center;
    margin-bottom: 32px;
    font-weight: 400;
}

.form-search-group {
    padding: 0 20px;
}

#content .form-group {
    font-family: "Sarabun", sans-serif;
    margin-bottom: 24px;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.col-form-label {
    font-family: "Sarabun", sans-serif;
    color: var(--primary-text-color);
}

#searchForm .form-multiple {
    height: 140px;
    padding: 10px 16px;
    border: 1px solid var(--dark-gray-color);
    background: var(--light-gray-bg-color);
}

#searchForm #searchOptions .form-multiple {
    background-color: var(--white-color);
    border-radius: 4px;
    height: auto;
}

#searchForm .form-multiple select {
    border: none;
    padding: 0;
}

#searchForm .form-multiple select option {
    margin-bottom: 8px;
}

#searchForm .col-lg-5, .col-form-label {
    padding: 0;
}

#searchForm .col-lg-5 {
    display: flex;
    justify-content: center;
    flex: unset;
    border-radius: 4px;
    border: 1px solid var(--dark-gray-color);
}

#searchForm .form-multiple {
    padding: 10px 16px;
}

#content .form-control {
    height: auto;
    background-color: var(--light-gray-bg-color);
    padding: 10px 16px;
    border: none;
}

#searchForm .btn-primary {
    font-weight: 600;
}

/* result search */
.search .input-group #query {
    padding: 8px 24px;
    height: 100%;
}

.search #content .form-control {
    border: 1px solid var(--dark-gray-color);
}

.search #searchForm {
    height: 0;
}

.search .input-group-append {
    display: flex;
    flex-direction: row-reverse;
}

.search .input-group .btn {
    padding: 8px 12px;
}

.search .input-group #searchButton.btn-primary {
    border-radius: 0 4px 4px 0;
}

.search .input-group #searchOptionsButton.btn-light {
    background-color: var(--light-gray-bg-color);
    border: 1px solid var(--dark-gray-color);
    border-radius: 0;
}

.search .badge {
    font-family: "Sarabun", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    border-radius: 8px;
    padding: 8px 16px 10px;
    width: 100%;
}

.search .badge-primary {
    color: var(--white-color);
    background-color: var(--secondary-color);
}

.search #subheader .col {
    font-size: 1.25rem;
}

.search nav.navbar #content {
    display: block;
    text-align: center;
}

.search main#content {
    display: flex;
    flex-direction: column;
}

.search #subfooter {
    margin: 30px 0;
}

.search .pagination {
    margin-bottom: 0;
}

.search .page-item.active .page-link {
    color: var(--white-color);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.search .page-item .page-link {
    color: var(--secondary-text-color);
    padding: 8px 16px;
    border: 1px solid var(--dark-gray-color);
}

.page-item:last-child .page-link {
    border-radius: 0 8px 8px 0;
}

.page-item:first-child .page-link {
    border-radius: 8px 0 0 8px;
}

.search #content .list-inline {
    display: flex;
    gap: 10px;
    font-size: 1.125rem;
    margin-bottom: 10px;
    text-align: center;
}

#result {
    justify-content: left;
}

.result-list {
    margin: 20px 0;
}

.result-list:first-child {
    margin-top: 0
}

#result .title .link, #result .title .link:visited {
    color: var(--primary-text-color);
}

#result .title {
    font-size: 1.25rem;
    font-weight: 400;
}

#result .title strong {
    font-weight: 600
}

#result .body .description {
    font-family: "Sarabun", sans-serif;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 400;
}

#result .body .description strong {
    color: var(--secondary-color);
    font-weight: 600;
}

#result .thumbnail {
    width: 100px;
    min-height: 30px;
    background-position: 50% 50%;
    background-repeat: no-repeat
}

#content .form-control::placeholder {
    padding-bottom: 10px;
}

#searchForm #content .row #searchButton {
    margin-top: 8px;
    margin-bottom: 64px;
}

.search .col-md-8 {
    max-width: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-icon {
    filter: brightness(5);
}

.option-icon {
    filter: brightness(0);
}

.search .search-icon, .search .option-icon {
    width: 22px;
    height: 22px;
}

.textmuted {
    margin: 0;
}

footer {
    width: 100%;
    box-shadow: 0px -4px 10px 2px #CCCCCC40;
    padding: 32px 0 8px 0;
    margin-top: auto;
}

.footer-heading {
    color: var(--primary-text-color);
    margin-bottom: 4px;
}

.footer-subheading {
    font-family: "Sarabun", sans-serif;
    color: var(--primary-text-color);
    margin-bottom: 24px;
}

.suggestorBox {
    top: 38px !important;
    left: 0 !important;
    width: 100% !important;
}

@media (min-width: 480px) {
    .navbar-brand {
        border-right: 1px solid var(--dark-gray-color);
    }

    .search nav.navbar #content {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
    }

    .search main.container {
        margin-top: 120px;
    }
}

@media (min-width: 576px) {
    #content .form-group {
        flex-wrap: nowrap;
    }
}

@media (min-width: 770px) {
    /* advanced search */
    #content h2 {
        font-size: 2rem;
        line-height: 41.6px;
    }

    #searchForm .col-lg-5 {
        width: min(100%, 454px);
    }

    #content .form-control {
        width: min(100%, 454px);
    }

    /* result search */
    .search #content .list-inline {
        font-size: 1.25rem;
        gap: 32px;
        margin-bottom: 24px;
    }

    .search #content .list-inline-item {
        margin-right: 0;
    }

    .search .badge {
        width: auto;
    }

    .search #subheader .col {
        font-size: 1.5rem;
    }

    .search #subheader .col p {
        margin-bottom: 32px;
    }

    #result .title {
        font-size: 1.5rem;
    }

    #result .body .description {
        font-size: 1.125rem;
    }

    .result-list {
        margin: 32px 0;
    }

    .search #subfooter {
        margin: 32px 0 64px 0;
    }
}

@media (max-width: 580px) {
    #result .body .description {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }
}
