/* Bottom nav + theme — add to your app or link as /css/shell.css */
 
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bn-item .bn-icon { font-size: 1.15rem; line-height: 1; }
.bn-item.active { color: var(--primary-text); }
body.has-bottom-nav { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
 
.theme-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
 
/* Theme tokens live only in app.css */
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .topbar,
[data-theme="dark"] .card,
[data-theme="dark"] .bottom-nav { background: var(--surface); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .muted { color: var(--muted); }
[data-theme="dark"] input, [data-theme="dark"] textarea {
  background: var(--bg); color: var(--text); border-color: var(--border);
}
 
/* Prevent iOS zoom on focus (needs >= 16px) */
input, textarea, select {
  font-size: 16px !important;
  max-width: 100%;
}
 
 
/* Tag editor (Manage → Edit item) */
.tag-editor { margin-top: 0.25rem; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; min-height: 0.25rem; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--primary-text);
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  border-radius: 999px; padding: 0.2rem 0.45rem 0.2rem 0.55rem;
}
.tag-chip-x {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.15rem;
}
.tag-chip-x:hover { color: var(--danger); }
.tag-input-row { display: flex; gap: 0.4rem; align-items: center; }
.tag-input-row .tag-input {
  flex: 1; padding: 0.5rem 0.65rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 16px; min-width: 0;
}
 
/* Visiting hours editor — stack options, no horizontal blowout */
.hours-editor {
  max-width: 100%;
  overflow-x: hidden;
}
.hours-type-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.5rem 0 0.75rem;
  max-width: 100%;
}
.hours-type-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-weight: 400;
  cursor: pointer;
  border-radius: 8px;
  max-width: 100%;
  box-sizing: border-box;
}
.hours-type-option:has(input:checked) {
  background: var(--chip-bg);
}
.hours-type-option input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.hours-type-option span {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}
.hours-days-panel {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  max-width: 100%;
}
.hours-day-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.55rem 0;
  max-width: 100%;
}
.hours-day-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.hours-day-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}
.hours-select {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}
.hours-to {
  flex: 0 0 auto;
}
@media (min-width: 480px) {
  .hours-day-row {
    flex-direction: row;
    align-items: center;
  }
  .hours-day-label {
    width: 5.5rem;
    flex-shrink: 0;
  }
  .hours-day-controls {
    flex: 1;
  }
  .hours-select {
    flex: 0 1 auto;
  }
}
 
 
/* Form controls follow tokens in both themes */
select {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.hours-type-option, .pay-option, label.hours-type-option {
  color: var(--text);
}
table { color: var(--text); }
h1, h2, h3 { color: var(--text); }
 
.mq-update-banner {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--info-bg); color: var(--info-text);
  border-bottom: 1px solid var(--info-border);
  font-size: 0.9rem;
}
.mq-update-banner.hidden { display: none !important; }
 
.bn-item { position: relative; }
.bn-badge {
  position: absolute;
  top: 0.15rem;
  right: 50%;
  margin-right: -1.6rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  pointer-events: none;
}
.bn-badge.hidden { display: none !important; }
 

/* User-action busy feedback (not used for silent polls) */
@keyframes jekkascan-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
body.jekkascan-busy .logo-img {
  animation: jekkascan-pulse 1.6s ease-in-out infinite;
}
/* Guest menu / any page without logo: slim top bar */
body.jekkascan-busy::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9999;
  background: var(--primary);
  opacity: 0.85;
  pointer-events: none;
  animation: jekkascan-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  body.jekkascan-busy .logo-img {
    animation: none;
    opacity: 0.55;
  }
  body.jekkascan-busy::before {
    animation: none;
    opacity: 0.5;
  }
}