﻿/* =============================================================================
   DX GRID DARK THEME - DevExpress Blazor Grid Dark Overrides
   Place this file at: wwwroot/css/dx-grid-dark-theme.css
============================================================================= */

dxbl-grid {
    display: block;
    width: 100% !important;
    border: 1px solid rgba(201,168,76,0.18) !important;
    border-top: none !important;
    background: #141414 !important;
    font-family: 'Jost', sans-serif !important;
    color: #E8E2D9 !important;
}

.dxbl-scroll-viewer,
.dxbl-scroll-viewer-content {
    background: #141414 !important;
    width: 100% !important;
}

.dxbl-grid-table {
    background: #141414 !important;
    color: #E8E2D9 !important;
    width: 100% !important;
    table-layout: auto !important;
}

.dxbl-grid-header-row {
    background: linear-gradient(90deg, #1C1C1C, #1a1a1a) !important;
    border-bottom: 2px solid #C9A84C !important;
}

.dxbl-grid-header,
th.dxbl-grid-header {
    background: transparent !important;
    color: #C9A84C !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: .74rem !important;
    font-weight: 600 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
    padding: 7px 8px !important;
    border-color: rgba(201,168,76,0.18) !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.dxbl-grid-header-row > th.dxbl-grid-header {
    outline: none !important;
    box-shadow: none !important;
}

th.dxbl-grid-header-sortable:focus,
th.dxbl-grid-header-sortable:focus-visible,
th.dxbl-grid-header-sortable:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

.dxbl-grid-header-content {
    background-color: #1a1a1a !important;
    border-color: rgba(201,168,76,0.2) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.75), inset 0 0 0 1px rgba(201,168,76,0.15) !important;
    outline: none !important;
}

.dxbl-grid .dxbl-grid-header-row > th.dxbl-grid-header-sortable:hover .dxbl-grid-header-content {
    background-color: rgba(201,168,76,0.07) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.75), inset 0 0 0 1px rgba(201,168,76,0.3) !important;
}

th.dxbl-grid-header-sortable[aria-sort="ascending"] .dxbl-grid-header-content,
th.dxbl-grid-header-sortable[aria-sort="descending"] .dxbl-grid-header-content {
    box-shadow: 0 2px 12px rgba(0,0,0,0.75), inset 0 0 0 1px rgba(201,168,76,0.45) !important;
    border-color: rgba(201,168,76,0.45) !important;
}

/* Sort icons - keep small */
.dxbl-grid-sort-asc,
.dxbl-grid-sort-desc {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
    max-width: 10px !important;
    max-height: 10px !important;
    fill: #C9A84C !important;
    color: #C9A84C !important;
    opacity: .75 !important;
    vertical-align: middle !important;
    margin-left: 4px !important;
}

/* =============================================================================
   FILTER ROW - critical fix for white box icons
============================================================================= */

.dxbl-grid-filter-row,
tr.dxbl-grid-filter-row {
    background: #1C1C1C !important;
}

    .dxbl-grid-filter-row td,
    tr.dxbl-grid-filter-row td {
        background: #1C1C1C !important;
        border-color: rgba(201,168,76,0.18) !important;
        padding: 4px !important;
        border-bottom: 1px solid rgba(201,168,76,0.18) !important;
    }

    /* Reset ALL images inside filter row to correct small size */
    .dxbl-grid-filter-row img,
    .dxbl-grid-filter-row svg,
    .dxbl-grid-filter-row .dxbl-image,
    tr.dxbl-grid-filter-row img,
    tr.dxbl-grid-filter-row svg,
    tr.dxbl-grid-filter-row .dxbl-image {
        width: 14px !important;
        height: 14px !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 14px !important;
        max-height: 14px !important;
        background: transparent !important;
        display: inline-flex !important;
        flex-shrink: 0 !important;
        filter: brightness(0) saturate(100%) invert(65%) sepia(25%) saturate(400%) hue-rotate(5deg) brightness(1.1) !important;
        opacity: 0.75 !important;
    }

    /* Editor buttons inside filter row */
    .dxbl-grid-filter-row .dxbl-editor-btn,
    .dxbl-grid-filter-row .dxbl-btn,
    tr.dxbl-grid-filter-row .dxbl-editor-btn,
    tr.dxbl-grid-filter-row .dxbl-btn {
        background: transparent !important;
        border: none !important;
        padding: 0 3px !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: none !important;
    }

    /* Editors in filter row */
    .dxbl-grid-filter-row dxbl-date-edit,
    .dxbl-grid-filter-row dxbl-combo-box,
    .dxbl-grid-filter-row dxbl-select,
    .dxbl-grid-filter-row dxbl-text-edit,
    .dxbl-grid-filter-row .dxbl-text-edit {
        background: #1a1a1a !important;
        border: 1px solid rgba(201,168,76,0.16) !important;
        border-radius: 2px !important;
        width: 100% !important;
        min-height: 0 !important;
    }

    /* Input inside filter row */
    .dxbl-grid-filter-row .dxbl-text-edit-input,
    .dxbl-grid-filter-row input {
        background: #1a1a1a !important;
        color: #E8E2D9 !important;
        font-size: .78rem !important;
        border: none !important;
    }

/* =============================================================================
   DATA ROWS
============================================================================= */

.dxbl-grid-indent-cell,
.dxbl-grid-header-indent-cell,
.dxbl-grid-empty-cell {
    background: inherit !important;
    border-color: rgba(201,168,76,0.18) !important;
}

tbody tr[data-visible-index] td,
tbody tr[data-visible-index] td[role="gridcell"] {
    background: #141414 !important;
    color: #E8E2D9 !important;
    font-size: .8rem !important;
    font-family: 'Jost', sans-serif !important;
    border-bottom: 1px solid rgba(201,168,76,0.18) !important;
    border-color: rgba(201,168,76,0.18) !important;
    padding: 5px 8px !important;
    vertical-align: middle !important;
}

tbody tr[data-visible-index]:nth-child(even) td {
    background: rgba(255,255,255,0.018) !important;
}

tbody tr[data-visible-index]:hover td {
    background: rgba(201,168,76,0.06) !important;
    box-shadow: inset 3px 0 0 #C9A84C !important;
}

/* =============================================================================
   TEXT EDIT
============================================================================= */

.dxbl-text-edit {
    background: #141414 !important;
    border: 1px solid rgba(201,168,76,0.16) !important;
    border-radius: 2px !important;
}

    .dxbl-text-edit:focus-within {
        border-color: #C9A84C !important;
        box-shadow: 0 0 0 2px rgba(201,168,76,0.15) !important;
    }

.dxbl-text-edit-input {
    background: #141414 !important;
    color: #E8E2D9 !important;
    font-size: .78rem !important;
    font-family: 'Jost', sans-serif !important;
    border: none !important;
    padding: 3px 5px !important;
}

    .dxbl-text-edit-input::placeholder {
        color: #6A6258 !important;
    }

/* =============================================================================
   EXPAND BUTTON
============================================================================= */

.dxbl-grid-expand-button {
    background: transparent !important;
    border: none !important;
    color: #C9A84C !important;
    opacity: .6 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    transition: opacity .2s !important;
}

    .dxbl-grid-expand-button:hover {
        opacity: 1 !important;
        background: transparent !important;
    }

    .dxbl-grid-expand-button .dxbl-image,
    .dxbl-grid-expand-button svg {
        width: 12px !important;
        height: 12px !important;
        max-width: 12px !important;
        max-height: 12px !important;
        fill: #C9A84C !important;
        color: #C9A84C !important;
    }

/* =============================================================================
   DETAIL ROW
============================================================================= */

.dxbl-grid-detail-row td {
    background: rgba(201,168,76,0.03) !important;
    border-left: 3px solid #C9A84C !important;
    padding: 0 !important;
    white-space: normal !important;
}

/* =============================================================================
   PAGER
============================================================================= */

.dxbl-pager {
    background: #141414 !important;
    border-top: 1px solid rgba(201,168,76,0.18) !important;
    color: #6A6258 !important;
    padding: .35rem .75rem !important;
    font-family: 'Jost', sans-serif !important;
    font-size: .74rem !important;
}

    .dxbl-pager .dxbl-btn {
        background: transparent !important;
        border: 1px solid rgba(201,168,76,0.18) !important;
        color: #6A6258 !important;
        font-size: .72rem !important;
        padding: .2rem .55rem !important;
        border-radius: 2px !important;
        box-shadow: none !important;
    }

        .dxbl-pager .dxbl-btn:hover {
            border-color: #C9A84C !important;
            color: #C9A84C !important;
            background: rgba(201,168,76,0.08) !important;
        }

        .dxbl-pager .dxbl-btn[aria-current="true"] {
            border-color: #C9A84C !important;
            color: #C9A84C !important;
            background: rgba(201,168,76,0.12) !important;
        }

/* =============================================================================
   POPUPS / DROPDOWNS
============================================================================= */

dxbl-grid-header-content,
dxbl-date-edit,
dxbl-text-edit,
dxbl-combo-box,
dxbl-select,
dxbl-calendar,
dxbl-spin-edit,
[class*="dxbl-popup"],
[class*="dxbl-dropdown"],
[class*="dxbl-fl-popup"],
[class*="dxbl-overlay"],
[class*="dxbl-picker"] {
    background-color: #1a1a1a !important;
    border-color: rgba(201,168,76,0.3) !important;
    color: #e8e0cc !important;
}

html body .dxbl-popup-window,
html body .dxbl-popup-body,
html body .dxbl-dropdown-body,
html body .dxbl-fl-popup,
html body div[class*="dxbl-popup"],
html body div[class*="dxbl-dropdown"] {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(201,168,76,0.3) !important;
    color: #e8e0cc !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.8) !important;
}

html body .dxbl-list-box,
html body ul[class*="dxbl-list"] {
    background-color: #1a1a1a !important;
    color: #e8e0cc !important;
    border: none !important;
}

html body .dxbl-list-box-item,
html body li[class*="dxbl-list-box-item"] {
    background-color: #1a1a1a !important;
    color: #e8e0cc !important;
    font-family: 'Jost', sans-serif !important;
    font-size: .8rem !important;
    padding: 6px 12px !important;
    border-left: 2px solid transparent !important;
    transition: background .15s, color .15s, border-left-color .15s !important;
}

    html body .dxbl-list-box-item:hover,
    html body li[class*="dxbl-list-box-item"]:hover {
        background-color: rgba(201,168,76,0.12) !important;
        color: #c9a84c !important;
        border-left-color: #c9a84c !important;
        cursor: pointer !important;
    }

    html body .dxbl-list-box-item.dxbl-list-box-item-selected,
    html body li[class*="dxbl-list-box-item"][class*="selected"] {
        background-color: rgba(201,168,76,0.2) !important;
        color: #c9a84c !important;
        border-left-color: #c9a84c !important;
    }

/* =============================================================================
   CALENDAR
============================================================================= */

.dxbl-calendar {
    background: #141414 !important;
    border: 1px solid rgba(201,168,76,0.18) !important;
    color: #E8E2D9 !important;
    font-family: 'Jost', sans-serif !important;
}

.dxbl-calendar-header,
.dxbl-calendar-footer {
    background: #1C1C1C !important;
    border-color: rgba(201,168,76,0.18) !important;
    color: #C9A84C !important;
}

.dxbl-calendar-day,
.dxbl-calendar-item {
    color: #E8E2D9 !important;
}

    .dxbl-calendar-day:hover,
    .dxbl-calendar-item:hover {
        background: rgba(201,168,76,0.1) !important;
        color: #C9A84C !important;
    }

.dxbl-calendar-day-selected,
.dxbl-calendar-item-selected {
    background: #C9A84C !important;
    color: #0D0D0D !important;
}

.dxbl-calendar-day-name {
    color: #C9A84C !important;
    opacity: 0.6 !important;
    font-size: .7rem !important;
    letter-spacing: .08em !important;
}

.dxbl-calendar-today .dxbl-calendar-day {
    border: 1px solid #C9A84C !important;
    color: #C9A84C !important;
}

.dxbl-calendar-nav-btn .dxbl-image,
.dxbl-calendar-nav-btn svg {
    fill: #C9A84C !important;
    color: #C9A84C !important;
    opacity: 0.75 !important;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* =============================================================================
   GLOBAL ICONS (outside filter row - safe to style)
============================================================================= */

.dxbl-grid-header .dxbl-image,
.dxbl-grid-header svg.dxbl-image,
.dxbl-pager .dxbl-image,
.dxbl-pager svg {
    filter: brightness(0) saturate(100%) invert(65%) sepia(25%) saturate(400%) hue-rotate(5deg) brightness(1.1) !important;
    opacity: 0.75 !important;
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
}

dxbl-date-edit .dxbl-image,
dxbl-combo-box .dxbl-image,
dxbl-select .dxbl-image,
dxbl-spin-edit .dxbl-image,
.dxbl-editor-btn .dxbl-image {
    filter: brightness(0) saturate(100%) invert(65%) sepia(25%) saturate(400%) hue-rotate(5deg) brightness(1.1) !important;
    opacity: 0.75 !important;
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
}

dxbl-date-edit svg,
dxbl-combo-box svg,
dxbl-select svg,
dxbl-spin-edit svg,
.dxbl-editor-btn svg {
    fill: #C9A84C !important;
    color: #C9A84C !important;
    opacity: 0.75 !important;
}

/* =============================================================================
   BOOL FILTER
============================================================================= */

.dx-bool-filter .dxbl-text-edit-input {
    color: #C9A84C !important;
    font-family: 'Jost', sans-serif !important;
    font-size: .78rem !important;
    letter-spacing: .04em !important;
}

.dx-bool-filter .dxbl-text-edit {
    border-color: rgba(201,168,76,0.2) !important;
}

    .dx-bool-filter .dxbl-text-edit:focus-within {
        border-color: #C9A84C !important;
        box-shadow: 0 0 0 2px rgba(201,168,76,0.15) !important;
    }

/* =============================================================================
   DRAG
============================================================================= */

[class*="dxbl-drag"],
[class*="dxbl-draggable"],
[class*="dxbl-drag-clone"],
[class*="dxbl-drag-ghost"],
[class*="dxbl-drag-preview"],
[class*="dxbl-drag-placeholder"],
[class*="dxbl-grid-drag"],
[class*="dxbl-grid-header-drag"] {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    border: 1px solid rgba(201,168,76,0.45) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.8) !important;
    color: #c9a84c !important;
    outline: none !important;
    opacity: 0.92 !important;
}

.dxbl-grid-header.dxbl-drag-over,
.dxbl-grid-header[class*="drag-over"] {
    background: rgba(201,168,76,0.15) !important;
    border: 1px dashed #C9A84C !important;
}

/* =============================================================================
   MISC
============================================================================= */

dxbl-context-menu,
.dxbl-context-menu {
    background: #141414 !important;
    border: 1px solid rgba(201,168,76,0.18) !important;
    color: #E8E2D9 !important;
}

dxbl-scroll-bar,
.dxbl-scroll-viewer-vert-scroll-bar,
.dxbl-scroll-viewer-hor-scroll-bar {
    background: transparent !important;
}

.dxbl-a11y-status-helper {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    opacity: 0 !important;
}

.dxbl-grid-empty-row td {
    background: #141414 !important;
    border: none !important;
    padding: 0 !important;
}

.dxbl-date-edit input,
.dxbl-date-edit .dxbl-editor-input-container input {
    color-scheme: dark;
}

.dxbl-grid-header-row th.dxbl-grid-header:empty,
.dxbl-grid-header-row th:not([class*="dxbl-grid-header-sortable"]):last-child,
tbody tr[data-visible-index] td:last-child:empty,
.dxbl-grid-filter-row td:last-child:empty {
    display: none !important;
}