/*!
    * DateTable style for OTA Web Server
    * 
    * Author : Ken Tai /Shiouyu Lee
    * 
    * Date: 2021-05-04
    */

:root {
    --radius: 2px;
    --radius_note: 2px;
    --table_bg: #1d1d1d;
    --span_text_color: #989898;
    --border_color: #979797;

    --txl_orange: #f3983e;
    --txl_orange_hover: #f3983e;
    --txt_paging: #272c32;
    --tb_border_color: #555555;
}

/* Change Datatable Header & data font-size & color */
table.dataTable thead th {
    font-weight: normal;
    background-color: var(--table_bg) !important;
    padding-top: 8px;
    padding-right: 26px;
    padding-bottom: 8px;
    padding-left: 11px;
    vertical-align: middle;
    border-right: 1px solid var(--tb_border_color);
    font-size: 12px;
}

.table-bordered {
    /* border: 1px solid var(--border_color); */
    border: 1px solid transparent;
    border-right: 0px;
    border-bottom: 0px;
}

table.dataTable tbody tr {
    background: transparent;
}

table.dataTable tbody tr:hover {
    background-color: #494949;
}

/* Selected */
table.dataTable tbody > tr.selected,
table.dataTable tbody > tr > .selected {
    background-color: #0d6efd;
}

th {
    color: var(--span_text_color);
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    border: 1px solid var(--border_color);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: -moz-none;
    -ms-user-select: none;
}
/* 添加 user-select: none;阻擋input被點選時,table header被選取 */

td {
    color: white;
    font-size: 14px;
    font-weight: 400;
    background: transparent;
    border: 1px solid var(--border_color);
}

table.dataTable tbody td {
    font-size: 12px;
}

/* Set checkbox on center position*/
input[type="checkbox"] {
    position: relative;
    left: 37% !important;
    cursor: pointer;
}
/* Set checkbox on center position*/

.dataTables_scrollBody {
    border-bottom: 1px solid var(--border_color) !important;
}

select {
    width: 80px;
    background-color: #1b1b1b;
    background-position:
        -webkit-calc(100% - 10px) -webkit-calc(0.5em),
        -webkit-calc(100% - 15px) -webkit-calc(0.8em);
    background-position:
        -moz-calc(100% - 10px) -moz-calc(0.5em),
        -moz-calc(100% - 15px) -moz-calc(0.8em);
    background-position:
        calc(100% - 10px) calc(0.5em),
        calc(100% - 15px) calc(0.8em);
    background-repeat: no-repeat;
    background-image: url(/images/input_btn_arrow.svg);
    -webkit-border-radius: 18px;
    -moz-border-radius: 18px;
    border-radius: 18px;
    border: solid 1px #b1b1b1;
    color: #fff;
}

.dataTables_wrapper .dataTables_paginate {
    text-align: center;
    position: relative;
    width: 100%;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: none;
    color: var(--span_text_color) !important;
    font-family: NotoSansTC;
    font-size: 16px;
    font-weight: 500;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    text-align: center;
    -webkit-border-radius: var(--radius_note);
    -moz-border-radius: var(--radius_note);
    border-radius: var(--radius_note);
    border: 1px solid var(--span_text_color);
    background-color: transparent;
    margin-left: 4px;
    margin-right: 4px;
    height: 30px !important;
    padding: 0 5px;
    border-radius: 4px;
    display: flex;
    width: 30px;
    justify-content: center;
    align-items: center;

}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: none;
    color: var(--txl_orange_hover) !important;
    -webkit-border-radius: var(--radius_note);
    -moz-border-radius: var(--radius_note);
    border-radius: var(--radius_note);
    /* background-color: #FFFFFF; */
    border: 1px solid var(--txl_orange);
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: none;
    color: var(--txt_paging) !important;
    font-size: 16px;
    font-weight: 500;
    -webkit-border-radius: var(--radius_note);
    -moz-border-radius: var(--radius_note);
    border-radius: var(--radius_note);
    background-color: var(--txl_orange);
    border: 1px solid var(--txl_orange);
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers {
    position: absolute;
    margin-right: auto;
    margin-top: 0px;
    margin-left: auto;
    width: 100%;
    text-align: center;
    padding-top: 30px;
}
/* 顯示幾項結果 */
.dataTables_wrapper .dataTables_length {
    color: var(--span_text_color);
    font-size: 14px;
}

/* 顯示第幾頁至第幾頁，共幾項 */
.dataTables_wrapper .dataTables_info {
    color: var(--span_text_color);
    font-size: 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper {
    color: var(--txt_paging) !important;
}

.dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    color: var(--txl_orange_hover) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: var(--txt_paging) !important;
    background: var(--txl_orange);
    height: 30px !important;
    padding: 0 5px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: var(--txt_paging) !important;
    background: var(--txl_orange);
}

/* span.ellipsis {
        color: #6A93E8!important;
    } */

/* 頁碼區不顯示"..." */
span.ellipsis {
    display: none;
}

a#example_next,
a#example_previous {
    border: transparent;
    color: #ffffff !important;
    text-decoration: underline !important;
}

a#example_next:hover,
a#example_previous:hover {
    color: var(--txl_orange_hover) !important;
}

a#example_next.paginate_button.disabled,
a#example_previous.paginate_button.disabled {
    border: transparent;
    color: #ffffff !important;
    text-decoration: none !important;
    background-color: transparent;
    cursor: not-allowed;
}
/* Change Datatable Header & data font-size & color */

.btnPre {
    content: url("/gui_cut/overview_btn_left.svg");
    cursor: pointer;
    height: 30px;
    margin-bottom: 3px;
}
.btnPre:hover {
    -webkit-border-radius: var(--radius_note);
    -moz-border-radius: var(--radius_note);
    border-radius: var(--radius_note);
    border: 1px solid var(--txl_orange);
}

.btnPre:focus,
.btnPre:active {
    content: url("/gui_cut/overview_btnf_left.svg");
    border: transparent;
}

.btnNext {
    content: url("/gui_cut/overview_btn_right.svg");
    cursor: pointer;
    height: 30px;
    margin-bottom: 3px;
}

.btnNext:hover {
    -webkit-border-radius: var(--radius_note);
    -moz-border-radius: var(--radius_note);
    border-radius: var(--radius_note);
    border: 1px solid var(--txl_orange);
}

.btnNext:focus,
.btnNext:active {
    content: url("/gui_cut/overview_btnf_right.svg");
    border: transparent;
}

a.paginate_button.next.disabled > .btnNext,
a.paginate_button.previous.disabled > .btnPre {
    cursor: not-allowed;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--span_text_color);
}

.dataTables_wrapper {
    overflow-y: hidden;
    /* overflow-x: auto; */
    overflow-x: hidden;
    padding-bottom: 20px;
}

.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable {
    border: 0px;
}

.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
    border-right: 1px solid var(--border_color);
    border-bottom: 1px solid var(--border_color);
}

.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
    /* overflow: hidden !important; */
    overflow: unset !important;
}

/* Covered 99.5 percent and latest four version */
#myTable {
    border-collapse: collapse; /* Collapse borders */
    width: 100%; /* Full-width */
    border: 0;
    font-size: 16px;
    line-height: 22px;
}

#myTable tr {
    /* Add a bottom border to all table rows */
    border-bottom: 0;
}

#myTable td {
    border: 0;
    background: transparent;
}

/* #myTable tr.header, #myTable tr:hover { */
/* Add a grey background color to the table header and on hover */
/* background-color: #f1f1f1; */
/* } */

table {
    border: none;
}

/* Fixed RMAW-138*/
table.table thead .sorting,
table.table thead .sorting_asc,
table.table thead .sorting_desc,
table.table thead .sorting_asc_disabled,
table.table thead .sorting_desc_disabled {
    vertical-align: inherit;
    background-repeat: no-repeat;
    background-position: calc(100% - 17px) 50%;
    font-size: 12px;
}

table.dataTable tbody td:not(.img):not(.table_input_checkbox) {
    min-width: 75px;
}

.checkbox_fixed_width,
.img_fixed_width {
    width: 35px;
    max-width: 35px;
}

/* Fixed: after npm cmd, these files will be changes */
table.dataTable thead .sorting {
    background-image: url("/gui_cut/datatables.net-dt/sort_both.png") !important;
}

table.dataTable thead .sorting_asc {
    background-image: url("/gui_cut/datatables.net-dt/sort_asc.png") !important;
}

table.dataTable thead .sorting_desc {
    background-image: url("/gui_cut/datatables.net-dt/sort_desc.png") !important;
}

table.dataTable thead .sorting_asc_disabled {
    background-image: url("/gui_cut/datatables.net-dt/sort_asc_disabled.png") !important;
}

table.dataTable thead .sorting_desc_disabled {
    background-image: url("/gui_cut/datatables.net-dt/sort_desc_disabled.png") !important;
}
/* Fixed: after npm cmd, these files will be changes */

.input-editbox {
    border: 1px solid #7e8799;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    width: 50%;
    background-color: #1a1b1f;
    color: #ffffff;
}

.form-button {
    text-align: center;
}

.imgInTd {
    display: list-item;
    margin: auto;
    position: initial;
    cursor: pointer;
}
