/*
 * BehaviorPro Labs — Header & Footer Layout
 *
 * Provides the shared Labs header and footer styling.
 * Works with plain HTML — no framework needed.
 *
 * HTML structure expected:
 *   <header class="labs-header"> ... </header>
 *   <main> ... your tool content ... </main>
 *   <footer class="labs-footer"> ... </footer>
 */

/* ============================================
   Header
   ============================================ */
.labs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--labs-bg-primary);
  border-bottom: 1px solid var(--labs-border);
  font-family: var(--labs-font);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.labs-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo + "Labs" badge as combined brand link */
.labs-header-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity var(--labs-transition);
}

.labs-header-brand-link:hover {
  opacity: 0.85;
}

.labs-header-logo {
  height: 26px;
  width: auto;
}

/* "Labs" pill badge — same style as tool status badges */
.labs-header-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--labs-accent);
  background: var(--labs-accent-muted);
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(45, 212, 191, 0.2);
}

/* Separator between brand and tool name */
.labs-header-separator {
  color: var(--labs-border-light);
  font-size: 1.125rem;
  font-weight: 300;
  user-select: none;
}

/* Tool name in header */
.labs-header-brand {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.labs-header-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--labs-text-primary);
  text-decoration: none;
}

.labs-header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.labs-header-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--labs-text-secondary);
  text-decoration: none;
  padding: 0.375rem 0.625rem;
  border-radius: var(--labs-radius-sm);
  transition: all var(--labs-transition);
}

.labs-header-link:hover {
  color: var(--labs-text-primary);
  background: var(--labs-bg-hover);
}

.labs-header-link.active {
  color: var(--labs-accent);
  background: var(--labs-accent-muted);
}

.labs-header-back {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--labs-text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--labs-transition);
}

.labs-header-back:hover {
  color: var(--labs-accent);
}

/* Theme toggle button in header */
.labs-theme-toggle {
  background: none;
  border: 1px solid var(--labs-border);
  color: var(--labs-text-secondary);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: var(--labs-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--labs-transition);
  width: 32px;
  height: 32px;
}

.labs-theme-toggle:hover {
  color: var(--labs-accent);
  border-color: var(--labs-accent);
}

.labs-theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* Mobile responsive header */
@media (max-width: 640px) {
  .labs-header {
    padding: 0.625rem 1rem;
  }

  .labs-header-nav {
    gap: 0.375rem;
  }

  .labs-header-link {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .labs-header-back span {
    display: none;
  }
}

/* ============================================
   Footer — matches BehaviorPro main site footer
   ============================================ */
.labs-footer {
  background: var(--labs-bg-primary);
  border-top: 1px solid var(--labs-border);
  font-family: var(--labs-font);
  margin-top: auto;
}

.labs-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* 3-column grid */
.labs-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Brand column */
.labs-footer-brand {
  display: flex;
  flex-direction: column;
}

.labs-footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.labs-footer-tagline {
  font-size: 0.8125rem;
  color: var(--labs-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.labs-footer-copyright {
  font-size: 0.6875rem;
  color: var(--labs-text-muted);
  opacity: 0.7;
}

/* Link columns */
.labs-footer-column h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--labs-text-primary);
  margin-bottom: 0.875rem;
}

.labs-footer-column nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.labs-footer-column a {
  font-size: 0.8125rem;
  color: var(--labs-text-muted);
  text-decoration: none;
  transition: color var(--labs-transition);
}

.labs-footer-column a:hover {
  color: var(--labs-accent);
}

/* Bottom bar: powered by Guideology */
.labs-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--labs-border);
}

.labs-footer-bottom span {
  font-size: 0.6875rem;
  color: var(--labs-text-muted);
  opacity: 0.7;
  margin-right: 0.375rem;
}

.labs-footer-bottom img {
  height: 12px;
  width: auto;
  opacity: 0.7;
  transition: opacity var(--labs-transition);
}

.labs-footer-bottom img:hover {
  opacity: 1;
}

/* Mobile responsive footer */
@media (max-width: 640px) {
  .labs-footer-inner {
    padding: 1.5rem 1rem;
  }

  .labs-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .labs-footer-bottom {
    margin-top: 1.5rem;
  }
}
