/*
 * HamCation Shell CSS
 * Header bar + app-switcher popup styles.
 * All classes prefixed hc-shell-* to avoid collisions.
 *
 * Canonical source: _shared/shell/hamcation-shell.css
 * Copy to: <project>/pages/assets/hamcation-shell.css
 */

/* --- Shell Header --- */
.hc-shell-header {
  background: var(--hc-card, #ffffff);
  border-bottom: 1px solid var(--hc-border, #e2e8f0);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hc-shell-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Accent bar under header — set --hc-app-accent per app */
.hc-shell-accent {
  height: 3px;
  background: var(--hc-app-accent, var(--hc-border, #e2e8f0));
}

/* --- Breadcrumb --- */
.hc-shell-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--hc-muted, #64748b);
}

.hc-shell-breadcrumb-org {
  color: var(--hc-text, #1e293b);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hc-shell-breadcrumb-sep {
  color: var(--hc-border, #e2e8f0);
}

.hc-shell-breadcrumb-app {
  color: var(--hc-text, #1e293b);
  font-weight: 600;
  text-decoration: none;
}

.hc-shell-breadcrumb-app:hover {
  text-decoration: underline;
}

.hc-shell-breadcrumb-page {
  color: var(--hc-muted, #64748b);
  font-weight: 400;
}

/* --- Year badge (admin-only) --- */
.hc-shell-year-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 8px;
  background: var(--hc-bg, #f8fafc);
  border: 1px solid var(--hc-border, #e2e8f0);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hc-muted, #64748b);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background-color 100ms ease, color 100ms ease;
}

.hc-shell-year-badge:hover {
  background: var(--hc-border, #e2e8f0);
  color: var(--hc-text, #1e293b);
}

/* --- Right side (email + grid icon) --- */
.hc-shell-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.hc-shell-email {
  font-size: 0.8rem;
  color: var(--hc-muted, #64748b);
}

/* --- Grid (app-switcher) button --- */
.hc-shell-grid-btn {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hc-muted, #64748b);
  transition: background-color 100ms ease;
}

.hc-shell-grid-btn:hover {
  background: var(--hc-bg, #f8fafc);
  border-color: var(--hc-border, #e2e8f0);
}

.hc-shell-grid-btn svg {
  width: 20px;
  height: 20px;
}

/* --- App-switcher popup --- */
.hc-shell-popup {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--hc-card, #ffffff);
  border: 1px solid var(--hc-border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  z-index: 200;
  padding: 4px 0;
}

.hc-shell-popup.open {
  display: block;
}

.hc-shell-popup-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--hc-text, #1e293b);
  text-decoration: none;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.hc-shell-popup-item:hover {
  background: var(--hc-bg, #f8fafc);
}

.hc-shell-popup-item-current {
  font-weight: 600;
}

.hc-shell-popup-item-current::before {
  content: "\2022\00a0";
}

.hc-shell-popup-divider {
  height: 1px;
  background: var(--hc-border, #e2e8f0);
  margin: 4px 0;
}

.hc-shell-popup-item-logout {
  color: var(--hc-muted, #64748b);
}

/* --- App Navigation Bar --- */
.hc-shell-appnav {
  display: flex;
  gap: 4px;
  padding: 6px 16px 8px;
  max-width: 1400px;
  margin: 0 auto;
}

.hc-shell-appnav-item {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--hc-muted, #64748b);
  text-decoration: none;
  transition: background-color 100ms ease, color 100ms ease;
}

.hc-shell-appnav-item:hover {
  background: var(--hc-bg, #f8fafc);
  color: var(--hc-text, #1e293b);
}

.hc-shell-appnav-active {
  background: var(--hc-bg, #f8fafc);
  color: var(--hc-text, #1e293b);
  font-weight: 600;
}

.hc-shell-appnav-beta {
  display: inline-block;
  margin-left: 3px;
  font-size: 9px;
  font-weight: 700;
  color: #7c3aed;
  vertical-align: super;
  line-height: 1;
  letter-spacing: 0;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .hc-shell-email {
    display: none;
  }
}
