/* ============================================================
   GUARDIAN MESH — SHARED COMPONENTS
   UI patterns repeated across multiple pages.
   ============================================================ */

/* ── Identity Bar (top nav) ── */
.id-bar {
  position: sticky; top: 0; left: 0; right: 0; z-index: 100;
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1280px)/2));
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
[data-theme="dark"] .id-bar { background: rgba(26,26,26,0.95); }
.id-bar-logo { display: flex; align-items: center; text-decoration: none; }
.id-bar-logo-img { height: 24px; filter: var(--nav-logo-filter); }
.id-bar-right { display: flex; align-items: center; gap: 16px; }
.id-bar-divider { width: 1px; height: 18px; background: var(--border); }
.id-bar-login { font-size: 13px; font-weight: 700; color: var(--text-primary); text-decoration: none; }
.id-bar-login:hover { opacity: 0.7; }
.id-bar-cta {
  background: var(--btn-primary-bg); color: var(--btn-primary-color);
  padding: 8px 18px; border-radius: 7px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em; text-decoration: none; transition: opacity 0.15s;
}
.id-bar-cta:hover { opacity: var(--btn-primary-hover); color: var(--btn-primary-color); }

/* ── Site Nav / Breadcrumb ── */
.site-nav {
  height: 36px; min-height: 36px; background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; padding: 0 16px; flex-shrink: 0;
  font-size: 11px; color: var(--text-muted);
}
.site-nav img { height: 16px; width: auto; filter: var(--nav-logo-filter); }
.site-nav a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.site-nav a:hover { color: var(--text-primary); }
.site-nav .sep { color: var(--text-faint); font-size: 10px; user-select: none; }
.site-nav .current { color: var(--text-secondary); font-weight: 600; }

/* ── Theme Switcher ── */
.theme-switcher { position: relative; flex-shrink: 0; display: none; /* temporarily hidden — re-enable when dark mode is ready */ }
.theme-switcher-btn {
  width: 32px; height: 32px; border-radius: 8px; background: var(--bg-muted);
  border: 1px solid var(--border); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all 0.15s;
  flex-shrink: 0; padding: 0;
}
.theme-switcher-btn svg { width: 16px; height: 16px; color: var(--text-secondary); }
.theme-switcher-btn:hover { border-color: var(--text-primary); }
.theme-switcher-btn:hover svg { color: var(--text-primary); }
.theme-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px; min-width: 150px;
  box-shadow: 0 4px 16px var(--shadow); z-index: 999;
}
.theme-dropdown.open { display: block; }
.theme-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 12px; border: none; background: none; cursor: pointer;
  border-radius: 7px; font-size: 14px; color: var(--text-secondary);
  font-family: inherit; transition: all 0.1s;
}
.theme-option:hover { background: var(--bg-muted); color: var(--text-primary); }
.theme-option.active { color: var(--text-primary); font-weight: 500; }
.theme-option svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); }
.theme-option.active svg { color: var(--text-primary); }

/* ── Common Page Layout ── */
.page-content {
  flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: 40px 24px 60px;
}
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.page-header p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Section Title ── */
.section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 14px; display: block;
}

/* ── Buttons ── */
.btn-primary {
  background: var(--btn-primary-bg); color: var(--btn-primary-color);
  padding: 14px 28px; border-radius: 10px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em; text-decoration: none; transition: opacity 0.15s;
  display: inline-block; border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { opacity: var(--btn-primary-hover); }
.btn-ghost {
  color: var(--text-primary); font-size: 14px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { opacity: 0.6; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px max(48px, calc((100vw - 1280px)/2));
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; background: var(--bg-surface);
}
.footer-logo { height: 24px; filter: var(--nav-logo-filter); }
.footer-attr { font-size: 12px; color: var(--text-faint); }
.footer-right { font-size: 12px; color: var(--text-faint); }

/* ── Fade Up Animation ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.35s ease forwards; }

/* ── Responsive: Shared component mobile adjustments ── */
@media (max-width: 768px) {
  .id-bar { padding: 0 20px; }
  .id-bar-cta { padding: 8px 14px; font-size: 11px; }
  .id-bar-right { gap: 10px; }
  footer { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .id-bar { padding: 0 16px; }
  .id-bar-divider { display: none; }
  footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 375px) {
  .id-bar { padding: 0 12px; }
  footer { padding: 20px 16px; }
}
