/* Signed-in surfaces on the static landing: the header account-chip dropdown
   (nav-session.js) and the home dashboard band (home-dashboard.js). Both are
   injected client-side only after a session is confirmed; logged-out pages
   never load or show any of this. Uses the landing :root tokens from styles.css. */

/* ===== Account chip dropdown (header) ===== */
.bbm-chip-wrap { position: relative; margin-left: auto; }
.bbm-chip-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px;
  background: #fff; border: 1px solid var(--border, #e8ddd3); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(26,20,15,.16); padding: 6px; z-index: 60;
  display: flex; flex-direction: column;
}
/* The [hidden] attribute's display:none is a low-specificity UA style that the
   display:flex above would override, leaving the menu permanently open. This
   restores hide-on-hidden with a higher-specificity selector. */
.bbm-chip-menu[hidden] { display: none; }
.bbm-chip-item {
  display: block; text-align: left; padding: 10px 12px; border-radius: 8px;
  font: inherit; font-weight: 700; font-size: 14px; color: var(--primary-dark, #3a3d2c);
  background: none; border: 0; cursor: pointer; text-decoration: none; width: 100%;
}
.bbm-chip-item:hover { background: var(--border-light, #f2ece5); }

/* ===== Home dashboard band (below the hero, signed-in only) ===== */
#bbm-dashboard:empty { display: none; }
#bbm-dashboard {
  max-width: 1100px; margin: 0 auto; padding: 8px 20px 24px;
  display: flex; flex-direction: column; gap: 40px;
}

.bbm-start-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--primary, #747B5C); color: #fff;
  border-radius: 22px; padding: 28px 32px; text-decoration: none;
}
.bbm-start-card h3 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.bbm-start-card p { margin: 0; font-size: 15px; opacity: .92; font-weight: 600; }
.bbm-start-cta {
  flex-shrink: 0; background: #fff; color: var(--primary-dark, #3a3d2c);
  border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 15px;
  white-space: nowrap;
}

.bbm-dash-section { display: flex; flex-direction: column; gap: 18px; }
.bbm-dash-h { margin: 0; font-size: 22px; font-weight: 900; color: var(--primary-dark, #3a3d2c); }
.bbm-tile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.bbm-tile {
  display: flex; flex-direction: column; text-decoration: none;
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid var(--border, #e8ddd3); transition: transform .15s ease, box-shadow .15s ease;
}
.bbm-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(26,20,15,.12); }
.bbm-tile-cover {
  aspect-ratio: 4 / 3; background: var(--border-light, #f2ece5);
  background-size: cover; background-position: center;
}
.bbm-tile-title {
  padding: 12px 14px 2px; font-weight: 800; font-size: 15px;
  color: var(--primary-dark, #3a3d2c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bbm-tile-meta { padding: 0 14px 14px; font-size: 13px; color: var(--text-secondary, #6b6257); font-weight: 600; }

@media (max-width: 640px) {
  .bbm-start-card { flex-direction: column; align-items: flex-start; padding: 22px; }
  .bbm-tile-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
