/* Great Trips — barbershop-world calendar. Builds on the Great Apps framework
   tokens (framework.css): --bg, --bg-surface, --text, --text-muted, --border,
   --radius, --accent. App-specific accents defined here. */

:root {
  --trip-accent: #f2894e;         /* warm travel orange — UI highlights, "today", stars */
  --trip-accent-dim: #b8613210;
  --org-bhs: #5aa9e6;             /* Barbershop Harmony Society */
  --org-sai: #e86aa6;             /* Sweet Adelines International */
  --tba: #8f8fb0;
  --card-radius: 12px;
}

.header-accent { color: var(--trip-accent); font-weight: 700; }

/* ── Header ─────────────────────────────── */
.header-actions { display: flex; gap: 8px; }

.search-wrap { margin-top: 10px; }
.search-bar {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ── Filter chips ───────────────────────── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.filter-row::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip-mine[aria-pressed="true"] {
  background: var(--trip-accent);
  border-color: var(--trip-accent);
  color: #1a1206;
}
.chip-mine svg { opacity: 0.9; }
.chip-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 2px;
}

.progress-row { margin-top: 11px; }
.trips-summary { font-size: 0.86rem; color: var(--text-muted); }
.trips-summary b { color: var(--text); font-weight: 700; }
.trip-star { color: var(--trip-accent); margin-right: 2px; }

/* ── Agenda ─────────────────────────────── */
.agenda {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 14px 28px;
}
.month-group-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 14px 2px 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.month-group-head.tba { color: var(--tba); }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.empty-state .big { font-size: 2rem; display: block; margin-bottom: 10px; opacity: 0.6; }

.jump-past {
  display: block;
  width: 100%;
  margin: 4px 0 6px;
  padding: 9px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
}
.jump-past:hover { color: var(--text); border-color: var(--accent); }

/* ── Event card ─────────────────────────── */
.card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--org-color, var(--accent));
  border-radius: var(--card-radius);
  padding: 12px 13px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.card:hover { background: var(--bg-hover); }
.card:active { transform: scale(0.995); }
.card.going { box-shadow: inset 0 0 0 1px var(--trip-accent); }

.card-date {
  flex: 0 0 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
}
.card-date .mon {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--org-color, var(--text-muted));
  font-weight: 700;
}
.card-date .day { font-size: 1.45rem; font-weight: 700; line-height: 1.05; }
.card-date .yr { font-size: 0.62rem; color: var(--text-muted); }
.card-date.tba .day { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.03em; }

.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-tags { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

.badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.org { color: #08121c; background: var(--org-color, var(--accent)); }
.badge.kind {
  color: var(--org-color, var(--accent));
  background: color-mix(in srgb, var(--org-color, var(--accent)) 16%, transparent);
}
.badge.dur { color: var(--text-muted); background: var(--bg); }

.card-star {
  flex: 0 0 auto;
  align-self: center;
  font-size: 1.1rem;
  color: var(--border);
  transition: color 0.15s, transform 0.1s;
}
.card.going .card-star { color: var(--trip-accent); }

/* ── Month view ─────────────────────────── */
.month { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 6px 8px 10px; }
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 10px;
}
.nav-btn {
  width: 40px; height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.35rem; line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn:hover { border-color: var(--accent); }
.month-label {
  background: none; border: none;
  color: var(--text);
  font-size: 1.05rem; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: var(--radius);
}
.month-label:hover { background: var(--bg-hover); }

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-bottom: 4px;
}
.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 3px;
  min-height: 0;
}
.day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px 3px;
  background: var(--bg-surface);
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  font-family: inherit;
  cursor: default;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.day.other { background: transparent; color: var(--text-muted); opacity: 0.45; }
.day.has-events { cursor: pointer; }
.day.has-events:hover { border-color: var(--accent); }
.day-num {
  font-size: 0.8rem;
  font-weight: 600;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.day.today .day-num { background: var(--trip-accent); color: #1a1206; font-weight: 700; }
.day.going-day .day-num { box-shadow: 0 0 0 1.5px var(--trip-accent); }
.dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; align-content: flex-start; max-height: 22px; overflow: hidden; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dot.bhs { background: var(--org-bhs); }
.dot.sai { background: var(--org-sai); }
.dot.more { width: auto; height: auto; font-size: 0.6rem; color: var(--text-muted); line-height: 1; }

/* ── Footer ─────────────────────────────── */
/* Layout — a centered hint line above a centered copyright line, with the
   version label pinned absolute-right — comes from the shared framework.css
   `.list-footer` rules. Overriding it to flex/space-between makes the injected
   `.copyright` collide with the absolute `.version-label`, so only tint the
   hint here and let the framework own the layout. */
.foot-hint { color: var(--text-muted); }

/* ── Bottom sheet ───────────────────────── */
.scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0; transition: opacity 0.2s;
}
.scrim.show { opacity: 1; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 82vh;
  overflow-y: auto;
  max-width: 620px;
  margin: 0 auto;
}
.sheet.open { transform: translateY(0); }
.overlay { display: contents; }

.sheet-grip {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 2px auto 14px;
}
.sheet-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 30px; height: 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 1;
}
.sheet-close:hover { color: var(--text); border-color: var(--accent); }

.sheet-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.sheet-title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; margin-bottom: 8px; padding-right: 30px; }
.sheet-dates {
  font-size: 1rem;
  color: var(--trip-accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.sheet-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.meta-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text); }
.meta-row .mi { flex: 0 0 18px; color: var(--text-muted); margin-top: 1px; }
.meta-row .mv { flex: 1; }
.meta-row .mv small { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 1px; }

.sheet-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.45;
}
.sheet-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
}
.sheet-link:hover { text-decoration: underline; }

.going-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--bg);
  border: 1.5px solid var(--trip-accent);
  border-radius: var(--radius);
  color: var(--trip-accent);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.going-btn:hover { background: var(--trip-accent-dim); }
.going-btn.on { background: var(--trip-accent); color: #1a1206; }

/* ── Day list overlay ───────────────────── */
.day-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

@media (min-width: 640px) {
  .agenda { padding-left: 22px; padding-right: 22px; }
}
