/* Table style */
.datatable-custom {
    width: 100% !important;
    border-radius: 12px;
    table-layout: auto;
}


.datatable-custom td {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word;
    vertical-align: top;
}



/* Top section: search + entries */
.top-custom,
.bottom-custom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

@media (min-width: 576px) {

    .top-custom,
    .bottom-custom {
        flex-direction: row;
        justify-content: space-between;

    }
}

/* Entries dropdown */
.dataTables_length select,
.dataTables_length select:focus {
    border-radius: 8px;
    /* padding: 8px 12px; */
    border: 2px solid var(--main);
    font-size: 15px;
    background: #fff;
}

/* Search box */
.dataTables_filter input,
.dataTables_filter input:focus {
    border: 2px solid var(--main);
    border-radius: 8px;
    padding: 8px 14px;
    width: 280px;
    font-size: 15px;
}

/* Bottom: info + pagination */
.bottom-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

/* Pagination Style */
.dataTables_paginate {
    margin-top: 8px;
}

/* Pagination buttons */
.dataTables_paginate .paginate_button a {
    padding: 8px 16px !important;
    border-radius: 8px !important;
    margin: 0 4px !important;
    font-size: 14px;
    border: 1px solid var(--main) !important;
    /* background: #fff !important; */
    color: var(--main) !important;
    transition: 0.3s;
    box-shadow: none !important;
}

/* ACTIVE page */
.dataTables_paginate .paginate_button.current a,
.dataTables_paginate .paginate_button.current a:hover {
    background: var(--main) !important;
    color: #fff !important;
    border-color: var(--main) !important;
    box-shadow: none !important;
}

/* Hover */
.dataTables_paginate .paginate_button a:hover {
    background: var(--main) !important;
    color: #fff !important;
    border-color: var(--main) !important;
    box-shadow: none !important;
}

/* Remove weird DT default focus outline */
.dataTables_paginate .paginate_button:focus {
    outline: none !important;
    box-shadow: none !important;
    background: #fff !important;

}

.dataTables_paginate .page-item.active .page-link {
    background: var(--main) !important;
    color: #fff !important;
}



/* Info text */
.dataTables_info {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 600;
}

.datatable-custom td.dataTables_empty {
    text-align: center !important;
}

table.dataTable>thead>tr>th:active,
table.dataTable>thead>tr>td:active {
    outline: none
}

table.dataTable>thead>tr>th:not(.sorting_disabled),
table.dataTable>thead>tr>td:not(.sorting_disabled) {
    padding-right: 30px
}

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
}

table.dataTable>thead .sorting:before,
table.dataTable>thead .sorting:after,
table.dataTable>thead .sorting_asc:before,
table.dataTable>thead .sorting_asc:after,
table.dataTable>thead .sorting_desc:before,
table.dataTable>thead .sorting_desc:after,
table.dataTable>thead .sorting_asc_disabled:before,
table.dataTable>thead .sorting_asc_disabled:after,
table.dataTable>thead .sorting_desc_disabled:before,
table.dataTable>thead .sorting_desc_disabled:after {
    position: absolute;
    bottom: .9em;
    display: block;
    opacity: .3
}

table.dataTable>thead .sorting:before,
table.dataTable>thead .sorting_asc:before,
table.dataTable>thead .sorting_desc:before,
table.dataTable>thead .sorting_asc_disabled:before,
table.dataTable>thead .sorting_desc_disabled:before {
    right: 1em;
    content: "↑"
}

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 {
    right: .5em;
    content: "↓"
}

table.dataTable>thead .sorting_asc:before,
table.dataTable>thead .sorting_desc:after {
    opacity: 1
}

table.dataTable>thead .sorting_asc_disabled:before,
table.dataTable>thead .sorting_desc_disabled:after {
    opacity: 0
}

.bg-blur-model {
    transition: opacity 1s ease;
    backdrop-filter: blur(5px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.35s ease-out;
}

/* Slide in from right and fade in */
@keyframes toast-in {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Slide out to right and fade out */
@keyframes toast-out {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    width: 360px;
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    /* box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); */
    animation: toast-in 0.5s ease forwards;
    opacity: 0;
}



/* Fade out animation */
.toast.fade-out {
    animation: toast-out 0.5s ease forwards;
}
