:root {
    --navbar-nav_ch: 1.2rem;
    --navbar-nav_en: 15px;
    --header_img_ch: 3.6rem;
    --header_img_en: 3.3rem;
}

/* header */
#header {
    background-color: #009DE7;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

html[lang="zh-TW"] .header_img {
    height: var(--header_img_ch);
}

html[lang="en"] .header_img {
    height: var(--header_img_en);
}

/* top button */
#top_btn {
    display: none;
    position: fixed;
    bottom: 0;
    right: 10px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #01529c;
    color: white;
    cursor: pointer;
    padding: 15px 13px;
    opacity: 0.8;
    line-height: 1.2em;
}

#top_btn:hover {
    background-color: #009DE7;
}

#top_btn * {
    width: 100%;
}

#top_btn i {
    transform: rotate(-90deg);
}

/* top button end */

#nav-top {
    width: fit-content;
    padding: 0;
}

#navbarSupportedContent {
    flex-direction: column-reverse;
    flex-wrap: wrap;
    align-content: flex-end;
    align-items: flex-end;
}

.form-control:focus {
    color: #495057;
    background-color: #daedff;
    outline: 0;
    box-shadow: unset;
}

.form-control {
    border-radius: unset;
    padding-right: 2.2rem;
}

.form-inline .form-control {
    width: 50%;
}

.user_name,
.user_name:hover {
    text-decoration: none;
    background: #009DE7;
    border-radius: 30px;
    margin: 0 0.5rem 0 0;
    padding: 0.27rem 0.4rem;
    display: flex;
    align-items: center;
    border: 1px solid #fff;
    font-weight: bold;
    color: #fff !important;
    padding-right: 0.5rem;
    cursor: pointer;
}

i.fas.fa-user-circle {
    color: #FFF;
    font-size: 1.25rem;
    text-align: center;
    padding: 1px 0 0 0;
}

.icon {
    z-index: 4;
    list-style-type: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.font_size {
    cursor: pointer;
    color: white;
    border: 1px solid;
    width: 2rem;
    text-align: center;
    padding: 3px !important;
    margin: 0px 5px;
    height: 2rem;
    font-weight: bold;
}

.font_size a {
    text-decoration: none;
    color: white;
}

.font_size:hover {
    background-color: orange;
    border: none;
}

.font_size.active {
    background: orange;
}

.print {
    background: #009DE7;
    border: none;
    padding-right: 8px;
}

i.logo.fas.fa-share-alt {
    color: white;
    border: 1px solid;
    padding: 0.5rem;
    border-radius: 50%;
}

.share {
    color: white;
    border: 1px solid;
    width: 2rem;
    text-align: center;
    padding: 3px !important;
    height: 2rem;
    vertical-align: middle;
    border-radius: 50%;
    cursor: pointer;
}

.share_content {
    position: relative;
}

.search_bar {
    align-items: center;
    justify-content: flex-end;
    margin-right: -12px;
}

/* search_bar transition */
#search_form {
    display: inline;
    font-size: 1em;
    border-radius: 8em;
    border: 1px solid #fff;
    padding: 0.3em;
    background: #fff;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    width: unset;
    height: unset;
    margin-right: 0px;
    color: #009de7;
}

#search_block {
    transition: all 0.2s ease-out;
    width: 15rem;
    border: 1px solid #2861b5;
    border-radius: 5px;
    outline: none;
    padding: 6px;
    /* width: 1px; */
    /* box-shadow: none; */
    /* padding: 0; */
    /* margin: 0; */
    /* border: 0; */
    /* background-color: transparent; */
    /* opacity: 0; */
}

#popular_keywords {
    display: none;
    /* background: #2861b5; */
    background: #008bcc;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    color: #fff;
}

#popular_keywords .keywords_content {
    display: flex;
    justify-content: end;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 1.25rem;
}

.popular_keywords {
    display: flex;
    justify-content: end;
    /* padding-left: unset; */
    padding: 0.5rem 1.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.popular_keywords div:not([data-keyword=title]):hover,
#popular_keywords i:hover {
    cursor: pointer;
    text-decoration: underline;
    color: #ffeb3b;
}

.close_keywords {
    margin-left: 10px;
}

/* #search_block:focus {
    width: 8em;
    opacity: 1;
} */

.form-inline label {
    padding-left: 1px;
    display: inline-block;
    color: #009de7;
    cursor: pointer;
}

/* end */

.main-share {
    position: absolute;
    top: 2.4rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    z-index: 10;
    min-width: 2rem;
}

.main-share>ul {
    padding-left: unset;
    padding-top: .5rem;
    margin-bottom: 0.5rem;
    list-style: none;
}

li.share-fb,
li.share-line {
    text-align: center;
    font-size: 1.5rem;
}


li.share-fb>a>i {
    color: #0062cc;
}

li.share-line>a>i {
    color: #00c300;
}

.lang_ch {
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    display: inline-block;
    width: 2rem;
    height: 2rem;
    text-align: center;
    line-height: 2rem;
    font-weight: 500;
}

#search_icon {
    background-color: white;
    padding: 0.63rem;
    border-radius: 30px 0px 0px 30px;
    border-right: unset;
    border-top: 1px solid #ced4da;
    border-left: 1px solid #ced4da;
    border-bottom: 1px solid #ced4da;
}

.search_text {
    width: 10rem !important;
    z-index: 0 !important;
    border: unset;
    border-top: 1px solid #ced4da;
    border-bottom: 1px solid #ced4da;
}

.search_btn {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.9em;
    border: 1px solid #2c5ba6;
    color: white !important;
    background-color: #ffa500 !important;
    border-radius: 30px;
    /* display: none; */
}

/* Select2 */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #3DA4E8;
    color: #fff;
    margin: 6px 5px 4px 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 26px;
    border: unset;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    border-right: unset;
}

.select2-container--default .select2-search--inline .select2-search__field {
    font-size: 87%;
    color: #999;
    height: 31px;
    margin-top: 5px;
}

.select2-container--default .select2-selection--multiple {
    padding-bottom: 0px;
    padding-left: 5px;
}

/* 外框顏色 */
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: solid lightgray 1px;
}

/* li顏色 */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: #3DA4E8;
    color: #fff;
}

/* option hover顏色 */
/* .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #3DA4E8;
} */

/* 已選option設定 */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable.select2-results__option--selected,
.select2-container--default .select2-results__option--selected {
    background-color: unset;
    color: #999;
    pointer-events: none;
}

/* 全部清除設定 */
.select2-container--default .select2-selection--multiple .select2-selection__clear {
    font-size: 0.875rem;
    font-weight: 500;
    color: #999;
    text-decoration: underline
}

/* select2-results__group */
/* Select2 */



/* 覆蓋bootstrap */
.navbar-light .navbar-toggler {
    border: none !important;
    color: #fff;
}

.nav-link {
    color: #FFF !important;
    font-weight: bold;
}

.dropdown-menu.show {
    border-radius: unset;
    border: none;
    margin-top: 8px;
    padding: 0.5rem 0;
    background-color: #009de7a1;
    margin: 0.1rem 0 0;
}

.dropdown-item {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-weight: bold;
    color: #fff;
    margin: 0.5rem 1rem 0.5rem 0.5rem;
    border-bottom: 1px solid;
}

.dropdown-item:focus,
.dropdown-item:hover {
    color: #fff;
    text-decoration: none;
    background-color: #e9ecef00;
    text-shadow: #00000036 0.1em 0.1em 0.2em;
}

/* header */

#footer {
    border-top: 3px solid #009DE7;
    color: #000;
    min-height: 5rem;
    max-height: 7rem;
    align-items: center;
    justify-content: center;
}

#footer_icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.naws_logo {
    width: 13rem;
    height: auto;
    /* height: min-content; */
}

#footer_connect {
    width: fit-content;
    font-size: 0.8rem;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    width: 50%;
}

#footer_connect a:hover {
    text-decoration: none;
    color: #009DE7;
}

.accessibility {
    width: 3.8rem;
}

.gov {
    width: 1.3rem;
}

#footer_info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    font-size: 0.8rem;
    width: 50%;
}

.back_btn {
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #2c5ba6;
    color: white;
    padding: 5px 10px;
    font-size: 1rem;
}

/* @media (max-width: 1610px) {
    .search_form_list {
        margin-top: 10px;
    }
} */

@media (min-width: 1560px) {
    .header_img {
        height: 4rem !important;
    }
}

@media (max-width: 1440px) {
    #footer_connect>div,
    #footer_info>div {
        flex: 100%;
        text-align: center;
    }
}

@media (max-width: 1310px) {
    .nav-link {
        font-size: .9em !important;
    }
}

@media (max-width: 1256px) and (min-width: 1115px) {
    :root {
        --header_img_ch: 3rem;
        --header_img_en: 2.8rem;
    }
}

@media (max-width: 1115px) and (min-width: 992px) {
    :root {
        --header_img_ch: 3rem;
        --header_img_en: 2.8rem;
    }

}

@media (max-width: 1070px) and (min-width: 992px) {
    .nav-link {
        font-size: .8em !important;
        padding-right: 0.3rem !important;
        padding-left: 0.3rem !important;
    }
}

@media (max-width: 991.98px) {
    #header {
        padding: 0px;
        padding-bottom: 0px !important;
    }

    .header_img {
        height: 3rem !important;
        width: auto;
    }


    #nav-top {
        width: 100vw;
        display: flex;
        justify-content: space-between;
        padding: 0 4em;
    }

    .navbar {
        padding: unset;
    }

    #navbarSupportedContent {
        background-color: #eff2f9;
    }

    a#navbarDropdown,
    a.nav-link {
        display: block;
        padding: 0.75rem 2rem 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(42, 158, 248, 0.5);
    }

    .dropdown-menu.show {
        border: none;
        background: #ffffffe6;
        padding: unset;
        margin: unset;
    }

    a.dropdown-item {
        display: block;
        padding: 0.75rem 2rem 0.75rem 2rem;
        margin: 0rem 1rem 0.5rem 0.5rem;
        border-bottom: 1px solid rgba(42, 158, 248, 0.5);
        color: rgba(0, 0, 0, 0.75);
        font-weight: bold;
    }

    .dropdown-item:hover {
        color: #009de7;
        text-decoration: none;
        background-color: #e9ecef00;
        text-shadow: #007bff11 0.1em 0.1em 0.2em;
    }



    .nav-link {
        color: rgba(0, 0, 0, 0.75) !important;
        font-weight: bold;
        font-size: inherit !important;
    }

    .form-inline {
        padding: 0 2rem 0.5rem 1rem;
    }

    .logo {
        background: #2c5ba6;
        border-radius: 50%;
        padding: 3px;
        color: #fff;
        width: 2.3em
    }

    .sso_login,
    .sso_register {
        border-radius: 10px;
        width: 5rem;
        background: unset;
    }

    .sso_forget {
        border-radius: 10px;
        width: 10rem;
        background: unset;
    }

    .search_bar {
        margin-right: -31px;
        margin-left: 0.8rem !important;
    }

    #search_icon {
        padding: 0.62rem;
    }

    /* .popular_keywords li {
        color: #009de7;
    } */

    .print {
        display: none;
    }

    #footer_connect {
        width: 100%;
        /* margin: 1rem 1rem 0rem; */
    }

    #footer_info {
        width: 100%;
        /* margin: 1rem 1rem; */
    }

    #footer_connect>div,
    #footer_info>div {
        text-align: left;
    }
    
    #footer {
        padding: 0em 1.25em;
        justify-content: unset;
    }

    #footer_icon {
        justify-content: flex-start;
        margin: 1rem 1rem 0rem;
    }

    .naws_logo {
        width: 200px;
    }

    .share {
        padding: 0px !important;
        background: #2c5ba6;
    }

    .share>i {
        vertical-align: middle;
        margin-top: 0.2rem;
    }

    .main-share {
        top: 0rem !important;
        border-radius: 16px !important;
        box-shadow: 0 0 1rem rgb(0 0 0 / 15%);
        z-index: -1 !important;
    }

    .main-share>ul {
        padding-top: 2rem !important;
    }

    /* .keywords_content {
        padding: 0 0.5rem;
    } */
}

@media (max-width: 768px) {
    #popular_keywords {
        background: #009de7;
    }

    #popular_keywords .keywords_content {
        justify-content: start;
    }

    .popular_keywords {
        padding: 0.5rem 0;
    }

    #top_btn {
        padding: 7px;
    }
}

@media (max-width: 767.98px) {
    .navbar {
        height: unset;
    }
}

@media (max-width: 574.99px) {
    .search_bar {
        margin-top: 0.8rem;
        margin-left: 0rem !important;
    }
}

@media (max-width: 540px) {

    /* header */
    .header_img {
        height: 3rem !important;
    }

    #nav-top {
        padding: 0 1em 0 1em;
    }

}

@media (max-width: 450.98px) {
    .search_bar {
        justify-content: flex-start;
        /* margin-top: 0.8rem; */
    }
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
    }

    .noBreak {
        break-inside: avoid;
    }

    .noPrint {
        display: none;
    }

}