/*
 * Observatory redesign — header component styles (owned by the header view agent).
 *
 * Covers the home-page masthead (wordmark + tagline + the Azeret Mono right
 * rail), the header inbox pill + dropdown (inbox.templ), and the view toolbar
 * row. Loads after app.css, so equal-specificity rules here win; the "?"
 * shortcuts trigger needs the `.page__nav` prefix to out-specify its inline
 * <style> block. Tokens come from app.css :root; the muted ladder steps that
 * have no custom property (#6c7689 / #3c4250 / #2e3440) are written raw, as
 * in the mockup.
 */

/* ── Masthead ────────────────────────────────────────────────────────────── */

.page__header {
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 26px; /* the mockup's section rhythm */
}
.page__brand {
  display: flex;
  align-items: baseline;
  gap: 13px;
}
.page__title {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0;
}
.page__tagline {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* The right rail: everything reads in Azeret Mono 11px. */
.page__nav {
  font-family: var(--font-mono);
  font-size: 11px;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
}

/* Synced stamp: faint text led by a 6px teal dot. The dot is a ::before so
 * the element keeps the bare `>synced HH:MM:SS<` text the e2e suite reads. */
.page__synced {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-faint);
}
.page__synced::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: none;
}

.page__nav .page__nav-link {
  border-bottom: none;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
.page__nav .page__nav-link:hover { color: var(--color-text); }

/* The active "calendar" pill. */
.page__nav-pill {
  background: rgba(94, 230, 200, 0.1);
  color: var(--color-accent);
  border-radius: 999px;
  padding: 5px 13px;
  text-decoration: none;
}
.page__nav-pill:hover { background: rgba(94, 230, 200, 0.16); }

/* The "?" shortcuts trigger as a 22px circle (overrides its inline styles). */
.page__nav .shortcuts-trigger {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}
.page__nav .shortcuts-trigger:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* ── Header inbox (inbox.templ) ──────────────────────────────────────────── */

/* The slot (a <div>, so the panel may nest validly) is the dropdown's
 * positioning anchor: position:relative makes the absolute .inbox-panel
 * resolve its top/right against the pill, not against a transformed ancestor
 * (the fade-up keyframes leave `main` with a transform, which would otherwise
 * become the containing block and float the panel mid-page). */
#inbox-slot {
  position: relative;
  display: inline-flex;
  /* Lift the whole header subtree above later positioned siblings (.day-panel
   * etc., z-auto): without this the open panel paints beneath the day panel's
   * text even though .inbox-panel itself carries z-index: 60 — that z-index
   * can't escape a sibling-order paint without a raised context here.
   * 40 is above all page content but BELOW the full-screen overlays — the
   * shortcuts modal + toast region (z-index: 50) — so opening `?` correctly
   * dims the inbox pill instead of letting it poke through the backdrop. */
  z-index: 40;
}

.inbox {
  position: relative;
  display: inline-flex;
}

.inbox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  padding: 5px 12px;
  color: #b9c2d1;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 140ms ease;
}
.inbox-toggle:hover { border-color: rgba(255, 141, 126, 0.5); }

.inbox-count {
  background: var(--color-negative);
  color: #0b0d12;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

/* The dropdown: a near-opaque night panel of suggestion cards. */
.inbox-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 308px;
  background: #0d1018;
  border: 1px solid var(--color-border-strong);
  border-radius: 16px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  z-index: 60;
  cursor: default;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-sans);
}

.inbox-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inbox-item-label {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text);
}
.inbox-item-sub { color: var(--color-text-muted); }
.inbox-item-sub .mono { font-size: 11px; }

.inbox-item-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* Project-assign chips: dot + name, hover hints teal. */
.inbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
  padding: 4px 9px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 140ms ease;
}
.inbox-chip:hover { border-color: rgba(94, 230, 200, 0.6); }
.inbox-chip:disabled { opacity: 0.5; cursor: progress; }
/* The "split…" escape hatch reads quieter than the assign chips (mockup). */
.inbox-chip--split { color: var(--color-text-muted); }
/* The overlap "review" chip mirrors the mockup's teal-outlined review button. */
.inbox-chip--review { color: #5ee6c8; border-color: rgba(94, 230, 200, 0.35); }
.inbox-chip--review:hover { border-color: rgba(94, 230, 200, 0.6); }
.inbox-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

/* Empty-day quick stamps: mono rubber stamps, set down slightly crooked. */
.inbox-stamp {
  background: transparent;
  border-radius: 7px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.inbox-stamp:disabled { opacity: 0.5; cursor: progress; }
.inbox-stamp--semester {
  border: 1px solid rgba(232, 196, 107, 0.4);
  color: #e8c46b;
  transform: rotate(-1deg);
}
.inbox-stamp--sick {
  border: 1px solid rgba(255, 141, 126, 0.4);
  color: var(--color-negative);
  transform: rotate(1deg);
}

/* Date jump: a plain-text mono button that hints teal on hover. */
.inbox-jump {
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: inherit;
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}
.inbox-jump:hover { color: var(--color-accent); }

/* The clean-books motto: dropdown footer, and the whole body when empty. */
.inbox-empty {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-faint);
}

/* ── View toolbar (view · ALL ENTRIES + the Ctrl/Cmd+K button) ───────────── */

.page__toolbar {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page__toolbar-hint {
  font-size: 13px;
  color: #8b92a3;
}
.page__toolbar-active {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.page__toolbar .composer-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  padding: 8px 15px;
  color: #b9c2d1;
  font-family: var(--font-sans);
  font-size: 13px;
}
.page__toolbar .composer-trigger:hover {
  border-color: rgba(94, 230, 200, 0.5);
  color: var(--color-text);
}
.page__toolbar .composer-trigger-key {
  margin-left: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
}

/* ── Focus visibility for the new header controls ────────────────────────── */

.page__nav-pill:focus-visible,
.inbox-toggle:focus-visible,
.inbox-chip:focus-visible,
.inbox-stamp:focus-visible,
.inbox-jump:focus-visible {
  outline: 2px solid var(--color-accent-soft);
  outline-offset: 2px;
}
