/* LINER PLATFORM V3.7.2
   CUSTOMER PORTAL — ERP STYLE MOBILE HEADER
   Brand row + settings row + fully visible 3x2 customer menu. */

.mobile-control-label-v372,
.mobile-utility-copy-v372 {
  display: none;
}

@media (max-width: 900px) {
  .ui-v115 .customer-mobile-header-v372 {
    position: sticky !important;
    top: 0 !important;
    z-index: 5100 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(72px, 1fr) minmax(0, 3fr) !important;
    grid-template-areas:
      "brand brand"
      "switch utilities"
      "navigation navigation" !important;
    align-items: stretch !important;
    gap: 8px 9px !important;
    padding: 10px 12px 12px !important;
    overflow: visible !important;
    direction: ltr !important;
    color: #fff !important;
    background:
      radial-gradient(circle at 88% 5%, rgba(60,170,234,.19), transparent 28%),
      linear-gradient(112deg, var(--chrome), var(--chrome-2)) !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
    box-shadow: 0 10px 27px rgba(4,25,45,.25) !important;
  }

  /* Row 1: brand. */
  .ui-v115 .customer-mobile-header-v372 .customer-brand {
    grid-area: brand !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-brand .brand-mark.small {
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 48px !important;
    border-radius: 13px !important;
    font-size: 15px !important;
    background: linear-gradient(135deg, #1384d2, #24a2ed) !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    box-shadow:
      0 8px 18px rgba(0,0,0,.19),
      inset 0 1px 0 rgba(255,255,255,.18) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-brand > div:last-child {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-brand strong {
    display: block !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-brand span {
    display: block !important;
    margin-top: 3px !important;
    color: #a9c7dc !important;
    font-size: 9px !important;
  }

  .ui-v115 .customer-mobile-header-v372 .header-user {
    display: none !important;
  }

  /* Row 2: Head Office + Language + Theme + Logout, all aligned. */
  .ui-v115 .customer-mobile-header-v372 #switchToOpsPortal {
    grid-area: switch !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 7px 8px !important;
    border: 1px solid rgba(255,255,255,.17) !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: rgba(255,255,255,.075) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  }

  .ui-v115 .customer-mobile-header-v372 #switchToOpsPortal:hover,
  .ui-v115 .customer-mobile-header-v372 #switchToOpsPortal:focus-visible {
    border-color: rgba(115,209,255,.48) !important;
    background: rgba(50,146,210,.20) !important;
  }

  .ui-v115 .customer-mobile-header-v372 #switchToOpsPortal .portal-switch-icon {
    width: 34px !important;
    height: 34px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 9px !important;
    color: #e9f8ff !important;
    background: rgba(255,255,255,.11) !important;
    font-size: 18px !important;
  }

  .ui-v115 .customer-mobile-header-v372 #switchToOpsPortal .portal-switch-copy {
    display: none !important;
  }

  .ui-v115 .customer-mobile-header-v372 .topbar-utilities {
    grid-area: utilities !important;
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 6px !important;
    direction: ltr !important;
  }

  .ui-v115 .customer-mobile-header-v372 .language-switcher,
  .ui-v115 .customer-mobile-header-v372 .utility-button {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 7px 6px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255,255,255,.17) !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: rgba(255,255,255,.075) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .language-switcher:hover,
  .ui-v115 .customer-mobile-header-v372 .utility-button:hover,
  .ui-v115 .customer-mobile-header-v372 .language-switcher:focus-within,
  .ui-v115 .customer-mobile-header-v372 .utility-button:focus-visible {
    border-color: rgba(115,209,255,.48) !important;
    background: rgba(50,146,210,.20) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .logout-button {
    border-color: rgba(255,118,138,.35) !important;
    background: rgba(183,47,69,.13) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .logout-button:hover,
  .ui-v115 .customer-mobile-header-v372 .logout-button:focus-visible {
    border-color: rgba(255,139,154,.60) !important;
    background: rgba(196,54,76,.25) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .language-icon,
  .ui-v115 .customer-mobile-header-v372 .utility-icon {
    width: 30px !important;
    height: 30px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 8px !important;
    color: #effaff !important;
    background: rgba(255,255,255,.11) !important;
    font-size: 16px !important;
  }

  .ui-v115 .customer-mobile-header-v372 .logout-button .utility-icon {
    color: #ffbdc6 !important;
    background: rgba(218,67,89,.20) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .portal-switch-copy,
  .ui-v115 .customer-mobile-header-v372 .utility-copy {
    display: none !important;
  }

  .ui-v115 .customer-mobile-header-v372 .mobile-control-label-v372,
  .ui-v115 .customer-mobile-header-v372 .mobile-utility-copy-v372 {
    display: block !important;
    min-width: 0 !important;
    color: #fff !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .ui-v115 .customer-mobile-header-v372 .mobile-utility-copy-v372 b,
  .ui-v115 .customer-mobile-header-v372 .mobile-utility-copy-v372 small {
    display: block !important;
  }

  .ui-v115 .customer-mobile-header-v372 .mobile-utility-copy-v372 small {
    display: none !important;
  }

  .ui-v115 .customer-mobile-header-v372 .language-select {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
  }

  /* Row 3: ERP-like 3x2 customer menu. */
  .ui-v115 .customer-mobile-header-v372 .customer-nav {
    grid-area: navigation !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 9px 0 0 !important;
    overflow: visible !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    direction: ltr !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-nav button {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 45px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 5px !important;
    overflow: visible !important;
    border: 1px solid rgba(255,255,255,.13) !important;
    border-radius: 10px !important;
    color: #d9e7f2 !important;
    background: rgba(255,255,255,.065) !important;
    box-shadow: none !important;
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    text-overflow: clip !important;
    transition:
      transform .16s ease,
      border-color .16s ease,
      background .16s ease,
      box-shadow .16s ease !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-nav button:hover,
  .ui-v115 .customer-mobile-header-v372 .customer-nav button:focus-visible {
    color: #fff !important;
    border-color: rgba(119,208,255,.42) !important;
    background: rgba(47,146,211,.20) !important;
    transform: translateY(-1px) !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-nav button.active {
    color: #fff !important;
    border-color: rgba(255,255,255,.27) !important;
    background:
      linear-gradient(135deg, #167fd0, #299ee9) !important;
    box-shadow:
      0 7px 18px rgba(0,0,0,.22),
      inset 0 1px 0 rgba(255,255,255,.22) !important;
  }

  .ui-v115 .customer-main {
    padding-top: 18px !important;
  }

  /* Arabic remains RTL, but the header uses the full phone width. */
  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 {
    direction: ltr !important;
  }

  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 .customer-brand {
    direction: rtl !important;
  }

  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 .topbar-utilities {
    direction: rtl !important;
  }

  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 .customer-nav {
    direction: rtl !important;
  }

  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 .customer-nav button,
  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 .mobile-control-label-v372,
  html[dir="rtl"] .ui-v115 .customer-mobile-header-v372 .mobile-utility-copy-v372 {
    direction: rtl !important;
    text-align: center !important;
  }
}

@media (max-width: 390px) {
  .ui-v115 .customer-mobile-header-v372 {
    grid-template-columns: minmax(66px, .9fr) minmax(0, 3.1fr) !important;
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ui-v115 .customer-mobile-header-v372 #switchToOpsPortal,
  .ui-v115 .customer-mobile-header-v372 .language-switcher,
  .ui-v115 .customer-mobile-header-v372 .utility-button {
    min-height: 52px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .ui-v115 .customer-mobile-header-v372 .customer-nav button {
    min-height: 43px !important;
    font-size: 9px !important;
  }
}
