body {
    font-family: 'Public Sans', sans-serif;
}

: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-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -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;
}

/* Profile History (Beta) */
.experience-row .invalid-feedback {
    bottom: -18px;
    left: 0;
    font-size: 0.75rem;
    display: block;
    white-space: nowrap;
}

#experienceModal.saving,
#deleteExperienceModal.saving {
    cursor: progress;
}

#experienceModal.saving .modal-content .modal-close-btn {
    opacity: 0.9;
    pointer-events: none;
}

.switch-danger .switch-input:checked ~ .switch-toggle-slider {
    background-color: rgba(220, 53, 69, 0.5) !important;
    border-color: rgba(220, 53, 69, 0.5);
}

/* Social Media Page Start */
.video-thumbnail-container {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: linear-gradient(135deg, #7367f0, #28c76f);
    border-radius: 6px;
    overflow: hidden;
}

.video-thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumbnail-container:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-thumbnail-container:hover .play-overlay {
    opacity: 1;
}

.play-btn-circle {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #7367f0;
    font-size: 22px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-btn-circle:hover {
    transform: scale(1.1);
    background-color: #f8f9fa;
}

.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    padding-top: 56.25%;
    /* 16:9 */
}

.embed-responsive iframe {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.placeholder-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 15px;
    text-align: center;
}

.placeholder-background i {
    font-size: 40px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.placeholder-background span {
    font-size: 14px;
    font-weight: 500;
}
/* Social Media Page End */

.text-pre-wrap { white-space: pre-wrap !important; }

.h-5px { height: 5px !important; }
.w-100px { width: 100px !important; }
.w-80px { width: 80px !important; }
.w-155px { width: 155px !important; }
.mw-0 { min-width:0 !important; }
.max-w-140px { max-width:140px !important; }
.max-w-130px { max-width:130px !important; }
.max-w-180px { max-width:180px !important; }
.max-h-100px { max-height:100px !important; }
.max-h-280px { max-height:280px !important; }
.max-h-320px { max-height:320px !important; }
.max-h-400px { max-height:400px !important; }
.min-h-330px { min-height:330px !important; }
.min-h-220px { min-height:220px !important; }

/* Dashboard CSS Start */
.background-gradient {
    background: linear-gradient(270deg, rgba(var(--bs-primary-rgb), 0.7) 0%, var(--bs-primary) 100%) !important;
}
.table-fixed {
  table-layout: fixed;
}
/* Dashboard CSS End */

/* Start Completed Profile */

/* ── Profile Checklist Popover Styles ─────────────────── */
/* Force primary colour on popover header */
.profile-checklist-popover .popover-header {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    border-bottom: none;
    padding: 8px 14px;
    font-size: 13px;
}

.profile-checklist-popover .popover-header::before {
    display: none;
}

.profile-checklist-popover .popover-arrow::after {
    border-right-color: var(--bs-primary) !important;
}

/* Popover title elements */
.pc-title {
    font-weight: 600;
}

.pc-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    margin-left: 6px;
}

/* Popover body wrapper */
.pc-body {
    min-width: 165px;
    padding: 4px 0;
}

/* Each checklist row */
.pc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.pc-row:last-child {
    margin-bottom: 0;
}

/* Icon spans */
.pc-icon {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.pc-icon--done {
    color: #28c76f;
}

.pc-icon--fail {
    color: #ea5455;
}

/* Label spans */
.pc-label {
    font-size: 12px;
    font-weight: 500;
}

.pc-label--done {
    color: #28c76f;
}

.pc-label--fail {
    color: #ea5455;
}
/* End Completed Profile */

/* DataTables Copy to Clipboard Popup Styling */
div.dt-button-info {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: 320px !important;
    padding: 1.25rem 1.5rem !important;
    background-color: var(--bs-paper-bg, #fff) !important;
    border: 1px solid var(--bs-border-color, #dbade1) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    z-index: 99999 !important;
}

div.dt-button-info h2 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--bs-primary) !important;
    padding: 0 !important;
    margin: 0 0 0.5rem 0 !important;
    border-bottom: none !important;
}

div.dt-button-info > div {
    font-size: 0.875rem !important;
    color: var(--bs-heading-color, #444050) !important;
    padding: 0 !important;
}

@media (min-width: 576px) {
    .top-80 {
        top: 80px;
    }
}

@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,
    #deleteExperienceModal .modal-footer .row {
        row-gap: 1rem;
        column-gap: 1rem;
    }

    .experience-row {
        padding-bottom: 1.5rem;
    }

    .experience-row .invalid-feedback {
        bottom: -14px;
    }
}