﻿body {
}

/* container: keep avatar and name-logout aligned */
.user-display {
    display: flex;
    align-items: center;
    gap: 8px; /* space between avatar and the name-logout group (reduce if you want them closer) */
}

/* tightly group the name and logout button */
.name-logout {
    display: flex;
    align-items: center;
    gap: 4px; /* set to 2px or 0 to make them even closer */
    white-space: nowrap; /* keep them on one line */
}

/* adjust the name text a bit so vertical spacing matches avatar */
.user-name {
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1;
}

/* compact the logout text-button so it sits very close to the name */
.logout-btn {
    font-size: 0.75rem;
    /*color: gray;*/
    min-width: 0; /* remove Mud's default min-width */
    padding: 0 6px; /* small horizontal padding - increase for accessibility if needed */
    margin: 0;
    line-height: 1;
    text-transform: none;
    height: auto;
    --mud-button-min-width: 0; /* defensive override if Mud uses this variable */
}

/* If you want the logout to be even closer, reduce gap above to 2px or set .logout-btn { margin-left: 2px } */
/* For touch targets, slightly increase padding */
@media (pointer: coarse) {
    .logout-btn {
        padding: 2px 2px;
    }
}

/* Dark theme tweak if needed */
@media (prefers-color-scheme: dark) {
    .logout-btn {
        color: rgba(255,255,255,0.85);
    }
}


/* Stack the brand text vertically and keep it vertically centered in the AppBar */
.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* left align */
    justify-content: center; /* vertically center within the AppBar line */
    gap: 0; /* no extra gap */
}

/* Keep the h6 tight */
.brand-title {
    margin: 0;
    line-height: 1; /* make the heading compact vertically */
}

/* Very small, subtle powered-by text snugly under the heading */
.brand-powered {
    font-size: 0.55rem; /* very small */
    color: rgba(0,0,0,0.6); /* subtle gray; adjust for theme if needed */
    margin-top: -0.01rem; /* small negative margin to pull it closer */
    line-height: 1; /* prevents extra spacing */
    padding: 0;
}

/* Optional: slightly different color in dark theme */
@media (prefers-color-scheme: dark) {
    .brand-powered {
        color: rgba(255,255,255,0.65);
    }
}


/* KPI card styling */
.kpi-card {
    background: #ffffff; /* keep white background for contrast */
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 0.5rem; /* compact padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 4px solid #d9d9d9; /* dark gray border */
    box-sizing: border-box;
    width: 100%; /* allow container/grid to control width */
    min-height: 6rem; /* small flexible minimum height */
}

.kpi-card-content {
    padding: 0.5rem 0.25rem; /* compact internal spacing */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center; /* center title and value */
}

.kpi-title {
    font-weight: 700;
    text-align: center; /* center title */
    margin: 0;
    line-height: 1;
    color: #222222;
    font-size: 0.9rem;
}

.kpi-value {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #2d3748;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
    /* responsive sizing: between 1.25rem and 2.25rem depending on viewport */
    font-size: clamp(1.25rem, 3vw, 2.25rem);
}

.kpi-actions {
    display: flex;
    justify-content: center; /* center the description at the bottom */
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.kpi-desc {
    color: #6b7280; /* gray-500 */
    font-size: 0.8rem; /* slightly smaller caption */
    text-align: center; /* center description */
    margin: 0;
}

/* Ensure the card remains compact on small screens while remaining readable */
@media (max-width: 600px) {
    .kpi-card {
        padding: 0.4rem;
        min-height: 5rem;
    }
    .kpi-title { font-size: 0.85rem; }
    .kpi-desc { font-size: 0.75rem; }
}

/* Existing styles below (kept) */


.super-dense-grid .mud-table-root .mud-table-row,
.super-dense-grid .mud-table-root .mud-table-cell {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
    vertical-align: top !important;
    font-size: .99em;    
}

.super-dense-grid .mud-table-root .mud-table-row {
    min-height: 24px !important;
    height: 24px !important;
}

 /*Override the indented-row padding when inside .super-dense-grid*/ 
.super-dense-grid .mud-data-grid .mud-table-cell.mud-row-group-indented-2 {
    padding-left: 36px !important;
}

/* ensure the DataGrid itself fills its container */
/*.super-dense-grid .mud-data-grid,
.super-dense-grid .mud-table-root {
    width: 100% !important;
    box-sizing: border-box;
}*/

    /* make rows full width */
    /*.super-dense-grid .mud-table-root .mud-table-row {
        width: 100% !important;
        box-sizing: border-box;*/
        /* if rows use flex, allow children to shrink */
        /*display: flex;
        flex-direction: column;*/ /* stacked/mobile orientation: each cell on its own line */
    /*}*/

    /* make cells fill the available width and not shrink to content */
    /*.super-dense-grid .mud-table-root .mud-table-cell {
        width: 100% !important;
        min-width: 0 !important;*/ /* important for flex children to not overflow */
        /*box-sizing: border-box;
        padding-top: 1px !important;
        padding-bottom: 1px !important;
        padding-right: 3px !important;
        vertical-align: top !important;
        font-size: .99em;*/
        /* optionally make them expand equally if you use row flex-direction: row */
        /* flex: 1 1 0% !important; */
    /*}*/

    /* keep your row-height compact */
    /*.super-dense-grid .mud-table-root .mud-table-row {
        min-height: 24px !important;
        height: 24px !important;
    }*/

    /* override indented-row padding when inside .super-dense-grid */
    /*.super-dense-grid .mud-data-grid .mud-table-cell.mud-row-group-indented-2 {
        padding-left: 36px !important;
    }*/

/* Optionally: only apply the stacked rules on small screens */
/*@media (max-width: 768px) {
    .super-dense-grid .mud-table-root .mud-table-row {
        display: flex;
        flex-direction: column;
    }

    .super-dense-grid .mud-table-root .mud-table-cell {
        width: 100% !important;
        min-width: 0 !important;
    }
}*/

/* Styles for grid filter breadcrumb chips */
.filter-breadcrumb {
    background: #f5f5f5;
    border-radius: 3px;
    padding: 1px 3px;
    display: inline-flex; /* keeps each breadcrumb inline while allowing flex alignment */
    align-items: center;
    margin-right: 2px; /* space between chips; optional */
    /*font-size: 0.9rem;*/ /* optional - matches compact pill appearance */
    color: #333333;
}

.filter-breadcrumb-title {
    color: #333333;
    font-weight: 600;
}

.filter-breadcrumb-operator {
    margin: 0 2px;
    color: #333333;
}

.filter-breadcrumb-value {
    color: #333333;
    font-weight: 600;
}

/* Optional focus/hover states for accessibility */
.filter-breadcrumb:focus,
.filter-breadcrumb:hover {
    outline: none;
    background: #ececec;
}

.small-select .mud-select-input,
.small-select .mud-select-input .mud-select-value {
    font-size: 1.15em !important;
}

.preserve-whitespace {
    /* vendor fallbacks first for older browsers */
    white-space: -moz-pre-wrap; /* Firefox */
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    /* standard behavior: preserve whitespace and line breaks; allow wrapping */
    white-space: pre-wrap;
    /* allow wrapping for very long words so layout doesn't break */
    overflow-wrap: anywhere;
    word-break: break-word;
    /* control how many spaces a tab is displayed as */
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Body that can scroll if content is large (sets a comfortable max height) */
.scrollable-text-body {
    overflow: auto;
    max-height: calc(80vh - 120px);
    padding: 6px;
}

/* Responsive two-column label/value layout using CSS grid (mobile-first) */
.proc-grid {
    display: grid;
    gap: 8px 12px;
}

/* Each row is itself a grid to keep label/value aligned nicely */
.proc-row {
    display: grid;
    gap: 6px;
    align-items: start;
    grid-template-columns: 1fr;
}

/* Label and value styling: use theme-aware color (do NOT hard-code black) */
.proc-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: inherit; /* inherits from .processor-paper */
}

.proc-value {
    font-size: 0.92rem;
    color: inherit; /* inherits from .processor-paper */
}

.proc-pre {
    color: inherit;  inherit readable theme text color 
    background: var(--mud-palette-surface, #fff);
    border: 1px solid rgba(0,0,0,0.06);
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
    max-height: 40vh;
    padding: 8px;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.25;
}

/* Styling for the map link component. Tweak to match your theme. */

.map-link-desktop {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
}

    .map-link-desktop .map-link-label {
        font-size: 0.95rem;
        color: rgba(0,0,0,0.87); /* adjust for dark/light theme if needed */
    }

/* Make the icon a little smaller on mobile if you want */
@media (max-width: 599px) {
    .map-link button.mud-icon-button-root, /* MudIconButton renders a button */
    .map-link .mud-icon-button-root {
        width: 40px;
        height: 40px;
    }
}

/* Additional polite spacing if used inline with lines of text */
.map-link {
    vertical-align: middle;
}

/* Small styling helpers for the ZillowLink component */
.zillow-link-desktop {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
}

    .zillow-link-desktop .zillow-link-label {
        font-size: 0.95rem;
        color: rgba(0,0,0,0.87);
    }

@media (max-width: 599px) {
    .zillow-link button.mud-icon-button-root {
        width: 40px;
        height: 40px;
    }
}

.zillow-link {
    vertical-align: middle;
}

@media (max-width: 600px) {
    .compact-panels .mud-expand-panel-header.mud-expand-panel-header-gutters {
        padding: 2px 6px !important;
    }

    .compact-panels .mud-expand-panel-header .mud-expand-panel-text {
        padding: 0 !important;
    }

    .compact-panels .mud-expand-panel-header p.mud-typography {
        margin: 0 !important;
        line-height: 1 !important;
    }

    .compact-panels .mud-expand-panel-header .d-flex {
        align-items: center !important;
        gap: .25rem;
    }
}