/* css/00-bug-fixes.css — BUG FIXES + GLOBAL SHIMS
 * Loaded right after style.css, before all page-specific CSS.
 *
 * A3 — bottom nav now 6 columns (was 5)
 * A1/A2 — no CSS needed, fixed in JS
 * Plus small Android touch-target tweaks.
 */

/* A3 — 6-column bottom nav */
.bottom-nav-inner {
  grid-template-columns: repeat(6, 1fr) !important;
}
.bottom-nav .tab        { padding: 6px 4px !important; }
.bottom-nav .tab-icon   { width: 22px; height: 22px; }
.bottom-nav .tab-icon svg { width: 20px; height: 20px; }
.bottom-nav .tab-label  { font-size: 9.5px !important; letter-spacing: 0; }

/* Android: bigger tap targets in lists/grids without changing layout much */
@media (pointer: coarse) {
  .btn, .icon-btn { min-height: 44px; }
  .tab { min-height: 56px; }
}

/* Greeting card on dashboard (dark hero) */
.dash-greet {
  margin: 0 0 14px;
}
.dash-greet-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
}
.dash-greet-avatar {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, #10B981, #047857);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px rgba(16,185,129,0.35);
  flex: 0 0 auto;
}
.dash-greet-text { flex: 1; min-width: 0; }
.dash-greet-eyebrow { font-size: 11.5px; color: rgba(255,255,255,0.55); letter-spacing: 0.02em; font-weight: 600; }
.dash-greet-name { font-size: 17px; color: #fff; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.dash-greet-out {
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.72);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dash-greet-out:hover { background: rgba(239,68,68,0.18); color: #FCA5A5; }
.dash-greet-out svg { width: 18px; height: 18px; }

/* Body is dark when shell-host class is set */
body:has(.dash-root-host) .app-header { background: transparent; }


/* ─────────────────────────────────────────────────────────────
 * BUG-FIX BATCH 2 — calculator search icon size + safety nets
 * 1. SVG inside .kcal-search-wrap (or any inline-icon container)
 *    must be sized; previously cost-mode rendered a 600px-tall
 *    magnifying glass because SVG had no width/height.
 * 2. Generic safety: any direct-child SVG with no class still gets
 *    sized inside common row containers.
 * ───────────────────────────────────────────────────────────── */
.kcal-search-wrap > svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted, #6B7280);
  pointer-events: none;
}
.kcal-row-head > svg,
.kcal-row-del > svg,
.kcal-row-swap > svg,
.calc-add-btn > svg,
.calc-back-btn > svg {
  width: 16px; height: 16px; display: block;
}
.calc-back-btn > svg { width: 18px; height: 18px; }
.calc-tile2 > svg, .calc-tile-sm > svg {
  width: 18px; height: 18px;
}
.calc-tile2-iconwrap > svg, .calc-tile-sm-icon > svg {
  width: 20px; height: 20px;
}
.calc-tile2-chev > svg { width: 18px; height: 18px; opacity: 0.4; }

/* Print button injected into recipe editor sheet (BUG-D1) */
.red-print-row {
  margin: 14px 0;
  display: flex; gap: 8px;
}
.red-print-row .btn-print {
  flex: 1;
  min-height: 44px; padding: 0 14px;
  background: #fff; border: 1.5px solid var(--primary, #16A34A);
  border-radius: 12px;
  color: var(--primary-dark, #0F7A35);
  font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.red-print-row .btn-print:hover { background: var(--primary-soft, #DCFCE7); }
.red-print-row .btn-print-icon { font-size: 16px; }

/* User-name edit row in settings (BUG-D2) */
.set-user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border-soft, #EEF0EA);
  border-radius: 14px;
  margin-bottom: 12px;
}
.set-user-avatar {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #10B981, #047857);
  flex: 0 0 auto;
}
.set-user-avatar.is-min { background: linear-gradient(135deg, #F472B6, #BE185D); }
.set-user-body { flex: 1; min-width: 0; }
.set-user-eyebrow {
  font-size: 11px; color: var(--muted, #6B7280);
  font-weight: 600; letter-spacing: 0.04em;
}
.set-user-name-input {
  width: 100%;
  padding: 4px 0;
  border: 0; background: transparent;
  font-size: 17px; font-weight: 700;
  color: var(--text, #111827);
  outline: none;
  letter-spacing: -0.005em;
}
.set-user-name-input:focus {
  border-bottom: 2px solid var(--primary, #16A34A);
}
.set-user-meta { font-size: 11.5px; color: var(--faint, #9CA3AF); margin-top: 1px; }
.set-user-logout {
  height: 36px; padding: 0 14px;
  background: #FEE2E2; color: #B91C1C;
  border: 0; border-radius: 10px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}
