/*
    -------------------------------------------------
    Stock log messages (light mode)
    -------------------------------------------------
*/
.log-message {
    color: #212529;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
}

    .log-message:last-child {
        border-bottom: none;
    }

    .log-message a {
        color: #0d6efd;
        text-decoration: underline;
    }

        .log-message a:hover {
            color: #0a58ca;
        }:root {
    --merc-header-height: 60px;
    --merc-sidebar-width: 350px;
    --merc-avatar-size: 35px;
}

/* 
    -------------------------------------------------
    Wrap
    -------------------------------------------------
*/
.merc-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding-top: var(--merc-header-height);
}
/* 
    -------------------------------------------------
    Content
    -------------------------------------------------
*/
a {
    color: white;
}

.merc-content {
    padding: 2rem 3rem;

    p {
        /* font-size: 14px; */
    }
}

.merc-page-heading-1 {
    font-size: 25px;
}

.merc-page-heading-2 {
    font-size: 22px;
}

.merc-page-heading-3 {
    font-size: 20px;
}

.merc-page-heading-4 {
    font-size: 18px;
}

.merc-page-heading-5 {
    font-size: 17px;
}

.merc-page-heading-6 {
    font-size: 15px;
}
/* 
    -------------------------------------------------
    Header
    -------------------------------------------------
*/
/* General avatar styling */
.merc-avatar {
    display: inline-block;
    border-radius: 50px;
    width: var(--merc-avatar-size);
    height: var(--merc-avatar-size);
    overflow: hidden;
    border: 1px solid #a3a3a3;

    img {
        width: var(--merc-avatar-size);
        height: var(--merc-avatar-size);
    }

    .merc-badge {
        position: absolute;
        top: 0;
        left: 60%;
    }
}

.merc-header {
    height: var(--merc-header-height);
    background: #000;
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 100;

    .navbar-navtoggle {
        padding-right: 10px;
    }

    .navbar-brand {
        padding-top: 0;
    }

    .merc-navbar {
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 4px;
    }

    .merc-navbar-nav-avatar {
        .merc-avatar {
            margin-bottom: -5px;
        }
    }
    /* 
        Adjustments/overrides for showing buttons (sometimes within a form) in the Bootstrap dropdown menu. 
        e.g., Login and Security items in profile dropdown.
    */
    .dropdown-menu {
        position: absolute;
        max-width: 300px;

        .dropdown-item {
            .bi {
                margin-left: 1px;
                margin-right: 6px;
            }

            .dropdown-item-button {
                text-align: left;
                width: 100%;
                display: block;
                justify-content: normal;
                padding: 0;
                border-radius: 0;

                &:hover {
                    background: #2b2a2f;
                }
            }
        }
    }
}

/* 
    -------------------------------------------------
    DxDrawer adjustments
    -------------------------------------------------
*/
/* Setting the sidebar width. */
.merc-drawer.dxbl-drawer > .dxbl-drawer-panel > .dxbl-drawer-body {
    width: var(--merc-sidebar-width);
    padding: 0;

    .merc-sidebar {
        width: 100%;
        padding: 1rem 17px;
    }
}
/* Allow the content panel of DxDrawer to scroll when needed. */
.merc-drawer.dxbl-drawer .dxbl-drawer-content,
.merc-main.dxbl-drawer .dxbl-drawer-content {
    overflow-y: auto !important;
    margin: 0;
}

/* 
    -------------------------------------------------
    Filter definitions
    -------------------------------------------------
*/
/* Base Styles */
.merc-filter-block {
    font-family: 'Consolas', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #282c34;
    color: #abb2bf;
    padding: 4px;
    padding-left: 6px;
    border-radius: .2rem;
    overflow-x: auto;
    margin-top: 6px;
}

.merc-filter-conjunction {
    color: #b8acf6;
}

.merc-filter-fieldname {
    color: #85b8ff;
}

.merc-filter-operator {
    color: #7ee2b8;
}

.merc-filter-value {
    color: #d19a66;
}

.inactive-item > td {
    background-color: lightcoral;
    height: 40px;
}

.active-item > td {
    height: 40px;
}

.category-item > td {
    background-color: #444444; /* Light gray for category rows */
    height: 40px;
}

.invited-user > td {
    background-color: #8f6b2e;
    height: 40px;
}

.log-pane {
    border: 1px solid #ccc; /* Light border for separation */
    border-radius: 5px; /* Rounded corners */
    padding: 10px; /* Inner spacing */
    background-color: #292929; /* Light background for readability */
    /*max-height: 900px; /* Limit height to prevent overflow */
    overflow-y: auto; /* Enable vertical scrolling for long logs */
    font-family: monospace; /* Monospace font for log-like appearance */
    font-size: 14px; /* Readable font size */
}

/* 
    -------------------------------------------------
    Stock log messages (dark mode)
    -------------------------------------------------
*/
.log-message {
    color: #d0d0d0;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 0.875rem;
}

    .log-message:last-child {
        border-bottom: none;
    }

    .log-message a {
        color: #7eb8f7;
        text-decoration: underline;
    }

        .log-message a:hover {
            color: #a8d0ff;
        }
/* Add to existing file - User Flyout Styles */
.merc-avatar-button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: border-color 0.2s ease;
}

    .merc-avatar-button:hover {
        border-color: rgba(255, 255, 255, 0.3);
    }

.merc-avatar-img {
    width: var(--merc-avatar-size);
    height: var(--merc-avatar-size);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.merc-user-flyout {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
}

.merc-flyout-content {
    background: #2b2a2f;
    padding: 0;
}

.merc-flyout-user-section {
    background: linear-gradient(135deg, #5c2d91 0%, #46444a 100%);
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: white;
}

.merc-flyout-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.merc-flyout-username {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.merc-flyout-section {
    padding: 1rem 1.25rem;
}

.merc-flyout-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.merc-flyout-combobox {
    width: 100%;
}

.merc-flyout-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

.merc-flyout-admin-section {
    padding: 0.75rem 1.25rem;
}

.merc-ai-usage-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.merc-ai-usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: #66bb6a;
    transition: width 0.3s ease;
}

    .merc-ai-usage-bar-fill.merc-ai-usage-warning {
        background: #fdd835;
    }

    .merc-ai-usage-bar-fill.merc-ai-usage-danger {
        background: #ef5350;
    }

.merc-ai-usage-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}

.merc-ai-usage-over {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #ef5350;
}

.merc-flyout-menu-button {
    width: 100%;
    justify-content: flex-start;
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.9);
    transition: background-color 0.2s ease;
}

    .merc-flyout-menu-button:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .merc-flyout-menu-button .dxbl-btn-txt {
        margin-left: 0.625rem;
    }

.merc-flyout-logout-form {
    width: 100%;
}

.merc-flyout-logout-button {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 0.75rem;
    border-radius: 6px;
    color: #ff6b6b;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .merc-flyout-logout-button:hover {
        background: rgba(255, 107, 107, 0.1);
        color: #ff5252;
    }

    .merc-flyout-logout-button .dxbl-btn-txt {
        margin-left: 0.625rem;
    }

td.undefined-value {
    color: var(--bs-gray-500) !important;
    opacity: 0.6 !important;
    font-style: italic;
}

/* Blazor Reconnection UI - Modern Dark Theme */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

    #components-reconnect-modal.components-reconnect-hide {
        display: none;
    }

    #components-reconnect-modal > div {
        display: none;
        background: linear-gradient(135deg, #2b2a2f 0%, #1a1a1d 100%);
        padding: 2.5rem 2rem;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
        text-align: center;
        max-width: 420px;
        min-width: 320px;
    }

    #components-reconnect-modal.components-reconnect-show .components-reconnect-show,
    #components-reconnect-modal.components-reconnect-failed .components-reconnect-failed,
    #components-reconnect-modal.components-reconnect-resume-failed .components-reconnect-failed,
    #components-reconnect-modal.components-reconnect-rejected .components-reconnect-rejected {
        display: block;
    }

    #components-reconnect-modal .spinner-border {
        width: 3.5rem;
        height: 3.5rem;
        border-width: 0.35rem;
        color: #b8acf6;
        margin-bottom: 1.25rem;
    }

    #components-reconnect-modal p {
        margin: 0.5rem 0;
        font-size: 1.125rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.95);
        line-height: 1.6;
    }

    #components-reconnect-modal button:active {
        transform: translateY(0);
    }

/* AI chat drawer — viewport-height container, independent inner scroll */
.merc-content:has(.chat-drawer) {
    padding: 0 !important;
    overflow: hidden !important;
}

.chat-drawer.dxbl-drawer {
    height: calc(100vh - var(--merc-header-height, 60px));
}

    .chat-drawer.dxbl-drawer > .dxbl-drawer-panel > .dxbl-drawer-body {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch; /* ← force children to fill panel width */
        overflow: hidden;
        padding: 0;
        position: relative;
        background: var(--bs-body-bg);
        border-left: 1px solid var(--bs-border-color);
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .chat-drawer.dxbl-drawer > .dxbl-drawer-content {
        min-width: 0;
        height: 100%;
        overflow: hidden;
    }

/* Logo */
.merc-logo {
    height: 35px;
    width: auto;
}


.merc-messagebox-multiline .dxbl-messagebox-text {
    white-space: pre-line;
}

/*
    -------------------------------------------------
    Alerts (dark mode contrast fix)
    -------------------------------------------------
*/
.alert-danger {
    color: #f8d7da;
    background-color: #3a1d20;
    border-color: #842029;
}

    .alert-danger .alert-link {
        color: #f8d7da;
    }

    .alert-danger .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
    }

/*
    -------------------------------------------------
    Stock log messages (dark mode)
    -------------------------------------------------
*/
.log-message {
    color: #d0d0d0;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 0.875rem;
}

    .log-message:last-child {
        border-bottom: none;
    }

    .log-message a {
        color: #7eb8f7;
        text-decoration: underline;
    }

        .log-message a:hover {
            color: #a8d0ff;
        }
/* 
    -------------------------------------------------
    Annotation label (always-on tooltip style hint)
    -------------------------------------------------
*/
.merc-annotation {
    color: var(--bs-secondary-color);
    font-size: 0.8125rem; /* similar scale to .small (0.875em) but slightly tighter */
    font-style: italic;
    line-height: 1.3;
}