/* ============================================================
   CLICKFOOD: shared layout for the newer screens (sign-in choice,
   welcome, Apple button, etc). Same file in the customer, staff and
   developer apps. Colours come from base.css + theme.css (cream,
   orange-red #E04A1F, brown text); this file adds no colours of its
   own. The --cf-* names below just point at those theme colours.
   ============================================================ */

:root {
  --cf-red: var(--color-primary);
  --cf-red-dark: var(--color-primary-dark);
  --cf-red-rgb: var(--color-primary-rgb);
  --cf-gradient: var(--color-primary);
  --cf-glow: 0 6px 16px rgba(var(--color-primary-rgb), 0.22);
  --cf-gloss: var(--color-primary);
  --cf-gloss-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.22);
}

body { background: var(--bg-body); color: var(--text-primary); }
::selection { background: rgba(var(--cf-red-rgb), 0.28); }

/* ---------- Logo ---------- */
.brand-icon, .cf-logo-badge { background: transparent !important; border-radius: 0 !important; overflow: visible !important; }
img[src*="clickfood-mark"] { border-radius: 0 !important; object-fit: contain; }
.cf-wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--text-primary); white-space: nowrap; }
.cf-wordmark span { color: var(--cf-red); }
.cf-lockup { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.btn { transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), filter var(--transition-fast), opacity var(--transition-fast); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg-body), 0 0 0 5px rgba(var(--cf-red-rgb), 0.55); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; filter: grayscale(0.2); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: rgba(var(--cf-red-rgb), 0.55); background: var(--bg-surface-2); }
.btn-secondary:active:not(:disabled) { transform: scale(0.985); }
.btn-outline, .btn.btn-outline { background: transparent; color: var(--cf-red); border: 1.5px solid var(--cf-red); }
.btn-outline:hover:not(:disabled) { background: rgba(var(--cf-red-rgb), 0.08); }
.btn-icon:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--cf-red-rgb), 0.6); }

/* ---------- Badges and links ---------- */
a.link, .link { color: var(--cf-red); }

/* ---------- Bars ---------- */
.app-nav { background: color-mix(in srgb, var(--bg-body) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border-color); }
.bottom-nav:not(.bottom-nav-guest) { background: color-mix(in srgb, var(--bg-surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border-color); }
.bottom-nav-item.active, .bottom-nav .active { color: var(--cf-red); }

/* Respect people who turn motion off. */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn-primary:hover:not(:disabled), .btn-primary:active:not(:disabled) { transition: none; transform: none; }
}

/* ---------- Sign in and sign up ---------- */
.auth-head { text-align: center; margin: 4px 0 22px; }
.auth-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.auth-subtitle { margin: 6px 0 0; color: var(--text-secondary); font-size: 15px; }
.auth-switch { text-align: center; margin: 18px 0 0; color: var(--text-secondary); font-size: 14.5px; }
.auth-switch-link { background: none; border: none; padding: 4px 2px; font: inherit; font-weight: 700; color: var(--cf-red); cursor: pointer; }
.auth-switch-link:hover { text-decoration: underline; }
.auth-business {
  display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px;
  border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-surface-2);
  color: var(--text-primary); text-decoration: none; transition: border-color var(--transition-fast);
}
.auth-business:hover { border-color: rgba(var(--cf-red-rgb), 0.5); }
.auth-business-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--cf-gradient); color: #fff; }
.auth-business-icon svg { width: 20px; height: 20px; }
.auth-business-text { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--text-secondary); }
.auth-business-text strong { color: var(--text-primary); font-size: 14.5px; }
/* Google's own dark button style (google.com brand guidelines) */
:root[data-theme="dark"] .btn-google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
:root[data-theme="dark"] .btn-google:hover { background: #1F1F21; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
  :root:not([data-theme="light"]) .btn-google:hover { background: #1F1F21; }
}

/* Missing photo: a small faded logo on the placeholder colour, never a giant crop. */
img.img-fallback, .media > img.img-fallback {
  object-fit: contain !important; padding: 22% !important; box-sizing: border-box;
  width: 100% !important; height: 100% !important; background: var(--media-bg) !important;
  opacity: 0.38 !important; filter: grayscale(0.35);
}

/* ---------- Sign in / sign up: Customer or Manager choice ---------- */
.auth-roles { display: grid; gap: 10px; margin-bottom: 4px; }
.auth-role {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; text-align: left;
  border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-surface-2);
  color: var(--text-primary); text-decoration: none; cursor: pointer; font: inherit;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.auth-role:hover { border-color: rgba(var(--cf-red-rgb), 0.55); }
.auth-role:active { transform: scale(0.99); }
.auth-role:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--cf-red-rgb), 0.35); }
.auth-role-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--cf-gloss); box-shadow: var(--cf-gloss-shadow); color: #fff; }
.auth-role-icon svg { width: 22px; height: 22px; }
.auth-role-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-secondary); }
.auth-role-text strong { font-size: 16px; color: var(--text-primary); }
.auth-role > svg:last-child { width: 18px; height: 18px; color: var(--text-secondary); flex-shrink: 0; }

/* Apple's own button style: black on light pages, white on dark pages */
.btn-apple { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 14px; background: #000; color: #fff; border: 1px solid #000; }
.btn-apple:hover:not(:disabled) { background: #1a1a1a; }
:root[data-theme="dark"] .btn-apple { background: #fff; color: #000; border-color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-apple { background: #fff; color: #000; border-color: #fff; } }
.auth-business-line { text-align: center; margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }

/* ---------- UI UX Pro Max audit fixes (2026-10-24) ----------
   Contrast 4.5:1 for normal text, tap targets about 44 px, no text under 12 px.
   Same colours, a deeper shade only where white text sits on orange or
   orange text sits on cream. */
:root { --fill-strong: #C23D16; --text-link: #B8390F; }
:root[data-theme="dark"] { --text-link: var(--color-primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --text-link: var(--color-primary); } }

/* orange text */
.view-all-link, .link-btn, .shop-where-km, a.link, .link, .auth-switch-link,
.bottom-nav-item.active, .bottom-nav .active, .profile-address-change { color: var(--text-link) !important; }

/* small white-on-orange labels and selected chips */
.storefront-topbar-pickup, .storefront-topbar-eta,
.chip.active, .shop-cat-chip.active, .seg-choice-opt.active, .seg-mini button.active,
.step.active .circle, .badge-primary { background: var(--fill-strong) !important; border-color: var(--fill-strong) !important; color: #fff !important; }
.storefront-topbar-pickup, .storefront-topbar-eta { font-size: 12px; padding: 6px 11px; min-height: 30px; }

/* tap targets */
.app-nav .btn-icon, .app-nav .bell-btn, .app-nav .nav-menu-btn { min-width: 42px !important; min-height: 42px !important; width: 42px; height: 42px; }
.shop-hero-icon-btn { width: 42px !important; height: 42px !important; }
.shop-prod-add { width: 36px !important; height: 36px !important; position: relative; }
.shop-prod-add::after { content: ''; position: absolute; inset: -5px; }
.qty-btn { width: 36px !important; height: 36px !important; }
.cart-item .btn-icon { width: 36px !important; height: 36px !important; min-width: 36px !important; min-height: 36px !important; }
.input-group-btn { min-width: 44px; min-height: 40px; }
.modal-close { width: 40px !important; height: 40px !important; }
.view-all-link { min-height: 36px; padding: 8px 4px; }
.link-btn { padding: 8px 2px; }
.seg-mini button { min-height: 36px; }

/* text size */
.bottom-nav-item, .bottom-nav-item span { font-size: 12px !important; }
.store-mini-meta { font-size: 12px !important; height: auto !important; }
.order-loc .text-xs { font-size: 12px; }
/* banner and small orange labels */
.hero-banner-static p, .hero-banner-static .hero-sub, .hero-banner-info p { font-weight: 700; }
.hero-cta-light { color: var(--fill-strong) !important; font-size: 14px; }
.payfast-name, .btn-outline, .btn.btn-outline { color: var(--text-link) !important; }
.btn-outline, .btn.btn-outline { border-color: var(--text-link) !important; }
/* last audit items: small orange buttons, banner subtitle, small labels */
.btn-primary.btn-sm, .btn.btn-primary.btn-sm { background: var(--fill-strong) !important; }
.hero-sub { font-weight: 700 !important; font-size: 14px !important; }
.text-xs { font-size: 12px; }
