/*
 * DataTables 1.10 - Bootstrap 5 uyum katmanı
 * dataTables.bootstrap.css Bootstrap 3 içindir: sıralama ikonlarını
 * 'Glyphicons Halflings' ile çizer ve pagination için .page-item/.page-link
 * sınıflarını üretmez. Bootstrap 5'te Glyphicons bulunmadığı için ikonlar
 * görünmez ve sayfalama stilsiz kalır. Bu dosya her ikisini de düzeltir.
 */

/* ---------- Tablo içi buton varyantı ---------- */
/* .thm-btn tema butonu 16px/43px dolgu ile satır yüksekliğini şişirir.
   Tablo hücreleri için kompakt bir varyant. */
.thm-btn.thm-btn--sm {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

table.dataTable td .thm-btn.thm-btn--sm {
    display: inline-block;
    line-height: 1.4;
}

table.dataTable td,
table.dataTable th {
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .thm-btn.thm-btn--sm {
        font-size: 12px;
        padding: 6px 12px 5px;
    }
}

/* ---------- Sıralama ikonları (FontAwesome 5) ---------- */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: block;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    opacity: 0.45;
}

table.dataTable thead .sorting:after {
    content: "\f0dc"; /* fa-sort */
    opacity: 0.25;
}

table.dataTable thead .sorting_asc:after {
    content: "\f0de"; /* fa-sort-up */
    opacity: 0.9;
}

table.dataTable thead .sorting_desc:after {
    content: "\f0dd"; /* fa-sort-down */
    opacity: 0.9;
}

table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
    opacity: 0.15;
}

table.dataTable thead th.sorting:hover:after,
table.dataTable thead th.sorting_asc:hover:after,
table.dataTable thead th.sorting_desc:hover:after {
    opacity: 1;
}

/* ---------- Sayfalama (DataTables varsayılan + ul.pagination) ---------- */
div.dataTables_wrapper div.dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    text-align: center;
}

div.dataTables_wrapper div.dataTables_paginate span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button,
div.dataTables_wrapper ul.pagination > li > a,
div.dataTables_wrapper ul.pagination > li > span,
div.dataTables_wrapper ul.pagination > li > button {
    box-sizing: border-box;
    height: 48px;
    min-width: 48px;
    margin: 0;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: var(--fixnix-base, #cf1f1f) !important;
    border: 0 !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    font-family: var(--fixnix-font-two, "Saira", sans-serif);
    text-decoration: none !important;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
div.dataTables_wrapper .dataTables_paginate .paginate_button:focus,
div.dataTables_wrapper ul.pagination > li > a:hover,
div.dataTables_wrapper ul.pagination > li > a:focus,
div.dataTables_wrapper ul.pagination > li > button:hover,
div.dataTables_wrapper ul.pagination > li > button:focus {
    color: #fff !important;
    background: var(--fixnix-black, #171a1d) !important;
    border: 0 !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
div.dataTables_wrapper ul.pagination > li.active > a,
div.dataTables_wrapper ul.pagination > li.active > span {
    color: #fff !important;
    background: var(--fixnix-black, #171a1d) !important;
    border: 0 !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
div.dataTables_wrapper ul.pagination > li.disabled > a,
div.dataTables_wrapper ul.pagination > li.disabled > span {
    color: #fff !important;
    background: var(--fixnix-base, #cf1f1f) !important;
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

/* ---------- Filtre / uzunluk / bilgi alanları ---------- */
div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
    margin-bottom: 12px;
}

div.dataTables_wrapper div.dataTables_filter label,
div.dataTables_wrapper div.dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 0;
}

div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
    display: inline-block;
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #fff;
}

div.dataTables_wrapper div.dataTables_filter input:focus,
div.dataTables_wrapper div.dataTables_length select:focus {
    outline: 0;
    border-color: var(--fixnix-base, #cf1f1f);
    box-shadow: 0 0 0 0.25rem rgba(207, 31, 31, 0.25);
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 14px;
    font-size: 0.9rem;
    color: #6c757d;
}

div.dataTables_wrapper div.dataTables_processing {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@media (max-width: 767.98px) {
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_paginate {
        text-align: center;
    }

    div.dataTables_wrapper div.dataTables_paginate {
        justify-content: center;
        text-align: center;
    }
}
