/* ===== Shared Scorehaven Component Styles ===== */
/* This file provides navigation and footer styles for pages using the build-time include system */

/* ===== Core Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .nav-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .nav-container {
    padding: 0 2rem;
  }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 8px);
}

.nav-links {
  display: none;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md, 12px);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-login {
  display: none;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

@media (min-width: 640px) {
  .nav-login {
    display: block;
  }
}

.nav-login:hover {
  color: var(--text-primary);
}

/* ===== Button Styles ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary, linear-gradient(135deg, #10b981 0%, #3b82f6 100%));
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  padding: 1rem;
  z-index: 99;
  overflow-y: auto;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-link {
  display: block;
  padding: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
  border-radius: var(--radius-md, 12px);
}

.mobile-menu-link:hover {
  background: var(--surface-elevated);
}

/* ===== Features Dropdown ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md, 12px);
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-dropdown-trigger:hover {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

.nav-dropdown-trigger ion-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger ion-icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg, 16px);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md, 12px);
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

.nav-dropdown-item ion-icon {
  font-size: 1.125rem;
  color: var(--primary);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--surface-border);
  margin: 0.5rem 0;
}

.nav-dropdown-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--surface-border);
  margin-top: 0.5rem;
}

.nav-dropdown-footer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.nav-dropdown-footer a:hover {
  text-decoration: underline;
}

/* ===== Mobile Features Submenu ===== */
.mobile-submenu {
  padding-left: 1rem;
  border-left: 2px solid var(--surface-border);
  margin: 0.5rem 0 0.5rem 1rem;
}

.mobile-submenu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md, 12px);
}

.mobile-submenu-link:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

.mobile-submenu-link ion-icon {
  font-size: 1.25rem;
  color: var(--primary);
}

/* ===== Mobile Menu Toggle Script ===== */
/* Note: The toggleMobileMenu() function must be included in pages or added here as inline script */

/* ===== Footer ===== */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--surface-border);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm, 8px);
}

.footer-logo span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--surface-border);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
}
