﻿
/* ==========================================================
   QGems - XAF Header Logo
   ========================================================== */

.header-logo {
    flex-shrink: 0;
    width: 230px;
    height: 34px;
    margin-left: 6px;
    /* Disable the default XAF SVG mask */
    background-color: transparent;
    -webkit-mask: none;
    mask: none;
    /* Use the full-color QGems.app logo */
    background-image: url("../images/QGemsApp_HeaderLogo_Fluent.svg");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    transform: translateY(1px);
}



/* ==========================================================
   QGems - Image Hover Preview
   ========================================================== */

.img-thumbnail {
    border: none !important;
    background: transparent;
}

.xaf-component-image {
    cursor: zoom-in;
    border-radius: 6px;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    transform-origin: center center;
    position: relative;
    z-index: 1;
    will-change: transform;
}

    .xaf-component-image:hover {
        transform: scale(1.45);
        z-index: 9999;
        box-shadow: 0 12px 30px rgba(0,0,0,.28);
        filter: brightness(1.03);
    }


/* ==========================================================
   LIST VIEW - FILTER BUTTONS IN HEADER - HIDE WHEN NOT HOVERED
   ========================================================== */

/* Touch devices don't have hover */
@media (hover: none) {
    .xaf-component-image:hover {
        transform: none;
        box-shadow: none;
        filter: none;
    }
}

/* Inactive filter button takes no header space */
.dxbl-grid th:not(:hover) .dxbl-grid-filter-menu-funnel-btn:not(.dxbl-active):not(.active) {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
    border-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Restore it when the header is hovered */
.dxbl-grid th:hover .dxbl-grid-filter-menu-funnel-btn,
.dxbl-grid .dxbl-grid-filter-menu-funnel-btn.dxbl-active,
.dxbl-grid .dxbl-grid-filter-menu-funnel-btn.active,
.dxbl-grid .dxbl-grid-filter-menu-funnel-btn[aria-expanded="true"] {
    width: auto;
    min-width: revert;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
}

/* ==============================
   QGems Common Wait Overlay
   ============================== */

.qgems-wait-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: rgba(255, 255, 255, .65);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.qgems-wait-box {
    min-width: 200px;
    background: #fff;
    padding: 22px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
    text-align: center;
    font-weight: 600;
}

.qgems-wait-text {
    margin-top: 12px;
}

.logon-main.card:has(.company-picker) {
    width: 500px !important;
    max-width: 90vw !important;
}






/* =========================================================
   COMPANY PICKER — TEXT-ONLY MESSAGES
   ========================================================= */
/* Text-only workspace messages */
.workspace-text {
    width: 100%;
    margin: 2px 0 6px;
    text-align: center;
}

    /* Remove textbox/editor appearance */
    .workspace-text textarea,
    .workspace-text input,
    .workspace-text .dxbl-text-edit,
    .workspace-text .dxbl-memo-edit,
    .workspace-text .dxbl-text-edit-input,
    .workspace-text .dxbl-memo-edit-input {
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 2px 0 !important;
        color: inherit !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        resize: none !important;
        font: inherit;
        line-height: 1.4;
        text-align: center !important;
        cursor: default;
    }

/* Welcome text */
.workspace-welcome {
    color: var(--bs-body-color);
    font-size: 15px;
    font-weight: 500;
}

/* Warning text */
.workspace-warning {
    color: var(--bs-danger, #dc3545);
    font-size: 14px;
    font-weight: 600;
}

/* Keep the messages close together */
.workspace-welcome {
    margin-bottom: 1px;
}

.workspace-warning {
    margin-top: 0;
    margin-bottom: 4px;
}

/* =========================================================
   XAF Blazor - Modified Cells in Batch Edit Mode
   Theme-aware override
   ========================================================= */

body.dxbl-theme-fluent
.dxbl-grid.xaf-grid-batchedit-mode
td.xaf-grid-modified-value {
    background: var( --dxds-color-surface-neutral-default-rest, transparent ) !important;
    color: var( --dxds-color-content-neutral-default-rest, inherit ) !important;
}


/* Clearly show disabled XAF toolbar buttons */
.dxbl-toolbar button.dxbl-btn:disabled,
.dxbl-ribbon button.dxbl-btn:disabled,
button.xaf-toolbar-item:disabled {
    opacity: 0.38 !important;
    filter: grayscale(100%) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Remove primary blue background from disabled primary actions */
.dxbl-toolbar button.dxbl-btn-primary:disabled,
.dxbl-ribbon button.dxbl-btn-primary:disabled,
button.xaf-primary-toolbar:disabled {
    background-color: var(--bs-secondary-bg, #e9ecef) !important;
    border-color: var(--bs-border-color, #ced4da) !important;
    color: var(--bs-secondary-color, #6c757d) !important;
}

/* Fade the icon as well */
.dxbl-toolbar button.dxbl-btn:disabled img,
.dxbl-ribbon button.dxbl-btn:disabled img,
button.xaf-toolbar-item:disabled img {
    opacity: 0.55 !important;
    filter: grayscale(100%) !important;
}


/* ============================================================
   XAF Lookup Dropdown
   Prevent navigation through related-object columns.

   Example:
   Bank Account lookup
       -> Category
       -> "Bank Accounts"

   The lookup row remains selectable, but the related object
   displayed inside the row cannot be opened.
   ============================================================ */

tr[role="option"] xaf-navigation-click-helper > a.grid-cell-object-link {
    pointer-events: none;
    color: inherit;
    text-decoration: none;
    cursor: default;
}