:root,
[data-bs-theme=light] {
    --bs-primary: #09496d;
    --bs-primary-rgb: 9, 73, 109;
    --bs-body-bg: rgba(var(--bs-primary-rgb), 0.2);
    --bs-primary-bg-subtle: #cce0e8;
}

[data-bs-theme=dark] {
    --bs-primary: #3da9f5;
    --bs-primary-rgb: 61, 169, 245;
    --bs-primary-bg-subtle: #d9edfc;
}

table thead {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.truncate-1-lines {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.truncate-3-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.modal-blur {
    backdrop-filter: blur(4px);
}

.custom-highlight {
    background-color: rgba(var(--bs-warning-rgb), 0.8);
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
}

/* Department bulk import button start */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    /* space between buttons */
}

.paste-area {
    min-height: 250px;
    border: 1px dashed #999;
    padding: 10px;
    white-space: pre-wrap;
    overflow: auto;
    border-radius: var(--bs-border-radius);
    position: relative;
}

.paste-area:empty::before {
    content: "Paste your Excel rows here (Ctrl + V)";
    color: #999;
    pointer-events: none;
    position: absolute;
}

/* Department bulk import button end */

/* Highlight editable cells with a light border or background */
table td[contenteditable="true"] {
    background-color: #fdfdfe;
    border-bottom: 1px dashed var(--bs-primary);
    padding: 6px 20px;
    transition: background-color 0.2s, border-color 0.2s;
    cursor: text;
}

/* On hover, highlight cell */
table td[contenteditable="true"]:hover {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
}

/* On focus (when editing) */
table td[contenteditable="true"]:focus {
    outline: none;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-bottom: 1px solid var(--bs-primary);
}

.small-icon {
    transform: scale(0.7);
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
}

/* --- For table container --- */
.card-datatable.table-responsive {
    overflow: visible !important;
}

/* --- For table profile-approvals container --- */
#profile-approvals-table_wrapper .dt-scroll-body {
    position: static !important;
}

#statusFilter+.select2-container .select2-selection__rendered {
    text-align: left !important;
}

#statusFilter+.select2-container {
    width: 160px !important;
}

@media (max-width: 575.98px) {

    /* for sm and below */
    div.dt-container div.dt-length,
    div.dt-container div.dt-search {
        margin-block: 0.3rem;
    }

    /* Department bulk import button */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Cancel and Yes, Sure button CSS for Delete records */
    #deleteModal .modal-footer .row {
        row-gap: 1rem;
        column-gap: 1rem;
    }
}