/* Nolan Painting — Shared Design Tokens
   Standard mobile breakpoint: 768px (all Nolan apps) */

/* Safe area — prevents content from overlapping phone status bar / notch */
body {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

/* ── App header — sticky, safe-area aware, compact on mobile ── */
.nolan-app-header {
  background: #fff;
  border-bottom: 1px solid var(--nolan-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
/* Dark strip behind the phone status bar — blends with Capacitor-configured bar.
   This works because .nolan-app-header is block-level, so ::before spans full width.
   WARNING: If you put this pattern on a display: flex element, the ::before becomes
   a zero-width flex item beside the content. Fix: add flex-direction: column. */
.nolan-app-header::before {
  content: '';
  display: block;
  height: env(safe-area-inset-top);
  background: var(--nolan-primary-dark, #003529);
}
body:has(.nolan-app-header) { padding-top: 0; }

.nolan-app-header > div {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .nolan-app-header > div { padding: 0.5rem 0.75rem; }
  .nolan-app-header h1 { font-size: 1rem; }
}

/* ── App nav — scrollable tabs, hidden scrollbar, compact on mobile ── */
.nolan-app-nav {
  background: #fff;
  border-bottom: 1px solid var(--nolan-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nolan-app-nav::-webkit-scrollbar { display: none; }
.nolan-app-nav > div {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  gap: 0.25rem;
}
.nolan-app-nav a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--nolan-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nolan-app-nav a:hover {
  color: var(--nolan-ink);
  border-bottom-color: rgba(0, 75, 56, 0.3);
}
.nolan-app-nav a.router-link-active,
.nolan-app-nav a[aria-current="page"] {
  color: var(--nolan-primary);
  border-bottom-color: var(--nolan-primary);
}
@media (max-width: 768px) {
  .nolan-app-nav > div { padding: 0 0.5rem; }
  .nolan-app-nav a { padding: 0.5rem 0.5rem; font-size: 0.8125rem; }
}

/* ── App drawer — slide-in panel for mobile navigation ── */
.nolan-app-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
}

.nolan-app-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nolan-app-drawer-close {
  align-self: flex-end;
  border: none;
  background: none;
  font-size: 1.6rem;
  color: var(--nolan-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.nolan-app-drawer-section {
  padding: 8px 0;
}

.nolan-app-drawer-section + .nolan-app-drawer-section {
  border-top: 1px solid var(--nolan-border);
}

.nolan-app-drawer-section-title {
  font-family: var(--nolan-font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nolan-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  padding: 0 8px;
}

.nolan-app-drawer-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--nolan-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.nolan-app-drawer-link:hover,
.nolan-app-drawer-link.active {
  background: var(--nolan-sage);
  color: var(--nolan-primary);
}

.nolan-app-drawer-footer {
  margin-top: auto;
}

/* ── Safe-area bar — dark strip behind phone status bar ──
   Use on any element that sits at the top of the viewport.
   Works on block-level elements by default.
   WARNING: If the parent is display: flex, you MUST add flex-direction: column
   so this ::before stacks above content instead of beside it. */
.nolan-safe-area-bar::before {
  content: '';
  display: block;
  height: env(safe-area-inset-top, 0px);
  background: var(--nolan-primary-dark, #003529);
}
body:has(.nolan-safe-area-bar) { padding-top: 0; }

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Brand colors */
  --nolan-primary: #004B38;
  --nolan-primary-dark: #003529;
  --nolan-primary-light: #006B50;

  /* Warm neutrals */
  --nolan-cream: #F9F8F1;
  --nolan-sage: #EBF4EE;
  --nolan-border: #e5e1d8;
  --nolan-bg: #f7f5f0;

  /* Accents */
  --nolan-terracotta: #D1623A;
  --nolan-golden: #F2B824;

  /* Text */
  --nolan-ink: #1a1a1a;
  --nolan-muted: #5c544c;
  --nolan-subtle: #6b6b6b;

  /* Typography */
  --nolan-font-display: 'Fraunces', Georgia, serif;
  --nolan-font-body: 'Inter', -apple-system, system-ui, sans-serif;

  /* Shadows */
  --nolan-shadow: 0 18px 40px rgba(0, 75, 56, 0.14);
  --nolan-shadow-soft: 0 12px 24px rgba(0, 75, 56, 0.08);
  --nolan-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);

  /* Radii */
  --nolan-radius-sm: 6px;
  --nolan-radius: 8px;
  --nolan-radius-lg: 12px;
}
