/* Header Component Styles - header.css */

/* Desktop Header */
.header {
  background: #1a2851;
  padding: 0 40px;
  height: 62px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #111;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header .logo-section {
  position: absolute;
  left: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  z-index: 10;
}

.header .logo {
  font-size: 22px;
  font-weight: 600;
  color: #f8f9fa;
  line-height: 1;
}

.header .version {
  font-size: 11px;
  color: #9e9e9e;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.header .center-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
}

.header .center-nav a {
  color: #f8f9fa;
  text-decoration: none;
  padding: 0 20px;
  height: 36px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
}

.header .center-nav a:hover {
  background: rgba(240, 244, 255, 0.04);
  border-color: rgba(240, 244, 255, 0.2);
}

.header .center-nav a.active {
  color: #fff;
  position: relative;
  font-size: 16px;
  background: rgba(240, 244, 255, 0.08);
}

.header .right-actions {
  position: absolute;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header .add-bet-btn {
  background: #f8f9fa;
  color: #1a2851;
  border: none;
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-block;
}

.header .add-bet-btn:hover {
  opacity: 0.9;
}

.header .user-profile {
  width: 31px;
  height: 31px;
  border-radius: 4px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1a2851;
  font-size: 15px;
  transition: opacity 0.2s;
  position: relative;
  font-weight: 700;
}

.header .user-profile:hover {
  opacity: 0.9;
}

/* Desktop User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e1e4e8;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 10003;
}

.user-dropdown.active {
  opacity: 1 !important;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown:hover {
  opacity: 1 !important;
}

.user-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid #e1e4e8;
  border-top: 1px solid #e1e4e8;
  transform: rotate(45deg);
}

.user-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e1e4e8;
}

.user-dropdown-header .user-email {
  font-size: 12px;
  color: #586069;
  margin-top: 2px;
}

.user-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #1a2851;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: #f8f9fa;
}

.user-dropdown-divider {
  height: 1px;
  background: #e1e4e8;
  margin: 4px 0;
}

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #1a2851;
}

.mobile-menu-btn .hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-btn .hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fafbfc;
  transition: all 0.3s;
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 999;
  pointer-events: none;
  transition: background 0.3s ease;
}

.mobile-menu.active {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid #e1e4e8;
}

.mobile-menu-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-header .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a2851;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 500;
}

.mobile-menu-header .close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #586069;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.mobile-menu-nav {
  padding: 20px 0;
}

.mobile-menu-nav a {
  display: block;
  padding: 12px 20px;
  color: #586069;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}

.mobile-menu-nav a:hover {
  background: #f8f9fa;
}

.mobile-menu-nav a.active {
  color: #f0f4ff;
  background: #1a2851;
}

.mobile-menu-nav .divider {
  height: 1px;
  background: #e1e4e8;
  margin: 12px 20px;
}

.mobile-add-bet-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px;
  background: #1a2851;
  color: #f0f4ff !important; /* White-ish text color */
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 2px 4px rgba(26, 40, 81, 0.15);
}

.mobile-add-bet-btn:hover {
  background: #0f1d3a; /* Darker blue */
  color: #ffffff !important; /* Pure white on hover */
  box-shadow: 0 4px 8px rgba(26, 40, 81, 0.25);
  transform: translateY(-1px);
}

.mobile-add-bet-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(26, 40, 81, 0.2);
  background: #0a1428; /* Even darker when pressed */
}

.mobile-add-bet-btn.active {
  background: #2a3861; /* Slightly lighter blue to show it's current page */
  color: #ffffff !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Ensure consistent styling even with .mobile-menu-nav parent */
.mobile-menu-nav .mobile-add-bet-btn {
  background: #1a2851;
  color: #f0f4ff !important;
}

.mobile-menu-nav .mobile-add-bet-btn:hover {
  background: #0f1d3a;
  color: #ffffff !important;
}

/* Tablet Breakpoint */
@media (max-width: 768px) {
  .header {
    padding: 0 20px;
  }

  .user-dropdown {
    right: -10px;
    min-width: 160px;
  }

  .user-dropdown::before {
    right: 18px;
  }

  .header .logo-section {
    left: 20px;
  }

  .header .center-nav {
    gap: 30px;
  }

  .header .right-actions {
    right: 20px;
    gap: 12px;
  }

  .header .add-bet-btn {
    padding: 7px 14px;
    font-size: 12px;
  }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
  .header {
    padding: 0 16px;
    justify-content: space-between;
  }

  .header .logo-section {
    position: static;
  }

  .header .center-nav {
    display: none;
  }

  .header .right-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    box-shadow: none;
  }

  /* When menu is open, animate hamburger to X */
  .mobile-menu-btn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Small Mobile */
@media (max-width: 375px) {
  .mobile-menu-content {
    width: 100%;
  }
}
