/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Custom CSS overrides matching OrdrIQ production aesthetic */

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | App bar — bottom border instead of elevation shadow */
.ordriq-appbar {
    border-bottom: 1px solid #E2DDD6 !important;
    box-shadow: none !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Drawer — right border for clean separation */
.ordriq-drawer .mud-drawer-content {
    border-right: 1px solid #E2DDD6;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | MudNavLink — rounded pill style on active state */
.mud-nav-link.active {
    background-color: rgba(61, 158, 143, 0.12) !important;
    border-radius: 24px !important;
    color: #3D9E8F !important;
    margin: 2px 8px;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Nav link hover state — subtle highlight */
.mud-nav-link:hover:not(.active) {
    background-color: rgba(61, 158, 143, 0.06) !important;
    border-radius: 24px !important;
    margin: 2px 8px;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Nav link default state — add margin to align with active pill */
.mud-nav-link {
    margin: 2px 8px;
    border-radius: 24px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Active nav link icon colour inherits the teal */
.mud-nav-link.active .mud-nav-link-icon {
    color: #3D9E8F !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | MudPaper — subtle 1px border for card-like elements */
.mud-paper {
    border: 1px solid #E2DDD6 !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-23 | Clickable table rows — pointer cursor on hover */
.mud-table-body tr {
    cursor: pointer;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | MudButton — no text-transform (matches production) */
.mud-button-root {
    text-transform: none !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Role switcher dropdown — compact style for app bar */
.role-switcher .mud-input-outlined-border {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

.role-switcher .mud-input {
    font-size: 0.85rem;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Sync chips — slightly smaller for app bar fit */
.mud-chip {
    font-size: 0.75rem;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-20 | Drawer nav menu padding for visual balance */
.mud-navmenu {
    padding-top: 16px;
}

/* ============================================================ */
/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | FLASH HIGHLIGHT */
/* Attention-grabbing pulse for deep-linked panels              */
/* ============================================================ */

@keyframes flash-pulse {
    0%   { background-color: transparent; }
    15%  { background-color: rgba(61, 158, 143, 0.2); }
    30%  { background-color: transparent; }
    45%  { background-color: rgba(61, 158, 143, 0.15); }
    60%  { background-color: transparent; }
    75%  { background-color: rgba(61, 158, 143, 0.1); }
    100% { background-color: transparent; }
}

.flash-highlight {
    animation: flash-pulse 3s ease-out;
    border: 2px solid #3D9E8F !important;
    border-radius: 12px;
}

/* ============================================================ */
/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | PICKER MODE    */
/* Bigger touch targets for iPad use in the warehouse            */
/* ============================================================ */

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Base font size increase for picker */
.picker-mode {
    font-size: 1.1rem;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger page titles */
.picker-mode .mud-typography-h4 {
    font-size: 2rem !important;
}

.picker-mode .mud-typography-h5 {
    font-size: 1.6rem !important;
}

.picker-mode .mud-typography-h6 {
    font-size: 1.3rem !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger body text */
.picker-mode .mud-typography-body1 {
    font-size: 1.1rem !important;
}

.picker-mode .mud-typography-body2 {
    font-size: 1rem !important;
}

.picker-mode .mud-typography-subtitle1 {
    font-size: 1.15rem !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger buttons — 48px min touch target (Apple HIG) */
.picker-mode .mud-button-root {
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: 8px 24px !important;
}

.picker-mode .mud-button-root.mud-button-size-small {
    min-height: 44px !important;
    font-size: 0.95rem !important;
    padding: 6px 16px !important;
}

.picker-mode .mud-button-root.mud-button-size-large {
    min-height: 56px !important;
    font-size: 1.15rem !important;
    padding: 12px 32px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger chips — easier to read and tap */
.picker-mode .mud-chip {
    font-size: 0.95rem !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 4px 12px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger nav links — easy tap targets in sidebar */
.picker-mode .mud-nav-link {
    min-height: 52px !important;
    font-size: 1.05rem !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger table rows — touch-friendly */
.picker-mode .mud-table-cell {
    padding: 12px 16px !important;
    font-size: 1rem !important;
}

.picker-mode .mud-table-head .mud-table-cell {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger card content — more padding, touch-friendly */
.picker-mode .mud-card {
    margin-bottom: 12px;
}

.picker-mode .mud-card-content {
    padding: 16px 20px !important;
}

.picker-mode .mud-card-actions {
    padding: 12px 20px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger progress bar */
.picker-mode .mud-progress-linear {
    height: 10px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger alert text */
.picker-mode .mud-alert-message {
    font-size: 1rem !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger icon buttons (undo, etc.) */
.picker-mode .mud-icon-button {
    width: 44px !important;
    height: 44px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger expansion panel headers */
.picker-mode .mud-expand-panel-header {
    min-height: 56px !important;
    font-size: 1.05rem !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger select/input fields */
.picker-mode .mud-input {
    font-size: 1.05rem !important;
}

.picker-mode .mud-input-control {
    min-height: 48px !important;
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Picker mode on small screens — collapse drawer, full-width cards */
@media (max-width: 960px) {
    .picker-mode .mud-main-content {
        padding: 12px !important;
    }
}

/* ============================================================ */
/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | MOBILE / TABLET */
/* Responsive optimizations for all roles on small screens       */
/* ============================================================ */

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Stack filter chips vertically on small screens */
@media (max-width: 600px) {
    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Full-width content with less padding */
    .mud-main-content {
        padding: 8px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | App bar title — hide subtitle on mobile */
    .mud-appbar .mud-typography-subtitle2 {
        display: none;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | KPI cards — 2 per row on mobile */
    .mud-grid .mud-grid-item {
        flex-basis: 50% !important;
        max-width: 50% !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Order/pick cards — full width on mobile */
    .mud-grid .mud-grid-item-xs-12.mud-grid-item-sm-6.mud-grid-item-md-4 {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Tables — horizontal scroll on small screens */
    .mud-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Needs Attention / Action Items — stack button below text */
    .mud-alert .d-flex.justify-space-between {
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Filter chips — wrap nicely */
    .d-flex.flex-wrap.gap-2 {
        gap: 6px !important;
    }

    .d-flex.flex-wrap.gap-3 {
        gap: 8px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Sync chips — hide on mobile (not useful on phone) */
    .sync-chips {
        display: none !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Role switcher — compact on mobile */
    .role-switcher {
        max-width: 160px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | DataGrid pager — compact */
    .mud-table-pagination {
        flex-wrap: wrap;
        justify-content: center !important;
    }
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Tablet (601-960px) — moderate adjustments */
@media (min-width: 601px) and (max-width: 960px) {
    .mud-main-content {
        padding: 12px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Order/pick cards — 2 per row on tablet */
    .mud-grid .mud-grid-item-xs-12.mud-grid-item-sm-6.mud-grid-item-md-4 {
        flex-basis: 50% !important;
        max-width: 50% !important;
    }
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Touch-friendly for all mobile/tablet devices */
@media (max-width: 960px) {
    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Minimum touch targets (44px per Apple HIG) */
    .mud-button-root {
        min-height: 44px !important;
    }

    .mud-icon-button {
        width: 44px !important;
        height: 44px !important;
    }

    .mud-nav-link {
        min-height: 48px !important;
    }

    .mud-chip {
        min-height: 32px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger table cells for touch */
    .mud-table-cell {
        padding: 10px 12px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Expansion panel headers — bigger tap target */
    .mud-expand-panel-header {
        min-height: 52px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Inputs — bigger on touch */
    .mud-input-control {
        min-height: 44px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Back button — full width on mobile for easy thumb reach */
    .mud-button-root[href="/pick-list"],
    .mud-button-root[href="/orders"] {
        width: 100%;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Dispatch form — stack fields vertically */
    .mud-grid .mud-grid-item-sm-4,
    .mud-grid .mud-grid-item-sm-5,
    .mud-grid .mud-grid-item-sm-3 {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
}

/* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | PICKER + MOBILE combo — maximum touch friendliness */
@media (max-width: 960px) {
    .picker-mode .mud-button-root {
        min-height: 52px !important;
        font-size: 1.05rem !important;
    }

    .picker-mode .mud-button-root.mud-button-size-large {
        min-height: 60px !important;
        font-size: 1.2rem !important;
        width: 100% !important;
    }

    .picker-mode .mud-table-cell {
        padding: 14px 12px !important;
        font-size: 1.05rem !important;
    }

    .picker-mode .mud-card-actions {
        padding: 12px !important;
    }

    .picker-mode .mud-card-actions .mud-button-root {
        width: 100% !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Progress bar even thicker on mobile picker */
    .picker-mode .mud-progress-linear {
        height: 14px !important;
    }

    /* AI Agent: Claude Opus 4.6 (1M) | 2026-03-21 | Bigger chips for finger tapping */
    .picker-mode .mud-chip {
        min-height: 40px !important;
        font-size: 1rem !important;
    }
}
