:root {
    --dt-row-selected: 232, 237, 255;
    /* Selected row background RGB color */
    --dt-row-selected-text: 255, 255, 255;
    /* Selected row text color */
    --dt-row-selected-link: 9, 10, 11;
    /* Link color in selected row */
    --dt-row-stripe: 0, 0, 0;
    /* Stripe row base color */
    --dt-row-hover: 0, 0, 0;
    /* Hover row base color */
    --dt-processing: 231, 29, 114;
    --dt-column-ordering: 0, 0, 0;
    /* Column ordering indicator color */
    --dt-header-align-items: center;
    /* Header vertical alignment */
    --dt-html-background: white;
    /* Background color for light mode */
    --dt-row-hover-alpha: 0.035;
    /* Hover row transparency */
    --dt-row-stripe-alpha: 0.023;
    /* Stripe row transparency */
    --dt-column-ordering-alpha: 0.019;
    /* Column ordering transparency */
    --dt-row-selected-stripe-alpha: 0.923;
    /* Transparency for selected striped row */
    --dt-row-selected-column-ordering-alpha: 0.919;
    /* Transparency for selected column ordering */
}

/* =====================================================
   Processing loader (appears when loading data)
===================================================== */
.dt-container {
    width: 100%
}

div.dt-processing {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    margin-left: -100px;
    margin-top: -22px;
    text-align: center;
    padding: 2px;
    z-index: 10;
    /* Display above other elements */
}

div.dt-processing>div:last-child {
    position: relative;
    width: 80px;
    height: 15px;
    margin: 1em auto;
}

div.dt-processing>div:last-child>div {
    position: absolute;
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    /* Circular shape */
    background: rgb(var(--dt-processing));
    /* Ball color */
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
    /* Smooth animation */
}

/* Loader ball animations */
div.dt-processing>div:last-child>div:nth-child(1) {
    left: 8px;
    animation: datatables-loader-1 0.6s infinite;
}

div.dt-processing>div:last-child>div:nth-child(2),
div.dt-processing>div:last-child>div:nth-child(3) {
    left: 8px;
    animation: datatables-loader-2 0.6s infinite;
}

div.dt-processing>div:last-child>div:nth-child(3) {
    left: 32px;
}

div.dt-processing>div:last-child>div:nth-child(4) {
    left: 56px;
    animation: datatables-loader-3 0.6s infinite;
}

/* Loader keyframes (animation steps) */
@keyframes datatables-loader-1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes datatables-loader-2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

@keyframes datatables-loader-3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

/* =====================================================
   Base DataTable structure and formatting
===================================================== */
table.dataTable {
    width: 100%;
    /* Full width table */
    margin: 0 auto;
    /* Centered horizontally */
    border-spacing: 0;
    /* Remove space between cells */
}

table.dataTable thead th,
table.dataTable tfoot th {
    font-weight: bold;
    /* Bold header/footer text */
}

/* Header cell styles */
table.dataTable>thead>tr>th,
table.dataTable>thead>tr>td {
    padding: 12px 24px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3) !important;
    cursor: pointer;
    /* Line below headers */
}

.dt-orderable-none{
    cursor: default !important;
}

table.dataTable > thead > tr > th:hover span {
  color: var(--Color-State-HoverPrimary) !important;
}

table.dataTable > thead > tr > th:hover .dt-column-header::after {
  background-color: var(--Color-State-HoverPrimary) !important;
}

table.dataTable>thead>tr>th:active,
table.dataTable>thead>tr>td:active {
    outline: none;
    /* Remove default focus outline */
}

/* Footer cell styles */
table.dataTable>tfoot>tr>th,
table.dataTable>tfoot>tr>td {
    border-top: 1px solid rgba(0, 0, 0, 0.3) !important;
    padding: 10px 10px 6px;
}

/* Body rows */
table.dataTable>tbody>tr {
    background-color: transparent;
}

table.dataTable>tbody>tr:first-child>* {
    border-top: none;
}

table.dataTable>tbody>tr:last-child>* {
    border-bottom: none;
}

/* Selected row appearance */
table.dataTable>tbody>tr.selected>* {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.9);
    color: rgb(var(--dt-row-selected-text));
    border-top: 2px solid #0063CB;
    border-bottom: 2px solid #0063CB;
}

table.dataTable>tbody>tr.selected>*:first-child {
    border-left: 2px solid #0063CB;
}

table.dataTable>tbody>tr.selected>*:last-child {
    border-right: 2px solid #0063CB;
}

table.dataTable>tbody>tr.selected a {
    color: rgb(var(--dt-row-selected-link));
    /* Link color in selected row */
}

/* Cell padding */
table.dataTable>tbody>tr>th,
table.dataTable>tbody>tr>td {
    padding: 12px 24px;
    vertical-align: middle
}

/* =====================================================
   Optional table styles (borders, striping, hover)
===================================================== */

/* Zebra striping (odd rows only) */
table.dataTable.stripe>tbody>tr:nth-child(odd)>*,
table.dataTable.display>tbody>tr:nth-child(odd)>* {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), var(--dt-row-stripe-alpha));
}

/* Zebra + selected */
table.dataTable.stripe>tbody>tr:nth-child(odd).selected>*,
table.dataTable.display>tbody>tr:nth-child(odd).selected>* {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), var(--dt-row-selected-stripe-alpha));
}

/* Row hover effect */
table.dataTable.hover>tbody>tr:hover>*,
table.dataTable.display>tbody>tr:hover>* {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), var(--dt-row-hover-alpha));
}

/* Hover effect for already selected row */
table.dataTable.hover>tbody>tr.selected:hover>*,
table.dataTable.display>tbody>tr.selected:hover>* {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 1) !important;
}

table.dataTable thead th,
table.dataTable tbody td {
    color: var(--Color-Text-blacktext) !important;
    border-bottom: 1px solid var(--Color-Gray-200) !important;
    border-top: 1px solid var(--Color-Gray-200) !important;
    background-color: #FCFCFD;
}

/* =====================================================
   pagination
===================================================== */

.dt-paging {
    .dt-paging-button {
        background-color: white;
        min-width: 40px;
        height: 40px;
        border: 1px solid #e5e5e5;
    }

    .first {
        display: none;
    }

    .last {
        display: none;
    }

    .next {
        text-indent: -9999px;
        background-image: url("/components/com_seaportsailor/assets/pictograms/right_arrow2.svg");
        background-size: 35%;
        background-repeat: no-repeat;
        background-position: center;
        display: inline-block;
        width: 52px;
        height: 40px;
        border: 1px solid #e5e5e5;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .previous {
        text-indent: -9999px;
        background-image: url("/components/com_seaportsailor/assets/pictograms/left_arrow.svg");
        background-size: 35%;
        background-repeat: no-repeat;
        background-position: center;
        display: inline-block;
        width: 52px;
        height: 40px;
        border: 1px solid #e5e5e5;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    .current {
        background-color: #1a2341;
        color: white;
    }

    .ellipsis {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .dt-layout-row {
        margin-top: 1rem;
    }
}

.dt-paging {
    display: flex;
    padding: 0.75rem 1.5rem 1rem 1.5rem;
    justify-content: center;
    align-items: center;
    align-self: stretch;
}

/* =====================================================
   search bar
===================================================== */

#dt-search-0,
#dt-search-1,
#dt-search-2,
#dt-search-3,
#dt-search-4,
#dt-search-5,
#dt-search-6,
#dt-search-7 {
    margin: 12px 16px;
    width: auto;
    border-radius: 4px;
    border: 2px solid var(--Color-Neutre-DS_light_grey);
    background-color: var(--Color-Neutre-white);
    box-sizing: border-box;
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    font-size: 14px;
    color: var(--Color-Neutre-DSblack-black);
    z-index: 13;
    top: 25px;
    background-image: url(../../assets/24/search.svg);
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 24px 24px;
    padding-left: 40px;
}

#dt-search-0::placeholder,
#dt-search-1::placeholder,
#dt-search-2::placeholder,
#dt-search-3::placeholder,
#dt-search-4::placeholder,
#dt-search-5::placeholder,
#dt-search-6::placeholder,
#dt-search-7::placeholder {
    color: var(--Color-Neutre-DSblack-black);
}

#dt-search-0:focus,
#dt-search-1:focus,
#dt-search-2:focus,
#dt-search-3:focus,
#dt-search-4:focus,
#dt-search-5:focus,
#dt-search-6:focus,
#dt-search-7:focus {
    border-color: var(--Color-Primary-dark_blue);
    box-shadow: none;
}

/* =====================================================
   Order by animation
===================================================== */
.dt-orderable-asc.dt-orderable-desc .dt-column-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.125rem;
}

.dt-orderable-asc.dt-orderable-desc .dt-column-header::after {
    content: '';
    display: block;
    min-width: 24px;
    min-height: 24px;
    background-color: var(--Color-Neutre-black);
    mask-repeat: no-repeat;
    mask-image: url(../../assets/24/up_and_down.svg);
}

.dt-orderable-asc.dt-orderable-desc[aria-sort="ascending"] .dt-column-header::after {
    content: '';
    display: block;
    min-width: 24px;
    min-height: 24px;
    background-color: var(--Color-Neutre-black);
    mask-repeat: no-repeat;
    mask-image: url(../../assets/24/arrow_up.svg);
}

.dt-orderable-asc.dt-orderable-desc[aria-sort="descending"] .dt-column-header::after {
    content: '';
    display: block;
    min-width: 24px;
    min-height: 24px;
    background-color: var(--Color-Neutre-black);
    mask-repeat: no-repeat;
    mask-image: url(../../assets/24/arrow_down.svg);
}

.document-table {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 0 0;
    background: var(--Color-Neutre-white);
    border-radius: 12px;
}

.document-table-header {
    display: flex;
    padding: 20px 24px 19px 24px;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
    justify-content: space-between;
}

@media screen and (max-width: 600px) {
    .document-table-header {
        flex-direction: column;
    }
}

.document-table-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 0 0;
    align-self: stretch;
}

.document-table-header-title h4,
.document-table-header-title p {
    margin: 0px !important;
}


@media screen and (max-width: 1200px) {
    .dataTable {
        display: inline-block;
        overflow: auto;
    }
}

.atp-datatable-titles-details{
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--Color-Neutre-dark_grey);
}