/* ============ NEW BOOKING ALERTS ============
   Toast for a booking made while the app is open, and the unseen-bookings badge on
   the Dashboard nav item. See booking-alerts.js. */
.ba-stack {
  position: fixed; z-index: 60; left: 0; right: 0; top: calc(env(safe-area-inset-top) + var(--brand-strip-h, 0px) + 12px);
  display: grid; justify-items: center; gap: 8px; padding: 0 12px; pointer-events: none;
}
.ba-toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px; width: 100%; max-width: 420px;
  padding: 14px 12px 14px 14px; border-radius: var(--radius-sm);
  background: var(--card-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow-float-modal);
  animation: ba-in 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
/* Thin green accent along the left edge */
.ba-toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); }
.ba-toast.leaving { animation: ba-out 0.25s ease-in forwards; }
.ba-icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(var(--green-rgb), 0.12); color: var(--green);
  animation: ba-ring 0.9s ease-in-out 0.2s;
}
.ba-icon svg { width: 20px; height: 20px; }
.ba-body {
  flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left;
  margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  color: var(--text); font: inherit; cursor: pointer;
}
.ba-body:hover { filter: none; }
.ba-title { font-size: 0.72em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.ba-prop { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-meta { font-size: 0.85em; color: var(--muted); }
.ba-money { margin-top: 2px; font-size: 1.15em; font-weight: 800; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.ba-money small { margin-left: 6px; font-size: 0.62em; font-weight: 600; color: var(--muted); }
.ba-money.private { filter: blur(7px); user-select: none; -webkit-user-select: none; }
.ba-close {
  flex: none; width: 28px; height: 28px; margin: -4px 0 0; padding: 0; border-radius: 50%;
  background: none; border: 0; box-shadow: none; color: var(--muted); font-size: 1.3em; line-height: 1; cursor: pointer;
}
.ba-close:hover { filter: none; background: var(--chip-bg); color: var(--text); }

@keyframes ba-in { from { opacity: 0; transform: translateY(-18px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ba-out { to { opacity: 0; transform: translateY(-12px) scale(0.97); } }
@keyframes ba-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); }
}

/* ---------- unseen-bookings badge on the nav item ---------- */
.ba-badge {
  position: absolute; top: 8px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
  display: grid; place-items: center;
  background: var(--red); color: var(--on-accent); font-size: 11px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 2px rgb(var(--surface-rgb));
  animation: ba-pop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.ba-badge[hidden] { display: none; }
@keyframes ba-pop { from { transform: scale(0); } to { transform: scale(1); } }
/* Landscape phones: the nav icon sits beside its label */
@media (orientation: landscape) and (max-height: 540px) {
  .ba-badge { top: 4px; left: calc(50% - 38px); }
}

@media (prefers-reduced-motion: reduce) {
  .ba-toast, .ba-toast.leaving, .ba-icon, .ba-badge { animation: none; }
}
