/* Final Header Specification - Footer Component */

.bb-footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: var(--space-lg) var(--space-lg);
  background: var(--bb-cream);
  border-top: 1px solid rgba(191, 160, 90, 0.15);
  margin-top: auto;
  position: relative;
  box-sizing: border-box;
  left: 0 !important;
  right: 0 !important;
  transform: translateX(0) !important;
}

/* Ensure footer breaks out of bb-layout grid when bb-layout is on body */
body.bb-layout > .bb-footer,
.bb-layout > .bb-footer {
  grid-column: 1 / -1;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  left: 0 !important;
  right: 0 !important;
  transform: translateX(0) !important;
}

/* When footer is outside bb-layout div, ensure it spans full viewport */
body > .bb-footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  left: 0 !important;
  right: 0 !important;
  transform: translateX(0) !important;
}

/* Override any parent container constraints */
html body .bb-footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

/* Ensure html and body allow footer to break out */
html {
  overflow-x: visible !important;
}

body {
  overflow-x: visible !important;
}

.bb-footer-content {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.bb-footer-branding {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Footer Product Tagline - Branding reinforcement */
.bb-footer-product {
  margin: 0 0 6px 0;
  font-weight: 600;
  color: var(--text, var(--bb-deep, #1c1e21));
  font-size: 0.95rem;
  font-family: var(--font-ui);
  line-height: 1.3;
}

/* Dark mode support for footer product tagline */
:root[data-ui-theme='aperium'][data-bar-mode='dark'] .bb-footer-product,
body.dark .bb-footer-product {
  color: var(--text, rgba(255, 255, 255, 0.95));
}

.bb-footer-powered {
  font-family: var(--font-ui);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--bb-deep);
  opacity: 0.8;
  margin: 0;
}

.bb-footer-tagline {
  font-family: var(--font-ui);
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--bb-deep);
  opacity: 0.65;
  margin: 0;
  font-style: italic;
}

.bb-footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.bb-footer-link {
  font-family: var(--font-ui);
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--bb-deep);
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.bb-footer-link:hover {
  opacity: 1;
  color: var(--bb-gold);
}

.bb-footer-separator {
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--bb-deep);
  opacity: 0.45;
}

.bb-footer-version {
  margin-top: var(--space-xxs, 4px);
}

.bb-footer-version-text {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--bb-deep);
  opacity: 0.5;
}

/* Mobile */
@media (max-width: 768px) {
  .bb-footer {
    padding: var(--space-lg) var(--space-md);
    margin-left: calc(50% - 50vw);
  }
  
  .bb-footer-content {
    gap: var(--space-sm);
  }
  
  .bb-footer-links {
    gap: var(--space-xxs);
  }
}
