/* geeViz Agent — Shared base styles (navbar, footer, reset)
   Requires: theme.css loaded first.
   ================================================ */

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
/* Firefox */
* { scrollbar-width: auto; scrollbar-color: var(--border) transparent; }

a { color: var(--accent); }
h1{margin-bottom:0px;}
/* ── Site header / navbar ── */
.site-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.header-logo-link { display: flex; align-items: center; gap: 0.5rem; }
.site-header .logo { height: 32px; width: auto; }
/* Optional company / agency cobrand mark (BrandLogos.company). Sits
   to the left of the main tenant logo. Slightly taller than the main
   logo so an aspect-square mark (RCR leaf) and a wide lockup
   (USDA-FS) both read at navbar scale. */
.site-header .company-logo { height: 36px; }
.site-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.header-nav {
  display: flex;
  gap: 0.3rem;
  margin-left: 0.5rem;
}
.header-nav-link {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.header-nav-link:hover {
  color: var(--text);
  background: var(--hover-overlay);
}
.header-nav-link.active {
  color: var(--accent);
  background: var(--accent-dim-light);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-user {
  font-size: 0.68rem;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Site footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 0.5rem 1.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  flex-shrink: 0;
  height: var(--footer-h);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.site-footer .footer-right img { height: 14px; }
.site-footer .footer-middle{
  margin-left:auto;
}
/* ── Hamburger button (chat page injects via header_left block) ── */
.hamburger-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.hamburger-btn:hover { opacity: 1; }

/* ── Page container (default content wrapper) ── */
.page-container {
  /* max-width: 900px; */
  margin: 0 auto;
  padding: 1.5rem 1.2rem;
  height:calc(100vh - 5.5rem);
  overflow-y:auto;
}

/* ── Sign out button ── */
.sign-out-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.sign-out-btn:hover {
  color: var(--error);
  border-color: var(--error);
}

/* ── Theme toggle button ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Footer bar ── */
.footer-bar {
  text-align: center;
  padding: 0.15rem 0 0.5rem;
  font-size: 0.62rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.4rem;
}
.footer-links a:hover { color: var(--text); }
/* ── AI disclaimer (chat only, collapsible) ── */
.ai-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.2rem 1.2rem;
  line-height: 1.4;
  opacity: 0.6;
  max-width: 900px;
  margin: 0 auto;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ai-disclaimer:hover { opacity: 0.9; }
.ai-disclaimer-full { display: none; }
.ai-disclaimer.expanded .ai-disclaimer-short { display: none; }
.ai-disclaimer.expanded .ai-disclaimer-full { display: inline; }

.footer-sep { color: var(--divider); margin: 0 0.25rem; }
.footer-powered {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  color: var(--muted);
}
.footer-powered a {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.footer-powered a:hover { opacity: 0.8; }
.footer-icon {
  height: 1rem;
  width: 1rem;
  vertical-align: middle;
  margin-right:0.15rem;
}

/* ── Mobile: tablet ── */
@media (max-width: 768px) {
  .site-header {
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
  }
  .site-header .logo { height: 26px; }
  .site-header .company-logo { height: 30px; }
  .site-header h1 { font-size: 1rem; }
  .header-nav { gap: 0.15rem; margin-left: 0.3rem; }
  .header-nav-link { font-size: 0.65rem; padding: 0.2rem 0.4rem; }
  .header-right { gap: 0.3rem; }
  .header-user { font-size: 0.6rem; max-width: 120px; }
  .theme-toggle { width: 24px; height: 24px; font-size: 0.7rem; }
  .page-container { padding: 1rem 0.8rem; }
  .footer-bar { font-size: 0.55rem; padding: 0.1rem 0.5rem 0.4rem; }
  .footer-powered a code { display: none; }
  .footer-icon { height: 0.85rem; width: 0.85rem; }
}

/* ── Mobile: phone ── */
@media (max-width: 480px) {
  .site-header h1 { display: none; }
  .site-header .logo { height: 24px; }
  .site-header .company-logo { height: 28px; }
  .header-nav-link { font-size: 0.62rem; padding: 0.2rem 0.35rem; }
  .header-user { display: none; }
  .page-container { padding: 0.8rem 0.5rem; }
  .footer-bar { font-size: 0.48rem; padding: 0.1rem 0.4rem 0.3rem; }
  .footer-links a { margin: 0 0.2rem; }
  .footer-sep { margin: 0 0.1rem; }
  .footer-powered {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.1rem;
    font-size: 0.45rem;
  }
  .footer-powered a { font-size: 0.45rem; gap: 0.1rem; }
  .footer-icon { height: 0.75rem; width: 0.75rem; }
}
