
/* Bespoke Marchi CSS */
.selected {
    border: 3px solid blue;
}

/* Fix for double scroll bar issue */
html, body {
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
}

/* Explicit shell classes: MatBlazor does not emit mat-app-bar-container. */
.marchi-app-shell {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.marchi-app-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

.drawer-container {
    flex: 1;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Keep the mobile overlay inside the space below the fixed header too. */
.drawer-container > .mdc-drawer--modal {
    position: absolute;
}

.drawer-container > .mat-drawer-app-content {
    min-width: 0;
    max-width: 100%;
    height: 100%;
    overflow-x: clip;
    overflow-y: auto;
}

/* Main page content must stay within the drawer viewport on small screens. */
.marchi-page-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    overflow-wrap: anywhere;
}

@media (max-width: 640.98px) {
    .marchi-page-content {
        padding: .75rem;
    }

    .mud-table-container,
    .mud-data-grid {
        max-width: 100%;
    }
}
/* Keep account actions readable and tappable on narrow screens. */
.mdc-top-app-bar a.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .mdc-top-app-bar a[href="landing"] {
        display: none;
    }
    .mdc-top-app-bar a.nav-link {
        padding: .5rem .625rem;
    }
}

.mdc-top-app-bar .account-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 .5rem;
}
@media (max-width: 900px) {
    .mdc-top-app-bar .account-greeting { display: none; }
}
@media (max-width: 640.98px) {
    .mdc-top-app-bar a.header-shortcut { display: none; }
}

/* Keep request labels whole and related contact/status details together. */
.buyer-requests-grid {
    overflow-wrap: normal;
}
.buyer-requests-grid .request-cell-content {
    min-width: 0;
    overflow-wrap: anywhere;
}
.buyer-requests-grid .request-cell-content .mud-chip {
    margin-left: 0;
}
.buyer-requests-grid .request-cell-content .mud-typography-caption {
    display: block;
}
@media (min-width: 600px) {
    .buyer-requests-grid .mud-table-root {
        min-width: 68rem;
    }
    .buyer-requests-grid th {
        white-space: nowrap;
    }
    .buyer-requests-grid .request-cell-content {
        min-width: 10rem;
    }
}
@media (max-width: 599.98px) {
    .buyer-requests-grid .mud-table-cell[data-label]::before {
        flex: 0 0 7.5rem;
        overflow-wrap: normal;
        text-align: left;
    }
    .buyer-requests-grid .request-cell-content {
        flex: 1;
        text-align: right;
    }
}
