/* =====================================================================================================
   Da-Ag Global Logistics - mobile menu (full-screen sheet)

   Built on well-known "delight" principles rather than decoration:
   - anticipation then payoff: the sheet blooms open from the menu button, then each item springs in one after another
   - tactile feedback: every control squeezes under the thumb (and gives a small buzz on phones that support it)
   - reward for the main job: a live "where is my package?" box at the top, the two sign-up paths at the bottom where the thumb rests
   - calm, premium look: deep navy, soft glass cards, two slow-drifting colour glows, one gentle sheen on the main button
   Everything is switched off or reduced for people who ask their phone for less motion.
   ===================================================================================================== */

.mobile-menu.dgl-mm {
  --mm-ease: cubic-bezier(.22, 1, .36, 1);
  --mm-spring: cubic-bezier(.34, 1.56, .64, 1);
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  padding: 0; gap: 0; background: #001a45; color: #fff; overflow: hidden;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  /* closed: a dot at the menu button; open: it grows to cover the screen */
  clip-path: circle(0 at calc(100% - 38px) 38px); visibility: hidden; pointer-events: none;
  transition: clip-path .6s var(--mm-ease), visibility 0s linear .6s;
}
.mobile-menu.dgl-mm.open { clip-path: circle(150% at calc(100% - 38px) 38px); visibility: visible; pointer-events: auto; transition: clip-path .7s var(--mm-ease), visibility 0s; }

/* ---- background: navy gradient with two slow glows -------------------------------------------------- */
.dgl-mm::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(168deg, #001a45 0%, #002868 52%, #0b3a8f 100%);
}
.dgl-mm .mm-aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.dgl-mm .mm-aurora i {
  position: absolute; width: 340px; height: 340px; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform;
}
.dgl-mm .mm-aurora i:nth-child(1) { top: -90px; right: -110px; background: #bf0a30; animation: mmDriftA 14s ease-in-out infinite alternate; }
.dgl-mm .mm-aurora i:nth-child(2) { bottom: 8%; left: -140px; background: #2f7bff; opacity: .42; animation: mmDriftB 17s ease-in-out infinite alternate; }
@keyframes mmDriftA { to { transform: translate(-60px, 120px) scale(1.15); } }
@keyframes mmDriftB { to { transform: translate(90px, -110px) scale(1.2); } }

/* ---- the scrolling sheet --------------------------------------------------------------------------- */
.dgl-mm .mm-sheet {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain;
  padding: max(16px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
/* items spring in one after another (--i is each item's place in line) */
.dgl-mm .mm-sheet > * { flex-shrink: 0; }
.dgl-mm .mm-sheet > *:not(.mm-list), .dgl-mm .mm-list > * { opacity: 0; transform: translateY(22px) scale(.97); }
.dgl-mm.open .mm-sheet > *:not(.mm-list), .dgl-mm.open .mm-list > * { animation: mmIn .62s var(--mm-spring) both; animation-delay: calc(var(--i, 0) * 58ms + 170ms); }
@keyframes mmIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---- top bar ---------------------------------------------------------------------------------------- */
.dgl-mm .mm-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; touch-action: pan-y; }
.mobile-menu.dgl-mm a.mm-brand, .mobile-menu.dgl-mm a.mm-brand:hover { display: flex; align-items: center; gap: 11px; width: auto; max-width: none; padding: 0; border-radius: 0; background: none; text-align: left; text-decoration: none; color: #fff; font-size: inherit; }
.dgl-mm .mm-brand img { height: 40px; width: auto; border-radius: 10px; background: #fff; padding: 3px 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); }
.dgl-mm .mm-brand span { font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); line-height: 1.4; max-width: 12em; }
.dgl-mm .mm-close {
  position: relative; top: auto; right: auto; width: 48px; height: 48px; border-radius: 50%; padding: 0; cursor: pointer; flex-shrink: 0;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-size: 0;
  -webkit-tap-highlight-color: transparent; transition: transform .25s var(--mm-spring), background .2s;
}
.dgl-mm .mm-close span { position: absolute; left: 14px; right: 14px; top: 50%; height: 2.5px; margin-top: -1.25px; border-radius: 3px; background: #fff; transition: transform .45s var(--mm-spring); }
.dgl-mm .mm-close span:nth-child(1) { transform: rotate(0deg) scaleX(0); }
.dgl-mm .mm-close span:nth-child(2) { transform: rotate(0deg) scaleX(0); }
.dgl-mm.open .mm-close span:nth-child(1) { transform: rotate(45deg) scaleX(1); transition-delay: .25s; }
.dgl-mm.open .mm-close span:nth-child(2) { transform: rotate(-45deg) scaleX(1); transition-delay: .32s; }
.dgl-mm .mm-close:active { transform: scale(.88) rotate(90deg); background: rgba(255, 255, 255, .22); }
.dgl-mm .mm-close:focus-visible, .dgl-mm a:focus-visible, .dgl-mm input:focus-visible, .dgl-mm .mm-go-btn:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }

/* ---- "where is my package?" ----------------------------------------------------------------------- */
.dgl-mm .mm-track {
  position: relative; padding: 16px 16px 14px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 18px 40px rgba(0, 8, 32, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.dgl-mm .mm-track label { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-bottom: 10px; }
.dgl-mm .mm-track-row { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 5px 5px 5px 14px; box-shadow: 0 8px 22px rgba(0, 8, 32, .25); transition: box-shadow .25s, transform .25s var(--mm-spring); }
.dgl-mm .mm-track-row:focus-within { box-shadow: 0 0 0 3px #ffd166, 0 8px 22px rgba(0, 8, 32, .25); transform: translateY(-1px); }
.dgl-mm .mm-track-row > i { color: #bf0a30; font-size: 1rem; flex-shrink: 0; }
.dgl-mm .mm-track-row input {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: #0f172a; font: 600 1rem 'Inter', system-ui, sans-serif; /* 16px: no zoom on iPhone */
}
.dgl-mm .mm-track-row input::placeholder { color: #8a97ab; font-weight: 500; }
.dgl-mm .mm-go-btn {
  width: 46px; height: 46px; border-radius: 13px; border: 0; cursor: pointer; flex-shrink: 0; color: #fff; font-size: 1rem;
  background: linear-gradient(135deg, #e11d48, #bf0a30); box-shadow: 0 6px 16px rgba(191, 10, 48, .45); transition: transform .2s var(--mm-spring), box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.dgl-mm .mm-go-btn:active { transform: scale(.88); box-shadow: 0 2px 8px rgba(191, 10, 48, .4); }
.dgl-mm .mm-track.dgl-shake .mm-track-row { animation: mmShake .45s ease; }
@keyframes mmShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
/* a tiny route: pickup, a rider dot travelling, delivered tick */
.dgl-mm .mm-route { position: relative; height: 18px; margin: 12px 4px 2px; }
.dgl-mm .mm-route::before { content: ""; position: absolute; left: 6px; right: 6px; top: 8px; border-top: 2px dashed rgba(255, 255, 255, .38); }
.dgl-mm .mm-route .a, .dgl-mm .mm-route .b { position: absolute; top: 3px; width: 12px; height: 12px; border-radius: 50%; }
.dgl-mm .mm-route .a { left: 0; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .2); }
.dgl-mm .mm-route .b { right: 0; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); display: grid; place-items: center; }
.dgl-mm .mm-route .b::after { content: ""; width: 4px; height: 7px; margin-top: -1px; border: solid #003b24; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); }
.dgl-mm .mm-route .rider { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #bf0a30; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(255, 91, 122, .6), 0 4px 10px rgba(0, 0, 0, .35); }
.dgl-mm.open .mm-route .rider { animation: mmRide 3.6s var(--mm-ease) 1s infinite; }
.dgl-mm.open .mm-route .b::after { animation: mmTick 3.6s ease 1s infinite; }
@keyframes mmRide { 0% { left: 0; box-shadow: 0 0 0 0 rgba(255, 91, 122, .6), 0 4px 10px rgba(0, 0, 0, .35); } 70%, 100% { left: calc(100% - 18px); box-shadow: 0 0 0 9px rgba(255, 91, 122, 0), 0 4px 10px rgba(0, 0, 0, .35); } 100% { opacity: 0; } 88% { opacity: 1; } }
@keyframes mmTick { 0%, 66% { transform: rotate(45deg) scale(0); } 76%, 94% { transform: rotate(45deg) scale(1); } 100% { transform: rotate(45deg) scale(0); } }

/* ---- the list ---------------------------------------------------------------------------------------- */
.dgl-mm .mm-list { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu.dgl-mm a.mm-row {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 7px 14px 7px 10px; border-radius: 18px; max-width: none; width: auto; text-align: left;
  color: #fff; font-size: 1rem; text-decoration: none; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-tap-highlight-color: transparent; transition: transform .22s var(--mm-spring), background .2s, border-color .2s;
}
.mobile-menu.dgl-mm a.mm-row:hover { background: rgba(255, 255, 255, .13); }
/* the page you are on: a brighter row with a coral edge */
.mobile-menu.dgl-mm a.mm-row[aria-current="page"] { background: rgba(255, 255, 255, .17); border-color: rgba(255, 255, 255, .42); box-shadow: inset 3px 0 0 #ff5b7a; }
.mobile-menu.dgl-mm a.mm-row:active { transform: scale(.965); background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .34); }
.dgl-mm .mm-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font-size: 1.05rem; color: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .3s var(--mm-spring); }
.mobile-menu.dgl-mm a.mm-row:active .mm-ico { transform: scale(1.12) rotate(-6deg); }
.dgl-mm .mm-ico.c1 { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.dgl-mm .mm-ico.c2 { background: linear-gradient(135deg, #fb7185, #bf0a30); }
.dgl-mm .mm-ico.c3 { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.dgl-mm .mm-ico.c4 { background: linear-gradient(135deg, #34d399, #059669); }
.dgl-mm .mm-ico.c5 { background: linear-gradient(135deg, #fbbf24, #d97706); }
.dgl-mm .mm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dgl-mm .mm-txt b { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.dgl-mm .mm-txt small { font-size: .76rem; color: rgba(255, 255, 255, .62); font-weight: 500; }
.dgl-mm .mm-go { font-size: .8rem; color: rgba(255, 255, 255, .5); transition: transform .25s var(--mm-spring), color .2s; }
.mobile-menu.dgl-mm a.mm-row:active .mm-go { transform: translateX(5px); color: #fff; }

/* ---- the two sign-up paths, at the bottom where the thumb rests ----------------------------------- */
.dgl-mm .mm-cta { display: grid; gap: 10px; margin-top: auto; padding-top: 4px; }
.mobile-menu.dgl-mm a.mm-card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px; border-radius: 20px; max-width: none; width: auto; text-align: left;
  text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .22s var(--mm-spring), box-shadow .25s;
}
.mobile-menu.dgl-mm a.mm-card:active { transform: scale(.96); }
.dgl-mm .mm-card > i:first-child { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.dgl-mm .mm-card span { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.dgl-mm .mm-card b { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.dgl-mm .mm-card small { font-size: .76rem; font-weight: 600; opacity: .8; }
.dgl-mm .mm-card > i:last-child { font-size: .95rem; transition: transform .25s var(--mm-spring); }
.mobile-menu.dgl-mm a.mm-card:active > i:last-child { transform: translateX(6px); }
.mobile-menu.dgl-mm a.mm-send { color: #fff; background: linear-gradient(135deg, #e11d48 0%, #bf0a30 55%, #8c0722 100%); box-shadow: 0 16px 34px rgba(191, 10, 48, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
.dgl-mm .mm-send > i:first-child { background: rgba(255, 255, 255, .2); }
.dgl-mm .mm-send::after { /* one gentle sheen that sweeps across now and then */
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent); animation: mmSheen 4.2s ease-in-out 1.6s infinite;
}
@keyframes mmSheen { 0% { left: -40%; } 38%, 100% { left: 140%; } }
.mobile-menu.dgl-mm a.mm-ride { color: #002868; background: #fff; box-shadow: 0 14px 30px rgba(0, 8, 32, .35); }
.dgl-mm .mm-ride > i:first-child { background: #eef3ff; color: #002868; }

.dgl-mm .mm-login { text-align: center; font-size: .86rem; color: rgba(255, 255, 255, .7); line-height: 2; }
.mobile-menu.dgl-mm .mm-login a { display: inline-block; width: auto; max-width: none; padding: 0 2px; margin: 0 2px; border-radius: 6px; color: #fff; font-size: .86rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .45); }
.mobile-menu.dgl-mm .mm-login a:active { background: rgba(255, 255, 255, .18); }
.dgl-mm .mm-login .dot { opacity: .5; margin: 0 4px; }
.dgl-mm .mm-foot { text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .42); padding-bottom: 2px; }

/* short phones (landscape or small screens): tighter spacing so more fits */
@media (max-height: 700px) {
  .dgl-mm .mm-sheet { gap: 10px; }
  .mobile-menu.dgl-mm a.mm-row { min-height: 54px; padding-top: 6px; padding-bottom: 6px; }
  .dgl-mm .mm-ico { width: 38px; height: 38px; font-size: .95rem; }
  .dgl-mm .mm-txt small { display: none; }
  .mobile-menu.dgl-mm a.mm-card { min-height: 64px; }
}

/* people who ask their phone for less motion: no bloom, no springs, no drifting glows - just a quick fade */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu.dgl-mm, .mobile-menu.dgl-mm.open { clip-path: none; opacity: 0; transition: opacity .2s linear, visibility 0s linear .2s; }
  .mobile-menu.dgl-mm.open { opacity: 1; transition: opacity .2s linear, visibility 0s; }
  .dgl-mm .mm-aurora i, .dgl-mm .mm-send::after, .dgl-mm.open .mm-route .rider, .dgl-mm.open .mm-route .b::after { animation: none; }
  .dgl-mm .mm-sheet > *:not(.mm-list), .dgl-mm .mm-list > *, .dgl-mm.open .mm-sheet > *:not(.mm-list), .dgl-mm.open .mm-list > * { opacity: 1; transform: none; animation: none; }
  .dgl-mm .mm-route .rider { left: calc(100% - 18px); }
  .dgl-mm .mm-route .b::after { transform: rotate(45deg) scale(1); }
  .dgl-mm .mm-close span:nth-child(1) { transform: rotate(45deg) scaleX(1); }
  .dgl-mm .mm-close span:nth-child(2) { transform: rotate(-45deg) scaleX(1); }
  .dgl-mm * { transition-duration: .01ms !important; }
}
