/**
 * Datatable 自訂樣式
 * 版本適用：v2.x
 */

table.dataTable th.dt-type-numeric,
table.dataTable th.dt-type-date {
    text-align: center;
}

table.dataTable .btn-div {
    margin-top: 0;
}

table.dataTable>tbody>tr>th,
table.dataTable>tbody>tr>td {
    padding: 0.375rem 0.5rem;
}

/* 怪怪的會多一條，先關掉 */
table.dataTable.dtfc-scrolling-left thead>tr>th.dtfc-fixed-left::after {
    box-shadow: none;
}

table.dataTable.Table-No-Style {
    width: 100% !important;
}

table.dataTable.Table-No-Style>thead {
    display: none;
}

table.dataTable.Table-No-Style>tbody>tr>th,
table.dataTable.Table-No-Style>tbody>tr>td {
    padding: 0;
}

div.dt-container.dt-empty-footer .Table-No-Style tbody>tr:last-child>*,
table.dataTable.Table-No-Style>thead>tr>th,
table.dataTable.Table-No-Style>thead>tr>td {
    border-bottom: 1px transparent solid;
}

table.dataTable.Table-No-Style td.dt-empty {
    background-color: #FFF;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    color: #AAA;
}

/* ＝＝＝＝＝＝ 空白列 ＝＝＝＝＝＝ */

table.dataTable th.dt-empty,
table.dataTable td.dt-empty {
    padding-block: 0.75rem;
    color: #888;
}

/* ＝＝＝＝＝＝ 輸入格 ＝＝＝＝＝＝ */

div.dt-container .dt-input,
div.dt-container select.dt-input {
    display: inline-block !important;
    border: 1px solid #ced4da !important;
    width: auto !important;
    padding-block: 0.25rem !important;
    font-size: 0.9rem !important;
}

div.dt-container .dt-input:focus,
div.dt-container select.dt-input:focus {
    border-color: #86b7fe !important;
}

div.dt-container .dt-search input {
    margin-left: 0;
}


div.dt-container select.dt-input {
    padding-right: 2rem;
}

/* ＝＝＝＝＝＝ 按鈕 ＝＝＝＝＝＝ */

.dt-paging {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

div.dt-container .dt-paging .dt-paging-button {
    margin-left: 0.25rem;
}

div.dt-container .dt-paging .dt-paging-button:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: transparent;
    color: #222 !important;
}

div.dt-container .dt-paging .dt-paging-button:active {
    background: rgba(0, 0, 0, 0.14);
    box-shadow: none;
}

/* 圓圈按鈕 */
div.dt-container .dt-paging .dt-paging-button:not(.first):not(.previous):not(.next):not(.last) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 50%;
    font-size: 0.8rem;
}

div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    color: #FFF !important;
    background: #399fbd;
    border: 1px #399fbd solid;
}

/* 文字按鈕 */
div.dt-container .dt-paging .dt-paging-button.first,
div.dt-container .dt-paging .dt-paging-button.previous,
div.dt-container .dt-paging .dt-paging-button.next,
div.dt-container .dt-paging .dt-paging-button.last {
    width: auto;
    height: auto;
    padding: 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

div.dt-container .dt-paging .dt-paging-button.disabled,
div.dt-container .dt-paging .dt-paging-button.disabled:hover,
div.dt-container .dt-paging .dt-paging-button.disabled:active {
    opacity: 0.8;
    cursor: not-allowed;
}

/* ＝＝＝＝＝＝ 自訂排版 ＝＝＝＝＝＝ */

.table-top,
.table-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.table-top .dt-length,
.table-top .dt-search,
.table-bottom .dt-info,
.table-bottom .dt-paging {
    padding: 0.5rem 0.25rem;
    float: none;
}

/* ＝＝＝＝＝＝ 滿版表格 ＝＝＝＝＝＝ */

.dt-full .dt-container,
.dt-full .dt-scroll {
    flex-grow: 1;
    flex-shrink: 1;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.dt-full .dt-scroll table.dataTable {
    margin: 0;
    min-width: calc(100% - 20px);
}

.dt-full .table-top,
.dt-full .table-bottom,
.dt-full .dt-scroll-head {
    flex-grow: 0;
    flex-shrink: 0;
}

.dt-full .dt-scroll-body {
    flex-grow: 1;
    flex-shrink: 1;
    height: 100%;
    max-height: none !important;
    overflow-y: auto;
}