/* minMAX Mobile Bottom Navigation — EasyOrders */
:root {
  --minmax-nav-blue: 0, 55, 255;
  --minmax-nav-blue-deep: 5, 30, 115;
  --minmax-nav-text: #ffffff;
  --minmax-nav-muted: rgba(255,255,255,.72);
  --minmax-nav-active: #ffffff;
  --minmax-nav-height: 74px;
}

/* Desktop/tablet: completely disabled */
#minmax-bottom-nav {
  display: none !important;
}

@media (max-width: 768px) {
  html {
    scroll-padding-bottom: calc(var(--minmax-nav-height) + 28px);
  }

  html.minmax-bottom-nav-ready body {
    /* Protect the last content/checkout area from being covered by the fixed bar. */
    padding-bottom: calc(var(--minmax-nav-height) + 22px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #minmax-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(9px + env(safe-area-inset-bottom, 0px));
    height: var(--minmax-nav-height);
    z-index: 2147483000;
    direction: rtl;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.30);
    background:
      linear-gradient(135deg,
        rgba(var(--minmax-nav-blue), .78) 0%,
        rgba(var(--minmax-nav-blue-deep), .72) 100%);
    box-shadow:
      0 14px 38px rgba(0, 35, 95, .30),
      inset 0 1px 0 rgba(255,255,255,.24);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
  }

  #minmax-bottom-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 48%);
  }

  .minmax-nav-item {
    position: relative;
    z-index: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--minmax-nav-muted);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 3px 6px;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .minmax-nav-item:active {
    transform: scale(.96);
  }

  .minmax-nav-icon {
    width: 23px;
    height: 23px;
    display: block;
    color: currentColor;
    transition: transform .18s ease, color .18s ease, filter .18s ease;
  }

  .minmax-nav-label {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .minmax-nav-item.is-active {
    color: var(--minmax-nav-active);
  }

  .minmax-nav-item.is-active .minmax-nav-icon {
    transform: translateY(-1px) scale(1.08);
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.14));
  }

  .minmax-nav-item.is-active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 0 10px rgba(255,255,255,.38);
  }

  /* Hide only the existing launcher, never its welcome-message wrapper. */
  html.minmax-bottom-nav-ready #minmax-whatsapp-btn {
    display: none !important;
  }
  html.minmax-bottom-nav-ready #minmax-whatsapp {
    bottom: calc(98px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 2147483001;
  }

}

@media (max-width: 370px) {
  .minmax-nav-label { font-size: 10px; }
  #minmax-bottom-nav { left: 7px; right: 7px; }
}

/* Shared defaults: the category panel must also stay hidden on desktop. */
#minmax-category-menu { display: none !important; }
#minmax-bottom-nav, #minmax-bottom-nav *, #minmax-category-menu,
#minmax-category-menu * { box-sizing: border-box; }
#minmax-bottom-nav .minmax-nav-icon svg {
  display: block; width: 100%; height: 100%; fill: none;
  stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
@media (max-width: 768px) {
  #minmax-bottom-nav .minmax-nav-item { color: rgba(255,255,255,.84); border-radius: 16px; }
  #minmax-bottom-nav .minmax-nav-item.is-active,
  #minmax-bottom-nav .minmax-nav-item.is-open { color: #fff; background: rgba(255,255,255,.12); }
  #minmax-bottom-nav .minmax-nav-item:focus-visible,
  #minmax-category-menu a:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
  #minmax-category-menu:not([hidden]) {
    display: block !important; position: fixed;
    right: 12px; left: 12px;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    z-index: 2147483002; direction: rtl;
    max-height: calc(100dvh - 124px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain;
    padding: 16px; border-radius: 22px;
    border: 1px solid rgba(255,255,255,.35);
    background: linear-gradient(135deg, rgba(0,55,255,.94), rgba(5,30,115,.97));
    box-shadow: 0 14px 38px rgba(0,35,95,.3);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    color: white; font-family: inherit;
  }
  #minmax-category-menu .minmax-category-title { font-weight: 700; margin-bottom: 10px; }
  #minmax-category-menu .minmax-category-grid { display: grid; gap: 5px; }
  #minmax-category-menu .minmax-category-link {
    display: block; padding: 12px; border-radius: 12px; color: white;
    background: rgba(255,255,255,.09); text-decoration: none;
    font-size: 14px; line-height: 1.5;
  }
}
