/* Shared Header Component - Modern UX Design */

:root {
  --sh-primary: #10b981;
  --sh-primary-light: #1de9b6;
  --sh-primary-dark: #047857;
  --sh-bg-dark: var(--bg-secondary, #0f172a);
  --sh-text-light: var(--text-light, #e2e8f0);
  --sh-text-muted: var(--text-muted, #94a3b8);
  --sh-border: var(--border-accent, rgba(226, 232, 240, 0.1));
  --sh-bg-secondary: var(--bg-tertiary, #1e293b);
  --sh-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --sh-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Main Header */
.shared-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--sh-bg-dark);
  border-bottom: 1px solid var(--sh-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 3.5rem;
}

.shared-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  gap: 2rem;
}

/* Logo Section */
.shared-header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.shared-header-logo:hover {
  opacity: 0.8;
}

.shared-header-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.shared-header-logo-text {
  display: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sh-text-light);
  white-space: nowrap;
}

.shared-header-equi {
  color: var(--sh-primary);
}

@media (min-width: 1200px) {
  .shared-header-logo-text {
    display: inline;
  }
}

/* Desktop Navigation */
.shared-header-nav-desktop {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

@media (min-width: 1024px) {
  .shared-header-nav-desktop {
    display: flex;
  }
}

.shared-header-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--sh-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  border-radius: 0.375rem;
}

.shared-header-nav-link:hover {
  color: var(--sh-text-light);
  background-color: rgba(0, 150, 64, 0.08);
}

.shared-header-nav-link.active {
  color: var(--sh-primary);
  background-color: rgba(0, 150, 64, 0.1);
}

.shared-header-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--sh-primary);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.shared-header-nav-link.active::after {
  transform: scaleX(1);
}

.shared-header-nav-link i {
  font-size: 1rem;
  width: 1rem;
}

/* Right Actions */
.shared-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Pricing Link */
.shared-header-pricing-link {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--sh-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  font-family: inherit;
}

.shared-header-pricing-link:hover {
  color: var(--sh-text-light);
  background-color: rgba(0, 150, 64, 0.08);
}

.shared-header-pricing-link.active {
  color: var(--sh-primary);
}

.shared-header-pricing-link i {
  font-size: 1rem;
}

@media (min-width: 1024px) {
  .shared-header-pricing-link {
    display: flex;
  }
}

/* Theme Button */
.shared-header-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--sh-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
}

.shared-header-theme-btn:hover {
  color: var(--sh-text-light);
  background-color: rgba(0, 150, 64, 0.08);
}

/* Hamburger Menu */
.shared-header-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

.shared-header-hamburger span {
  width: 20px;
  height: 2.5px;
  background-color: var(--sh-text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.shared-header-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.shared-header-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.shared-header-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (min-width: 1024px) {
  .shared-header-hamburger {
    display: none;
  }
}

/* User Button */
.shared-header-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--sh-text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.shared-header-user-btn:hover {
  color: var(--sh-text-light);
  background-color: rgba(0, 150, 64, 0.08);
}

/* User Dropdown */
.shared-header-user-dropdown {
  position: fixed;
  right: 1rem;
  top: calc(3.5rem + 0.5rem);
  min-width: 240px;
  background-color: var(--sh-bg-secondary);
  border: 1px solid var(--sh-border);
  border-radius: 0.5rem;
  box-shadow: var(--sh-shadow-lg);
  display: none;
  flex-direction: column;
  z-index: 1001;
  animation: slideDown 0.2s ease;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
}

.shared-header-user-dropdown.active {
  display: flex;
}

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

#user-dropdown-content {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.shared-header-user-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--sh-text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.shared-header-user-item:hover {
  background-color: rgba(0, 150, 64, 0.1);
  color: var(--sh-primary);
  padding-left: 1.25rem;
}

.shared-header-user-item i {
  width: 18px;
  text-align: center;
}

.shared-header-divider {
  height: 1px;
  background-color: var(--sh-border);
  margin: 0.5rem 0;
}

.shared-header-btn-login,
.shared-header-btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--sh-primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  border-radius: 0;
}

.shared-header-btn-login:hover,
.shared-header-btn-logout:hover {
  background: var(--sh-primary-dark);
  padding-left: 1.25rem;
}

/* Mobile Navigation */
.shared-header-nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--sh-bg-secondary);
  border-bottom: 1px solid var(--sh-border);
  flex-direction: column;
  padding: 0.75rem 0;
  margin-top: 0;
}

.shared-header-nav-mobile.active {
  display: flex;
}

.shared-header-mobile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--sh-text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.shared-header-mobile-link:hover,
.shared-header-mobile-link.active {
  background-color: rgba(0, 150, 64, 0.1);
  color: var(--sh-primary);
  border-left-color: var(--sh-primary);
}

.shared-header-mobile-link i {
  width: 20px;
  font-size: 1.1rem;
}

.shared-header-mobile-divider {
  height: 1px;
  background-color: var(--sh-border);
  margin: 0.5rem 0;
}

/* License Banner */
.shared-header-banner {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  border-bottom: 2px solid #ef4444;
  padding: 1rem;
  margin-top: 0;
}

.shared-header-banner-text {
  color: #fecaca;
  font-weight: 500;
  font-size: 0.95rem;
}

.shared-header-banner-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.shared-header-banner-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shared-header-banner-btn:hover {
  background: #dc2626;
}

.shared-header-banner-close {
  background: transparent;
  border: none;
  color: #fecaca;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.shared-header-banner-close:hover {
  color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .shared-header-container {
    padding: 0 1rem;
    gap: 1rem;
  }

  .shared-header-pricing-link {
    display: none;
  }
}

@media (max-width: 768px) {
  .shared-header {
    height: 3.25rem;
  }

  .shared-header-container {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .shared-header-logo-img {
    height: 28px;
  }

  .shared-header-nav-desktop {
    display: none;
  }

  .shared-header-hamburger {
    display: flex;
  }

  .shared-header-theme-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .shared-header-user-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .shared-header-user-dropdown {
    right: 0.5rem;
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .shared-header-container {
    padding: 0 0.5rem;
    gap: 0.25rem;
  }

  .shared-header-logo-img {
    height: 26px;
  }

  .shared-header-theme-btn,
  .shared-header-user-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .shared-header-hamburger {
    width: 32px;
    height: 32px;
  }

  .shared-header-hamburger span {
    width: 18px;
  }

  .shared-header-user-dropdown {
    right: 0.25rem;
    min-width: 180px;
    max-width: calc(100vw - 0.5rem);
  }
}
