/* ─── Design System: base-theme.css (mobile) ─────────────────────────
   Overrides MudBlazor defaults to match the BrandedMark design system.
   ─────────────────────────────────────────────────────────────────── */

:root {
    /* Mono family for IDs, dates, numeric counts, codes. Pair with
       --mud-typography-*-size for sizing. */
    --bm-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

.mud-button-outlined-default {
    border-color: var(--mud-palette-gray-light) !important;
}

/* Disable upper case for tabs. */
.mud-tab {
    text-transform: none !important;
}

/* ─── Chips: pill-shaped ─────────────────────────────────────── */
.mud-chip {
    border-radius: 999px !important;
    letter-spacing: -0.005em;
}

.mud-chip.mud-chip-size-small {
    height: 22px;
    font-size: 12px;
    font-weight: 500;
}

.mud-chip.mud-chip-size-medium {
    height: 26px;
    font-size: 12.5px;
    font-weight: 500;
}

/* Tooltip: repoint off the inverted gray-darker onto the Dark/DarkContrastText pair (dark mode contrast). */
.mud-tooltip.mud-tooltip-default {
    background-color: var(--mud-palette-dark);
    color: var(--mud-palette-dark-text);
}

.mud-tooltip.mud-tooltip-default.mud-tooltip-arrow::after {
    border-color: var(--mud-palette-dark) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
}

/* ─── Global search bar ──────────────────────────────────────── */
.app-search-bar .mud-input {
    height: 42px;
}

.app-search-bar.mud-input-control {
    background-color: var(--mud-palette-gray-lighter);
    margin-bottom: 5px;
    height: 42px;
    border-radius: var(--mud-default-borderradius);
}

.app-search-bar .mud-input.mud-input-outlined .mud-input-outlined-border {
    border: none;
    border-radius: var(--mud-default-borderradius);
}

.search-item-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ─── Select Components ──────────────────────────────────────── */
.bm-select {
    gap: 10px;
}

.bm-select > a {
    height: 45px;
    width: 80px;
    margin: 32px 0 0 0;
}

.bm-blob-img-td {
    width: 100%;
    display: inline-flex;
    justify-content: center;
}

/* ─── Sidebar / Drawer ──────────────────────────────────────────── */
.mud-drawer {
    border-right: 1px solid var(--mud-palette-lines-default) !important;
    box-shadow: none !important;
}

/* ─── App bar: flat, border-separated ───────────────────────────── */
.mud-appbar {
    box-shadow: none !important;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* ─── Presentation utilities ─────────────────────────────────────
       Lift inline `Style="cursor:…"` / `Style="opacity:…"` onto
       reusable classes so hover/focus pseudo-states stay reachable and
       MudBlazor theming is respected. Toggle via `Class="..."` rather
       than inline `Style`. Enforced by the
       blazor.inline-style-presentation semantic-review invariant. */
.bm-clickable {
    cursor: pointer;
}

/* De-emphasised text / icons (captions, secondary metadata). */
.bm-muted {
    opacity: 0.6;
}

/* Decorative / watermark icons sitting behind content. */
.bm-faint {
    opacity: 0.2;
}

/* Semibold weight for section headings / table cell titles (replaces inline
   Style="font-weight:600"). */
.bm-semibold {
    font-weight: 600;
}

/* Monospace for IDs, serials, codes, dates (pair with Typo.caption). */
.bm-mono {
    font-family: var(--bm-mono);
}

/* Tonal surface (tenant cards, summary panels): soft gray fill with rounded
   corners. Pair with MudPaper Elevation="0". */
.bm-tonal {
    background-color: var(--mud-palette-background-gray);
    border-radius: 8px;
}

/* Rounder bm-tonal variant for footer / hero cards. */
.bm-tonal-lg {
    border-radius: 12px;
}

/* ─── Bottom-sheet dialogs ───────────────────────────────────────
   Chrome for BottomSheetDialogComponent (selection / picker dialogs).
   Phones (<600px): the dialog paper docks to the bottom edge as a
   sheet with a grab handle. Larger screens keep the standard centered
   dialog — only the handle hides. The paper is already a flex column
   with a pinned title and a scrolling .mud-dialog-content, so capping
   its height is all the sheet needs. */
.bm-sheet-handle {
    display: none;
}

@media (max-width: 599.98px) {
    .mud-dialog.bm-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        max-height: 88vh;
        max-height: 88dvh;
        border-radius: calc(var(--mud-default-borderradius) * 3) calc(var(--mud-default-borderradius) * 3) 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        animation: bm-sheet-in 0.3s cubic-bezier(0.32, 0.72, 0, 1) both;
    }

    .mud-dialog.bm-sheet .bm-sheet-title {
        position: relative;
        padding-top: 24px;
    }

    .mud-dialog.bm-sheet .bm-sheet-handle {
        display: block;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 999px;
        background-color: var(--mud-palette-gray-light);
    }
}

@keyframes bm-sheet-in {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Fixed-width inline filter inputs in list/grid toolbars. */
.bm-search-field {
    min-width: 200px;
    max-width: 320px;
}

.bm-filter-select {
    min-width: 180px;
    max-width: 280px;
}

.bm-filter-select-sm {
    max-width: 140px;
}

/* Preserve newlines/whitespace in rendered text (e.g. AI answer suggestions). */
.bm-prewrap {
    white-space: pre-wrap;
}
