/* ==========================================================================
   CityWorkshop — Swiggy-Latest Customer UI Refinement (CWS_V_5_Fixed_7.8)
   --------------------------------------------------------------------------
   Scoped ENTIRELY to `body.role-customer` — engineer/admin/partner/
   superadmin views are untouched by this file. This is NOT Swiggy's actual
   branding, logo, or copyrighted assets — it is CityWorkshop's own name,
   colors, and content, refined toward Swiggy's current (2026) UX patterns:
     - thumb-reachable bottom navigation bar (Swiggy replaced its old
       simple bottom bar with a richer, consolidated one; ours mirrors the
       *pattern* — Home / primary action / tracking / orders / profile —
       using CityWorkshop's own sections and icons, not Swiggy's)
     - smart pre-type search suggestions (Swiggy shows contextual prompts
       before the user types; ours shows real service names from this
       app's own catalog, wired to the existing search function)
     - softer, more minimal card elevation and tighter spacing rhythm,
       consistent with Swiggy's current less-heavy card style
   Loaded last, after premium-saas.css, so it wins the cascade for the
   customer role specifically without touching any other role's styling.
   ========================================================================== */

/* -------------------------------------------------------------------------
   Softer, more minimal card elevation + spacing rhythm (customer only)
   ------------------------------------------------------------------------- */
body.role-customer .card,
body.role-customer .customer-booking-card,
body.role-customer .customer-compact-card,
body.role-customer .customer-live-track-card,
body.role-customer .customer-ops-card,
body.role-customer .history-item,
body.role-customer .item,
body.role-customer .service-icon-card,
body.role-customer .swiggy-service-tile{
  box-shadow: 0 1px 2px rgba(30,20,10,.04), 0 6px 16px rgba(30,20,10,.05) !important;
  border-radius: 18px !important;
}
body.role-customer .customer-welcome-card.swiggy-hero-card{
  border-radius: 24px !important;
}
body.role-customer .customer-workspace{
  padding-bottom: 84px; /* room for the fixed bottom nav so content isn't hidden behind it */
}

/* -------------------------------------------------------------------------
   Smart search suggestion chips — shown before the customer types,
   populated from the real service catalog (see serviceSelectorGrid() /
   window.customerServiceSearch() in app.js)
   ------------------------------------------------------------------------- */
.customer-search-suggestions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.customer-suggestion-chip{
  appearance: none;
  border: 1px solid var(--cust-line, #eadfd4);
  background: #fff;
  color: var(--cust-text, #241c15);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.customer-suggestion-chip:hover{
  transform: translateY(-1px);
  border-color: var(--cust-brand, #fc8019);
  background: var(--cust-brand-soft, #fff1e4);
}
.customer-suggestion-chip:active{ transform: translateY(0); }

/* -------------------------------------------------------------------------
   Bottom navigation bar — customer role only, desktop hidden, mobile/
   tablet visible (matches Swiggy's thumb-reachable bottom-bar pattern)
   ------------------------------------------------------------------------- */
.customer-bottom-nav{
  display: none;
}
@media (max-width: 860px){
  body.role-customer{
    /* room at the bottom of the viewport so page content never sits under the fixed bar */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .customer-bottom-nav{
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    background: rgba(255,253,251,.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--cust-line, #eadfd4);
    box-shadow: 0 -8px 24px rgba(30,20,10,.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0));
  }
  .customer-bottom-nav button{
    appearance: none;
    border: 0;
    background: transparent;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 14px;
    cursor: pointer;
    color: var(--cust-muted, #766a5f);
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
  }
  .customer-bottom-nav button span{ font-size: 20px; line-height: 1; }
  .customer-bottom-nav button small{ font-size: 10.5px; font-weight: 700; letter-spacing: .01em; }
  .customer-bottom-nav button:active{ transform: scale(.94); }
  .customer-bottom-nav button:hover{
    color: var(--cust-brand, #fc8019);
    background: var(--cust-brand-soft, #fff1e4);
  }
}

html[data-mode="dark"] body.role-customer .customer-bottom-nav{
  background: rgba(17,17,19,.92);
  border-top-color: rgba(255,255,255,.08);
}
html[data-mode="dark"] body.role-customer .customer-suggestion-chip{
  background: #151517;
  border-color: rgba(255,255,255,.12);
  color: var(--pw-text-dark, #f4f4f5);
}

@media (prefers-reduced-motion: reduce){
  .customer-suggestion-chip,
  .customer-bottom-nav button{
    transition: none !important;
  }
}
