/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * COMPONENTS.CSS — Centralized Component Styles
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 
 * Consolidates styles for all reusable components:
 * - Header & Navigation
 * - Footer
 * - Cookie Consent Banner
 * - Auth Role Buttons
 * - Utility classes
 * 
 * This eliminates inline <style> blocks across 30+ HTML files.
 * Import design tokens from global.css for consistency.
 */

/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * HEADER & NAVIGATION
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: hsla(225, 25%, 6%, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 5vw, 80px);
  z-index: 100;
  isolation: isolate;
}

body.nav-menu-open {
  overflow: hidden;
}

body.nav-menu-open .cookie-banner {
  opacity: 0;
  pointer-events: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
  flex-shrink: 0;
}

.nav-logo {
  width: 38px;
  height: 38px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 16px hsla(270, 78%, 55%, 0.4);
}

.nav-name {
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 28px);
  min-width: 0;
}

.nav-link-item {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast);
  position: relative;
}

.nav-link-item:hover {
  color: var(--clr-text);
}

/* ── Active link indicator ── */
.nav-link-item.active {
  color: var(--clr-text);
  font-weight: 600;
}

.nav-link-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.landing-nav .theme-toggle-btn {
  position: relative;
  top: auto;
  right: auto;
  z-index: auto;
  width: 40px;
  height: 40px;
  border-width: 1px;
  flex-shrink: 0;
}

/* ── Mobile menu toggle ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 1px;
  transition: all 0.3s ease;
}

@media (max-width: 1100px) {
  .landing-nav {
    gap: 14px;
    padding-inline: 20px;
  }

  .nav-hamburger {
    display: flex;
    order: 3;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(180deg, hsla(225, 24%, 8%, 0.98), hsla(225, 25%, 5%, 0.995));
    border-top: 1px solid var(--clr-border);
    padding: 20px 20px 32px;
    min-height: calc(100dvh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  }

  .nav-links.visible {
    display: flex !important;
  }

  .nav-link-item {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--clr-border);
    font-size: 1rem;
  }

  .nav-link-item.active::after {
    display: none;
  }

  .nav-link-item.active {
    color: var(--clr-primary);
  }

  .nav-actions {
    order: 2;
    margin-left: auto;
    gap: 10px;
    position: relative;
    z-index: 102;
  }

  .landing-nav .theme-toggle-btn {
    width: 38px;
    height: 38px;
  }

  .nav-actions .btn-primary {
    display: none;
  }
}

@media (max-width: 640px) {
  .landing-nav {
    gap: 10px;
    padding-inline: 14px;
  }

  .nav-name {
    font-size: 1rem;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .btn-sm {
    padding: 8px 12px;
    font-size: 0.76rem;
  }

  .landing-nav .theme-toggle-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .landing-nav {
    padding-inline: 12px;
  }

  .nav-name {
    display: none;
  }

  .nav-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .nav-actions .btn-sm {
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .landing-nav .theme-toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
}

/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * FOOTER
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Footer styles are maintained in styles/footer.css as they are
 * well-organized and already extracted. Import that file separately.
 */

/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * COOKIE CONSENT BANNER
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 400px;
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  animation: slideUp 0.4s ease;
  z-index: 99;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0 0 10px;
}

.cookie-banner p {
  font-size: 13px;
  color: var(--clr-text-muted);
  margin: 0 0 16px;
  line-height: 1.6;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-banner button {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cookie-banner [data-cookie-accept] {
  background: var(--grad-primary);
  color: #fff;
  flex: 1;
  min-width: 100px;
}

.cookie-banner [data-cookie-accept]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cookie-banner [data-cookie-reject] {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
  flex: 1;
  min-width: 100px;
}

.cookie-banner [data-cookie-reject]:hover {
  background: var(--clr-bg-3);
  color: var(--clr-text);
}

@media (max-width: 600px) {
  .cookie-banner {
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * AUTH ROLE BUTTONS
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Data-driven buttons for auth.html role selection
 */

.role-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 20px;
}

.role-pick-btn {
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid;
  background: transparent;
  color: var(--clr-text);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.role-pick-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ── Role-specific color schemes ── */
.role-pick-btn[data-role='candidate'] {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
  color: #6ee7b7;
}

.role-pick-btn[data-role='candidate']:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
}

.role-pick-btn[data-role='employer'] {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
  color: #fcd34d;
}

.role-pick-btn[data-role='employer']:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
}

.role-pick-btn[data-role='franchise'] {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.06);
  color: #67e8f9;
}

.role-pick-btn[data-role='franchise']:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.5);
}

.role-pick-btn[data-role='admin'] {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
  color: #fca5a5;
}

.role-pick-btn[data-role='admin']:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
}

.role-pick-btn .icon {
  font-size: 1.4rem;
  margin-bottom: 3px;
}

/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * UTILITY CLASSES
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Component placeholder styling (optional) ── */
[id*='placeholder'] {
  /* Placeholders should be transparent before content loads */
}

[id*='placeholder'].loading {
  opacity: 0.5;
  pointer-events: none;
}

/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ANIMATIONS & TRANSITIONS
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

.animate-slide-down {
  animation: slideDown 0.3s ease;
}

