
/* =========================================
   WP TABLE MANAGER - FRONTEND
   ========================================= */

.wptm-frontend {
    --wptm-bg: #f7f8fa;
    --wptm-card: #ffffff;
    --wptm-tx: #1b2430;
    --wptm-mut: #5b6675;
    --wptm-ac: #2c4a6a;
    --wptm-bd: #e1e5ea;
    --wptm-hd: #1c2b3a;
    --wptm-hdt: #ffffff;
    --wptm-ok: #e6f4ea;
    --wptm-okt: #17632a;

    width: 100%;
    margin: 1rem 0;
    color: var(--wptm-tx);
    font-size: 14px;
    box-sizing: border-box;
}

.wptm-frontend *,
.wptm-frontend *::before,
.wptm-frontend *::after {
    box-sizing: border-box;
}

/* =========================================
   FILTER TOOLBAR
   ========================================= */

.wptm-frontend .wptm-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-bottom: 16px;
}

.wptm-frontend .wptm-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.wptm-frontend .wptm-filter-label {
    margin-right: 3px;
    color: var(--wptm-mut);
    font-size: 14px;
    font-weight: 600;
}

/* =========================================
   FILTER BUTTONS
   Only buttons inside filter toolbar
   ========================================= */

.wptm-frontend .wptm-filter-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid var(--wptm-bd);
    border-radius: 8px;
    background: var(--wptm-card);
    color: var(--wptm-tx);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: all .2s ease;
}

.wptm-frontend .wptm-filter-toolbar button:hover {
    border-color: var(--wptm-ac);
    background: var(--wptm-ac);
    color: #ffffff;
}

.wptm-frontend .wptm-filter-toolbar button.active,
.wptm-frontend .wptm-filter-toolbar button[aria-pressed="true"] {
    border-color: var(--wptm-ac);
    background: var(--wptm-ac);
    color: #ffffff;
}

.wptm-frontend .wptm-filter-toolbar button:focus-visible {
    outline: 3px solid rgba(44, 74, 106, .2);
    outline-offset: 2px;
}

/* =========================================
   TABLE RESPONSIVE
   ========================================= */

.wptm-frontend .table-responsive {
    width: 100%;
    padding:5px;
    overflow-x: auto;
    border: 1px solid var(--wptm-bd);
    border-radius: 10px;
    background: var(--wptm-card);
}

.wptm-frontend .dataTables_wrapper {
    width: 100%;
}

/* =========================================
   TABLE
   ========================================= */

.wptm-frontend table.dataTable {
    width: 100% !important;
    min-width: 980px;
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0;
    background: var(--wptm-card);
    color: var(--wptm-tx);
    font-size: 14px;
}

.wptm-frontend table.dataTable thead th {
    padding: 13px 12px;
    border-bottom: 1px solid var(--wptm-bd) !important;
    background: var(--wptm-bg);
    color: var(--wptm-mut);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.wptm-frontend table.dataTable tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--wptm-bd);
    color: var(--wptm-tx);
    text-align: left;
    vertical-align: top;
}

.wptm-frontend table.dataTable tbody tr:last-child td {
    border-bottom: 0;
}

.wptm-frontend table.dataTable tbody tr:hover {
    background: #f8fafc;
}

/* =========================================
   DATATABLES SEARCH & LENGTH
   ========================================= */

.wptm-frontend .dataTables_wrapper .dataTables_filter,
.wptm-frontend .dataTables_wrapper .dataTables_length {
    margin-bottom: 14px;
    color: var(--wptm-mut);
    font-size: 13px;
}

.wptm-frontend .dataTables_wrapper .dataTables_filter input,
.wptm-frontend .dataTables_wrapper .dataTables_length select {
    min-height: 38px;
    margin-left: .5rem;
    padding: 7px 12px;
    border: 1px solid var(--wptm-bd);
    border-radius: 8px;
    background: var(--wptm-card);
    color: var(--wptm-tx);
    outline: none;
    box-shadow: none;
}

.wptm-frontend .dataTables_wrapper .dataTables_filter input:focus,
.wptm-frontend .dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--wptm-ac);
    box-shadow: 0 0 0 3px rgba(44, 74, 106, .1);
}

/* =========================================
   PAGINATION
   Modern minimalist style
   Bootstrap 5 DataTables integration
   ========================================= */

.wptm-frontend .dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Pagination list */

.wptm-frontend .dataTables_wrapper .dataTables_paginate ul.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Pagination items */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item {
    margin: 0;
}

/* Reset DataTables pagination buttons */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .paginate_button {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Pagination links */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px !important;
    background: transparent;
    color: var(--wptm-tx);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    transition: all .2s ease;
}

/* Hover */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-link:hover {
    border-color: var(--wptm-bd);
    background: var(--wptm-bg);
    color: var(--wptm-ac);
}

/* Active page */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    border-color: var(--wptm-ac);
    background: var(--wptm-ac);
    color: #ffffff;
    font-weight: 600;
}

/* Previous / Next */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link,
.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item.next .page-link {
    padding: 0 14px;
    color: var(--wptm-ac);
    font-weight: 600;
}

/* Previous / Next hover */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item.previous .page-link:hover,
.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item.next .page-link:hover {
    border-color: var(--wptm-bd);
    background: var(--wptm-bg);
    color: var(--wptm-ac);
}

/* Disabled pagination */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    border-color: transparent;
    background: transparent;
    color: #aab2bd;
    opacity: .6;
    cursor: not-allowed;
}

/* Focus */

.wptm-frontend .dataTables_wrapper .dataTables_paginate .page-link:focus {
    outline: none;
    box-shadow: none;
}

/* =========================================
   DATATABLES INFO
   ========================================= */

.wptm-frontend .dataTables_wrapper .dataTables_info {
    padding-top: 16px;
    color: var(--wptm-mut);
    font-size: 13px;
}

/* =========================================
   GENERAL INPUTS
   ========================================= */

.wptm-frontend input,
.wptm-frontend select {
    max-width: 100%;
    font: inherit;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 767px) {
    .wptm-frontend .wptm-filter-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .wptm-frontend .wptm-filter-group {
        width: 100%;
    }

    .wptm-frontend .dataTables_wrapper .dataTables_filter,
    .wptm-frontend .dataTables_wrapper .dataTables_length {
        float: none;
        width: 100%;
        text-align: left;
    }

    .wptm-frontend .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin: 6px 0 0;
    }

    .wptm-frontend .dataTables_wrapper .dataTables_length select {
        margin: 0 5px;
    }

    .wptm-frontend .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
    }

    .wptm-frontend .dataTables_wrapper .dataTables_paginate ul.pagination {
        flex-wrap: nowrap;
    }

    .wptm-frontend .table-responsive {
        border-radius: 8px;
    }
}
