/*
|--------------------------------------------------------------------------
| DataTables Tailwind Tema Uyarlaması
|--------------------------------------------------------------------------
| DataTables 1.x ve 2.x sınıflarını birlikte destekler.
| Tailwind derlemesi gerekmez.
*/

.datatable-shell {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    box-shadow:
            0 1px 2px rgba(15, 23, 42, 0.03),
            0 12px 30px rgba(15, 23, 42, 0.06);
}

.datatable-shell .dt-container,
.datatable-shell .dataTables_wrapper {
    position: relative;
    width: 100%;
    color: #475569;
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| DataTables 2 üst ve alt kontrol alanları
|--------------------------------------------------------------------------
*/

.datatable-shell .dt-layout-row:not(.dt-layout-table) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 16px 20px;
}

.datatable-shell
.dt-layout-row:not(.dt-layout-table):first-child {
    border-bottom: 1px solid #f1f5f9;
}

.datatable-shell
.dt-layout-row:not(.dt-layout-table):last-child {
    border-top: 1px solid #f1f5f9;
}

.datatable-shell .dt-layout-cell {
    margin: 0;
    padding: 0;
}

.datatable-shell .dt-layout-table {
    display: block;
    margin: 0;
    padding: 0;
}

.datatable-shell
.dt-layout-table
.dt-layout-cell {
    display: block;
    width: 100%;
    overflow-x: auto;
}

/*
|--------------------------------------------------------------------------
| DataTables 1.x üst kontroller
|--------------------------------------------------------------------------
*/

.datatable-shell .dataTables_length,
.datatable-shell .dataTables_filter {
    box-sizing: border-box;
    margin: 0;
    padding: 16px 20px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.datatable-shell .dataTables_length {
    float: left;
}

.datatable-shell .dataTables_filter {
    float: right;
    text-align: right;
}

.datatable-shell .dataTables_wrapper::after {
    display: block;
    clear: both;
    content: "";
}

/*
|--------------------------------------------------------------------------
| Etiketler
|--------------------------------------------------------------------------
*/

.datatable-shell .dt-length,
.datatable-shell .dt-search {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.datatable-shell .dt-length label,
.datatable-shell .dt-search label,
.datatable-shell .dataTables_length label,
.datatable-shell .dataTables_filter label {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

/*
|--------------------------------------------------------------------------
| Select ve arama inputu
|--------------------------------------------------------------------------
*/

.datatable-shell select.dt-input,
.datatable-shell input.dt-input,
.datatable-shell .dataTables_length select,
.datatable-shell .dataTables_filter input {
    box-sizing: border-box;
    min-height: 40px;
    margin: 0 6px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    outline: none;
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none !important;
    transition:
            border-color 150ms ease,
            box-shadow 150ms ease;
}

.datatable-shell select.dt-input,
.datatable-shell .dataTables_length select {
    min-width: 72px;
    cursor: pointer;
}

.datatable-shell input.dt-input,
.datatable-shell .dataTables_filter input {
    min-width: 240px;
}

.datatable-shell select.dt-input:focus,
.datatable-shell input.dt-input:focus,
.datatable-shell .dataTables_length select:focus,
.datatable-shell .dataTables_filter input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12) !important;
}

/*
|--------------------------------------------------------------------------
| Tablo
|--------------------------------------------------------------------------
*/

.datatable-shell table.dataTable {
    width: 100% !important;
    min-width: 950px;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 0 !important;
    text-align: left;
}

.datatable-shell table.dataTable thead th,
.datatable-shell table.dataTable thead td {
    padding: 14px 16px !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    border-left: 0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

.datatable-shell table.dataTable tbody td {
    padding: 14px 16px !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: 0 !important;
    background: transparent !important;
    color: #475569;
    font-size: 14px;
    vertical-align: middle;
    box-shadow: none !important;
}

.datatable-shell table.dataTable tbody tr {
    background: #ffffff !important;
    transition: background-color 150ms ease;
}

.datatable-shell table.dataTable tbody tr:hover {
    background: #f8fafc !important;
}

.datatable-shell table.dataTable tbody tr:last-child td {
    border-bottom: 0 !important;
}

.datatable-shell table.dataTable td.dt-empty,
.datatable-shell table.dataTable td.dataTables_empty {
    padding: 42px 20px !important;
    color: #64748b !important;
    text-align: center !important;
}

/*
|--------------------------------------------------------------------------
| Alt bilgi
|--------------------------------------------------------------------------
*/

.datatable-shell .dt-info {
    padding: 0 !important;
    color: #64748b;
    font-size: 14px;
}

.datatable-shell .dataTables_info {
    float: left;
    box-sizing: border-box;
    padding: 18px 20px !important;
    color: #64748b;
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| Pagination
|--------------------------------------------------------------------------
*/

.datatable-shell .dt-paging,
.datatable-shell .dt-paging nav,
.datatable-shell .dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.datatable-shell .dataTables_paginate {
    float: right;
    box-sizing: border-box;
    padding: 14px 20px !important;
}

.datatable-shell .dt-paging .dt-paging-button,
.datatable-shell .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 11px !important;
    outline: none !important;
    background: #ffffff !important;
    color: #64748b !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition:
            border-color 150ms ease,
            background-color 150ms ease,
            color 150ms ease;
}

.datatable-shell
.dt-paging
.dt-paging-button:hover:not(.disabled):not(.current),
.datatable-shell
.dataTables_paginate
.paginate_button:hover:not(.disabled):not(.current) {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.datatable-shell .dt-paging .dt-paging-button.current,
.datatable-shell .dt-paging .dt-paging-button.current:hover,
.datatable-shell .dataTables_paginate .paginate_button.current,
.datatable-shell .dataTables_paginate .paginate_button.current:hover {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18) !important;
}

.datatable-shell .dt-paging .dt-paging-button.disabled,
.datatable-shell .dataTables_paginate .paginate_button.disabled {
    border-color: transparent !important;
    background: transparent !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.55;
}

/*
|--------------------------------------------------------------------------
| Processing kutusu
|--------------------------------------------------------------------------
*/

.datatable-shell .dt-processing,
.datatable-shell .dataTables_processing {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 50;
    width: auto !important;
    min-width: 190px;
    height: auto !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    transform: translate(-50%, -50%);
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    color: #334155 !important;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16) !important;
}

/*
|--------------------------------------------------------------------------
| Mobil
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
    .datatable-shell .dt-layout-row:not(.dt-layout-table) {
        align-items: stretch;
        flex-direction: column;
    }

    .datatable-shell .dt-length,
    .datatable-shell .dt-search {
        justify-content: space-between;
        width: 100%;
    }

    .datatable-shell input.dt-input,
    .datatable-shell .dataTables_filter input {
        width: 100%;
        min-width: 0;
    }

    .datatable-shell .dataTables_length,
    .datatable-shell .dataTables_filter,
    .datatable-shell .dataTables_info,
    .datatable-shell .dataTables_paginate {
        float: none;
        width: 100%;
        text-align: left;
    }

    .datatable-shell .dataTables_filter label {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .datatable-shell .dt-paging,
    .datatable-shell .dataTables_paginate {
        justify-content: flex-start;
    }
}