/* Custom override for Admiro theme */

/* ===== Dark mode: header user profile (mask dropped text + dropdown) ===== */
body.dark-only header.page-header .profile-nav .user-content h6 {
    color: #f5f5f5;
}

body.dark-only header.page-header .profile-nav .user-content p {
    color: #b0b6bd;
}

body.dark-only header.page-header .profile-nav .custom-menu {
    background-color: #1f2123;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
}

body.dark-only header.page-header .profile-nav .custom-menu .profile-body li + li {
    border-top-color: #323538;
}

body.dark-only header.page-header .profile-nav .custom-menu li,
body.dark-only header.page-header .profile-nav .custom-menu a {
    color: #e6e8eb;
}

/* ===== Header right: keep profile-nav from being styled as a fixed 38px icon circle =====
   style.css targets every non-last non-8th li after the first with a 38px round badge;
   our profile-nav (3rd child, followed by full-screen) wrongly matched it, squeezing the
   name/email text and letting it overflow over neighbouring icons. Reset it here. */
header ul[class*=header-] > li.profile-nav:nth-child(n+2):not(:nth-child(8)):not(:last-child) {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Datatables action buttons: consistent gap between icon buttons */
table.dataTable td .btn + .btn,
.dataTable td .btn + .btn {
    margin-left: 0.125rem;
}

/* ===== DataTables scrollable / readable cells (like rwi-web-app) =====
   Columns keep their natural width; the table scrolls horizontally inside its
   card instead of wrapping text or collapsing columns. */
table.dataTable th {
    white-space: nowrap;
}

table.dataTable td {
    vertical-align: middle;
    white-space: nowrap;
}

table.dataTable td .btn {
    white-space: nowrap;
    margin-bottom: 2px;
}

/* ===== Sort arrows: consistent FontAwesome 6 icons on every table =====
   Base DataTables CSS paints TWO glyphs per sortable header (::before "▲"
   at bottom + ::after "▼" at top) which clash with the theme. Kill any
   ::before glyphs and use one FA6 icon per state, centred vertically. */
table.dataTable thead>tr>th.sorting:before,
table.dataTable thead>tr>th.sorting_asc:before,
table.dataTable thead>tr>th.sorting_desc:before,
table.dataTable thead>tr>th.sorting_asc_disabled:before,
table.dataTable thead>tr>th.sorting_desc_disabled:before,
table.dataTable thead>tr>th.sorting_disabled:before,
table.dataTable thead>tr>td.sorting:before,
table.dataTable thead>tr>td.sorting_asc:before,
table.dataTable thead>tr>td.sorting_desc:before,
table.dataTable thead>tr>td.sorting_asc_disabled:before,
table.dataTable thead>tr>td.sorting_desc_disabled:before,
table.dataTable thead>tr>td.sorting_disabled:before {
    content: none !important;
}

table.dataTable thead>tr>th.sorting:after,
table.dataTable thead>tr>th.sorting_asc:after,
table.dataTable thead>tr>th.sorting_desc:after,
table.dataTable thead>tr>th.sorting_asc_disabled:after,
table.dataTable thead>tr>th.sorting_desc_disabled:after,
table.dataTable thead>tr>th.sorting_disabled:after,
table.dataTable thead>tr>td.sorting:after,
table.dataTable thead>tr>td.sorting_asc:after,
table.dataTable thead>tr>td.sorting_desc:after,
table.dataTable thead>tr>td.sorting_asc_disabled:after,
table.dataTable thead>tr>td.sorting_desc_disabled:after,
table.dataTable thead>tr>td.sorting_disabled:after {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    position: absolute !important;
    bottom: auto !important;
    top: 50% !important;
    right: 10px !important;
    transform: translateY(-50%) !important;
    opacity: 0.4;
    color: #6b7280 !important;
    content: "\f0dc" !important;
}

table.dataTable thead>tr>th.sorting_asc:after,
table.dataTable thead>tr>td.sorting_asc:after {
    opacity: 0.9;
    color: var(--bs-primary, #0d6efd) !important;
    content: "\f0de" !important;
}

table.dataTable thead>tr>th.sorting_desc:after,
table.dataTable thead>tr>td.sorting_desc:after {
    opacity: 0.9;
    color: var(--bs-primary, #0d6efd) !important;
    content: "\f0dd" !important;
}

table.dataTable thead>tr>th.sorting_asc_disabled:after,
table.dataTable thead>tr>th.sorting_desc_disabled:after,
table.dataTable thead>tr>th.sorting_disabled:after,
table.dataTable thead>tr>td.sorting_asc_disabled:after,
table.dataTable thead>tr>td.sorting_desc_disabled:after,
table.dataTable thead>tr>td.sorting_disabled:after {
    content: none !important;
}

body.dark-only table.dataTable thead>tr>th.sorting:after,
body.dark-only table.dataTable thead>tr>th.sorting_asc:after,
body.dark-only table.dataTable thead>tr>th.sorting_desc:after,
body.dark-only table.dataTable thead>tr>td.sorting:after,
body.dark-only table.dataTable thead>tr>td.sorting_asc:after,
body.dark-only table.dataTable thead>tr>td.sorting_desc:after {
    color: #9aa4b2 !important;
}

/* Expose toggle detail rows neatly when columns collapse (responsive mode) */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
table.dataTable.dtr-column.collapsed > tbody > tr > td.control {
    padding: 8px 12px;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.child ul.dtr-details {
    width: 100%;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.child ul.dtr-details li {
    white-space: normal;
    word-break: break-word;
}

/* RWI Dashboard widgets */
.kpi-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08) !important; }
.quick-link-card { background: #fff; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.quick-link-card:hover { transform: translateY(-2px); box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.06); border-color: rgba(13, 110, 253, 0.3) !important; }
.min-width-0 { min-width: 0; }

/* Remove background-color and padding from user-img - Using unset and multiple approaches */
.user-img img,
li.profile-nav .user-wrap .user-img img,
.profile-nav .user-wrap .user-img img,
.page-main-header .profile-nav .user-img img,
.header-right .profile-nav .user-img img,
ul.header-right li.profile-nav .user-img img {
    background-color: transparent !important;
    background: none !important;
    background-image: none !important;
    padding: 0px !important;
    padding-top: 0px !important;
    padding-right: 0px !important;
    padding-bottom: 0px !important;
    padding-left: 0px !important;
}

/* Alternative approach using unset */
.user-img img {
    background-color: unset !important;
    padding: unset !important;
}

.page-header .logo-wrapper .close-btn {
    min-width: 38px;
}

/* FilePond Grid Layout for Thumbnails */
.general-thumbnail-section .filepond--list,
.variant-thumbnail-section .filepond--list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5em;
    padding: 0;
    margin: 0;
}

.general-thumbnail-section .filepond--item,
.variant-thumbnail-section .filepond--item {
    position: relative !important;
    width: calc(100% - 0.5em) !important;
    transform: none !important;
    margin: 0 !important;
}

@media (min-width: 576px) {

    .general-thumbnail-section .filepond--item,
    .variant-thumbnail-section .filepond--item {
        width: calc(50% - 0.5em) !important;
    }
}

@media (min-width: 768px) {

    .general-thumbnail-section .filepond--item,
    .variant-thumbnail-section .filepond--item {
        width: calc(33.333% - 0.5em) !important;
    }
}

@media (min-width: 992px) {

    .general-thumbnail-section .filepond--item,
    .variant-thumbnail-section .filepond--item {
        width: calc(25% - 0.5em) !important;
    }

    .slideklip_sidebar_sticky {
        position: sticky;
        height: fit-content;
        align-self: flex-start;
    }
}
/* ===== Header logo caption (white on navy sidebar) ===== */
header.page-header .logo-caption {
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap;
}

header.page-header .logo-caption small {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

@media (max-width: 991.98px) {
    header.page-header .logo-caption {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    header.page-header .logo-wrapper {
        background-color: rgba(12, 53, 106, 0.92);
    }
}

header.page-header .logo-wrapper > a:first-child {
    min-width: 0;
    flex: 1;
}

header.page-header .logo-caption {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================================
   USER DASHBOARD POLISH (scoped to body.user-dashboard only — admin &
   public layouts inherit the default Admiro teal/branding untouched)
   ===================================================================== */

/* Sidebar: replace teal rgba(48,142,135,.2) active/hover with theme navy
   (#0C356A) so it matches the --theme-default text/accents and no longer
   clashes. */
body.user-dashboard .sidebar-menu .sidebar-list:hover .sidebar-link,
body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link.active {
    background-color: rgba(12, 53, 106, 0.1);
    color: var(--theme-default);
}

body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link.active {
    background-color: var(--theme-default);
    color: #fff;
}

body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link.active h6,
body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link.active .h6 {
    color: #fff;
}

body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link.active i {
    color: #fff;
}

body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link.active .stroke-icon {
    stroke: #fff;
    color: #fff;
}

/* Sidebar link default state: keep consistent text colour while inactive */
body.user-dashboard .sidebar-menu .sidebar-list .sidebar-link h6 {
    color: inherit;
}

/* Page title: slightly tighter, theme-aligned heading */
body.user-dashboard .page-title h2 {
    color: var(--theme-default);
}
