
/* Base flex layout for footer - Override MudGrid behavior using higher specificity */
.footer-user-info .footer-flex-layout.mud-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    gap: 8px;
    margin: 0;
}

/* Force MudItems to behave as flex items with higher specificity */
.footer-user-info .footer-flex-layout.mud-grid .mud-grid-item {
    padding: 0;
    margin: 0;
    width: auto;
    max-width: none;
    flex-shrink: 0;
}

.footer-user-info .footer-logo-section.mud-grid-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-user-info .footer-user-section.mud-grid-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    max-width: calc(100% - 140px); /* Reserve space for logo and logout button */
}

.footer-user-info .footer-logout-section.mud-grid-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Small devices down to 350px - ensure logo and logout have adequate space */
@media only screen and (max-width: 370px) {
    .footer-user-info .footer-flex-layout.mud-grid {
        padding: 0 4px;
        gap: 2px;
    }

    /* Give adequate space to logo and logout */
    .footer-user-info .footer-logo-section.mud-grid-item {
        flex-basis: 50px;
        max-width: 50px;
        min-width: 45px;
    }

    .footer-user-info .footer-user-section.mud-grid-item {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 120px);
        overflow: hidden;
    }

    .footer-user-info .footer-logout-section.mud-grid-item {
        flex-basis: 65px;
        max-width: 70px;
        min-width: 60px;
    }

    .footer-logo {
        width: 16px;
        height: 17.18px;
    }

    .footer-user-text {
        font-size: 8px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        margin: 0;
    }

    .footer-logout-btn {
        font-size: 8px;
        padding: 2px 4px;
        min-width: 55px;
        white-space: nowrap;
    }

    .footer-user-info {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
    }
}

/* Medium small devices (371px to 400px) */
@media only screen and (min-width: 371px) and (max-width: 400px) {
    .footer-user-info .footer-flex-layout.mud-grid {
        padding: 0 6px;
        gap: 4px;
    }

    .footer-user-info .footer-logo-section.mud-grid-item {
        flex-basis: 55px;
        min-width: 50px;
    }

    .footer-user-info .footer-logout-section.mud-grid-item {
        flex-basis: 70px;
        min-width: 65px;
    }

    .footer-user-text {
        font-size: 10px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .footer-logout-btn {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 60px;
        white-space: nowrap;
    }
}

/* Small to medium devices (401px to 480px) - ensure adequate space for all elements */
@media only screen and (min-width: 401px) and (max-width: 480px) {
    .ap-title {
        font-size: small;
    }

    .footer-user-info .footer-flex-layout.mud-grid {
        padding: 0 8px;
        gap: 6px;
    }

    .footer-user-info .footer-logo-section.mud-grid-item {
        flex-basis: 60px;
        min-width: 55px;
    }

    .footer-user-info .footer-logout-section.mud-grid-item {
        flex-basis: 75px;
        min-width: 70px;
    }

    .footer-user-text {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .footer-logout-btn {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 65px;
        white-space: nowrap;
    }
}

/* Wide screens (1200px and up) - Scale up footer for larger displays */
@media only screen and (min-width: 1200px) {
    div.mud-paper.footer-user-info,
    .mud-appbar-bottom .mud-paper.footer-user-info,
    .mud-layout div.mud-paper.footer-user-info {
        height: 64px;
        min-height: 64px;
        max-height: 64px;
    }

    .footer-user-info .footer-flex-layout.mud-grid {
        padding: 0 24px;
        gap: 16px;
    }

    .footer-user-info .footer-logo {
        width: 40px;
        height: 42.99px;
    }

    .footer-user-info .footer-user-text {
        font-size: 18px;
        line-height: 1.3;
    }

    .footer-user-info .footer-logout-btn.mud-button {
        font-size: 18px;
        padding: 8px 12px;
        min-width: auto;
        max-width: none;
        height: auto;
    }
}

/* Very wide screens (1600px and up) - Scale up even more */
@media only screen and (min-width: 1600px) {
    div.mud-paper.footer-user-info,
    .mud-appbar-bottom .mud-paper.footer-user-info,
    .mud-layout div.mud-paper.footer-user-info {
        height: 80px;
        min-height: 80px;
        max-height: 80px;
    }

    .footer-user-info .footer-flex-layout.mud-grid {
        padding: 0 32px;
        gap: 20px;
    }

    .footer-user-info .footer-logo {
        width: 48px;
        height: 51.58px;
    }

    .footer-user-info .footer-user-text {
        font-size: 22px;
        line-height: 1.4;
    }

    .footer-user-info .footer-logout-btn.mud-button {
        font-size: 22px;
        padding: 10px 16px;
    }
}

    /* Small devices (portrait tablets and large phones, 600px and up) */
    @media only screen and (min-width: 600px) {
        :root {
            font-size: 120%;
        }
    }

    /* Medium devices (landscape tablets, 768px and up) */
    @media only screen and (min-width: 768px) {
        :root {
            font-size: 140%;
        }
    }

    /* Large devices (laptops/desktops, 992px and up) */
    @media only screen and (min-width: 992px) {
        :root {
            font-size: 160%;
        }
    }

    /* Extra large devices (large laptops and desktops, 1200px and up) */
    @media only screen and (min-width: 1200px) {
        :root {
            font-size: 180%;
        }
    }

    html, body {
        height: 100%;
        overscroll-behavior: none;
    }

    .offscreen {
        position: absolute;
        left: -1000px;
        height: 0;
    }

    td.editable-cell svg {
        vertical-align: middle;
        margin-left: 10px;
    }

    .app-loading-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: static;
        height: 100%;
        width: 100%;
    }

    .app-loading-spinner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: static;
        width: 400px;
        height: 400px;
    }

    #app-loading-img {
        max-width: 147px;
        max-height: 200px;
        animation: loady 3000ms cubic-bezier(0.6, -0.28, 0.74, 0.05) infinite;
    }

    .white-menu svg {
        color: #fff;
    }

    /* Overflow menu items - black text */
    .white-menu + .mud-popover .mud-list-item {
        color: #000 !important;
    }

    @keyframes loady {
        50% {
            transform: scale(1.3) rotateZ(180deg);
        }
    }

    #client-logo img {
        width: 100%;
        max-width: 400px;
    }

    .text-wrap {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .app-flex > .mud-toolbar {
        flex-direction: column;
        height: auto !important;
        padding: 8px 16px !important;
    }

    .app-flex .flex-row {
        width: 100%;
    }

    .ap-title {
        line-height: 3rem !important;
    }

    .mud-input-control.ap-field {
        margin-bottom: 12px;
    }

    .appbar-two-option > .mud-toolbar {
        justify-content: space-between;
        display: flex;
    }

    .appbar-one-option > .mud-toolbar {
        justify-content: flex-end;
        display: flex;
    }

    .appbar-one-option-left > .mud-toolbar {
        justify-content: flex-start;
        display: flex;
    }

    .mud-grid {
        height: -webkit-fill-available;
    }

        .mud-grid > .mud-grid-item {
            padding: 4px;
        }

    .mud-table-head > .mud-table-row > th {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .bottom-bar {
        height: 70px;
    }

    /* Position snackbars above the footer bar */
    .mud-snackbar-location-bottom-left,
    .mud-snackbar-location-bottom-center,
    .mud-snackbar-location-bottom-right {
        bottom: 65px !important;
    }

    .mud-button {
        font-size: 1.1em;
    }

    footer.mud-appbar.mud-appbar-fixed-bottom.mud-elevation-4 {
        background-color: #fff;
    }

    div.full-width {
        width: 100%;
    }

    .mud-overlay.full-page-overlay {
        background-color: #fff;
        z-index: 2000;
    }

    .align-right {
        text-align: right;
    }

    .barcode-table .barcode-primary span {
        background: #25B9C9;
        padding: 7px 12px;
        color: #fff;
        border-radius: 24px;
        font-weight: bold;
    }

    .empty-text {
        color: var(--mud-palette-secondary-lighten);
        padding: 8px;
    }

        .empty-text:after {
            height: 100px;
            width: 100px;
            content: " ";
            display: block;
            background-image: url("/image/not-found.webp");
            background-size: cover;
            background-position: top;
        }

    .mud-dialog-fullscreen .full-screen-dialog {
        overflow-y: scroll;
    }

        .mud-dialog-fullscreen .full-screen-dialog .bottom-bar {
            height: 150px;
        }

    .mud-dialog-fullscreen-title {
        font-weight: 500;
        line-height: 1.5rem;
        margin: 0;
        display: flex;
        align-items: center;
        height: 64px;
        padding: 16px;
    }

    .mud-treeview-group > li:nth-child(odd) {
        background: #eee;
    }

    p.quantity-warning {
        color: var(--mud-palette-warning);
    }

    .quantity-warning .mud-input-outlined-border {
        border-color: var(--mud-palette-warning) !important;
    }

    .quantity-warning .mud-input-label {
        color: var(--mud-palette-warning) !important;
    }

    .editable .mud-table-cell:last-child {
        display: none;
    }

    .processed {
        padding: 0px 11.25px;
    }

        .processed > svg {
            color: var(--mud-palette-text-disabled) !important;
        }

    .card-image {
        background-size: 100%;
        min-width: 100px;
        max-height: 200px;
        margin: 14px;
    }

    .card-content {
        padding: 0px 16px 10px 16px;
    }

    .relabel-qty {
        padding: 16px;
        max-width: 200px;
        min-width: 150px;
        float: right;
    }

    .relabel-price .mud-input-helper-text, .receive-cost .mud-input-helper-text {
        font-size: 1em;
        margin: auto;
    }

        .relabel-price .mud-input-helper-text .mr-auto, .receive-cost .mud-input-helper-text .mr-auto {
            margin: auto;
        }

    .edit-price-button {
        font-size: 1em;
    }

    .mudcard-flexbox {
        display: flex;
        flex-direction: row;
    }

    .mudcard-description {
        padding: 12px;
    }

    .error-message {
        word-wrap: break-word;
    }

    .product-detail-image {
        margin: 4px;
        border-radius: var(--mud-default-borderradius);
        border-color: var(--mud-palette-lines-inputs);
        border-width: 1px;
        border-style: solid;
        text-align: center;
    }

        .product-detail-image img {
            margin-left: auto;
            margin-right: auto;
            max-width: 100%;
            max-height: 100%;
        }

    .mud-list-padding.search-results {
        padding-bottom: 60px;
    }

    .po-list {
        overflow-y: scroll;
    }

    .search-results-pager {
        text-align: center;
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
    }

    .mud-radio-content > .locked-pick-batch {
        color: red;
    }

    .mud-radio-content > .expired-lock-pick-batch {
        color: orange;
    }

    .mud-radio-content > .complete-pick-batch {
        color: green;
    }

    .vertical-radio-group .mud-radio-group {
        display: flex;
        flex-direction: column;
    }

    .label-on-top .mud-input-label {
        position: absolute;
        transform: translate(14px,-6px) scale(.75);
    }

    .po-list-flexbox {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .mud-checkbox .mud-icon-button {
        padding: 0px 12px;
    }

    .no-flex-grow {
        flex-grow: initial;
    }

    .text-truncate {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        @supports (-webkit-line-clamp: 3) {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: initial;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }
    }

    .ap-field .mud-input > input.mud-input-root {
        padding-top: 8px;
        padding-bottom: 8px;
    }


    .done-button-adornment .mud-input-adornment {
        position: absolute;
        right: 0;
        width: 60px;
    }

    .done-button-adornment .mud-icon-button {
        width: 60px;
        border-radius: 0;
        margin-right: 60px;
    }

    .done-button-adornment svg {
        height: 100%;
        width: 60px;
    }

    .textfield-error {
    }

    .textfield-required {
        background-color: #FEF6E8
    }

    .textfield-validated {
        background-color: #E5FFEC
    }

    .mud-field-validated div.mud-input {
        background-color: #E5FFEC;
        border: 1px solid #45B662;
        border-radius: 4px;
    }

    .mud-field-highlighted div.mud-input {
        background-color: #D3F1F4;
        border: 1px solid #25B9C9;
        border-radius: 4px;
    }

    .mud-field-standard {
        min-height: 56px !important;
        max-height: 56px !important;
    }

    .mud-field-standard .mud-input-root {
        min-height: 56px !important;
        max-height: 56px !important;
    }

    .mud-field-standard .mud-input-root .mud-input {
        min-height: 40px !important;
        max-height: 40px !important;
        padding: 8px 12px !important;
        line-height: 1.4 !important;
    }

    .adornment-small svg {
        height: 28px;
        width: 28px;
    }


    .textfield-validated .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
        border-color: green;
    }


    .upc-text-field {
        font-size: 20px;
    }

    .item-list-text {
        color: #000;
        font-family: Roboto;
        font-style: normal;
        line-height: normal;
    }

    .purchase-order-list {
        border-radius: 8px;
        border: var(--Text-size, 1px) solid #E0E0E0;
        background: var(--FSMobile-Maine-Menu-Item-Background, #FFF);
        box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.45);
    }

    .purchase-order-list-item {
        padding-top: 16px;
        padding-bottom: 16px;
        border-top: var(--Text-size, 1px) solid #BDBDBD;
    }

    .item-list-text-400 {
        font-size: 16px;
        font-weight: 400;
        text-transform: uppercase;
        word-wrap: break-word
    }

    .item-list-text-500 {
        font-size: 14px;
        font-weight: 500;
    }

    .item-list-text-600 {
        font-size: 20px;
        font-weight: 600;
    }

    .purchase-order-list-sub-header {
        padding: 8px 16px;
        border-top: var(--Text-size, 1px) solid #BDBDBD;
        width: 100%;
    }

    .purchase-order-list-container {
        height: auto;
    }

    .no-head {
        display: none !important;
    }

    .no-padding-radio-btn .mud-icon-button {
        padding: 0px;
    }

    /* Footer Styles */
    .footer-user-info {
        background-color: #F0F0F0;
        box-shadow: unset;
        padding: 0;
        height: 40px;
        display: flex;
        align-items: center;
        min-height: 40px;
        max-height: 40px;
    }

    .footer-grid {
        width: 100%;
        margin: 0;
        padding: 0 16px;
    }

    /* FS Logo - 30x32.24px */
    .footer-logo {
        width: 30px;
        height: 32.24px;
        object-fit: contain;
    }

    .footer-user-text {
        font-weight: 500;
        line-height: 120%;
        margin: 0;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .footer-logout-btn {
        min-width: auto;
        padding: 4px 8px;
        font-size: 14px;
    }

    .footer-company-section {
        background-color: white;
    }

    .mud-grid-item.footer-company-container {
        padding: 8px 0px;
    }

    .footer-company-logo {
        height: 70px;
        width: auto;
        max-width: 35%;
        object-fit: contain;
    }

/* Shared back button style for app bars and dialogs */
.fs-back-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white !important;
    padding: 4px;
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    height: 36px;
    align-self: center;
}

.fs-back-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.fs-back-btn .mud-icon-root {
    font-size: 28px !important;
}
