/* Header Component Styles */
/* https://events.swing.com/css/header.css */

.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 8px 16px 0 16px;
  background: white;
  pointer-events: auto !important;
}

.header-wrapper * {
  pointer-events: auto !important;
}

.header-bar {
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
  background: #5E5EA1;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  border-radius: 16px;
  position: relative;
  border: 2px solid gold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  height: 36px;
  width: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn {
  font-size: 24px;
  cursor: pointer;
  color: white;
  padding: 8px 12px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  line-height: 1;
  position: relative;
  z-index: 1002;
  pointer-events: auto !important;
}

.menu-btn:hover { background: rgba(255,255,255,0.25); }

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 0;
}

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.header-right svg {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: white;
}

.profile-container {
  position: relative;
}

.profile-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: white;
  padding: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.profile-icon:hover { background: rgba(255,255,255,0.25); }

/* Dropdowns */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 220px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1001;
}

.dropdown.open { display: block; }

.dropdown a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
  border-bottom: 1px solid #eee;
}

.dropdown a:last-child { border-bottom: none; }

.dropdown a:hover {
  background: #f0f0ff;
  color: #5E5EA1;
}

.dropdown a span {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.dropdown a.logout {
  color: #e74c3c;
}

.dropdown a.logout:hover { background: #fee; }

.dropdown a.danger-item {
  background: #e74c3c;
  color: white;
}

.dropdown a.danger-item span {
  color: rgba(255,255,255,0.8);
}

.dropdown a.danger-item:hover {
  background: #c0392b;
  color: white;
}

.dropdown a.info-item {
  background: #3498db;
  color: white;
}

.dropdown a.info-item span {
  color: rgba(255,255,255,0.8);
}

.dropdown a.info-item:hover {
  background: #2980b9;
  color: white;
}

.dropdown a.highlight-item {
  background: #27ae60;
  color: white;
}

.dropdown a.highlight-item span {
  color: rgba(255,255,255,0.8);
}

.dropdown a.highlight-item:hover {
  background: #219a52;
  color: white;
}

.menu-dropdown { left: 0; }
.profile-dropdown { right: 0; }

.profile-dropdown .user-info {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #666;
  font-size: 13px;
}

.profile-dropdown .user-info strong {
  display: block;
  color: #333;
  font-size: 14px;
}

@media (max-width: 600px) {
  .header-logo {
    position: static;
    transform: none;
    margin-left: 8px;
  }
  .header-title { font-size: 14px; }
  .header-left { min-width: auto; }
  .header-right { min-width: auto; }
}

@media (max-width: 480px) {
  .header-title { display: none; }
}

/* ====== MOBILE RESPONSIVENESS FIXES ====== */

/* Increase menu button touch target to 44x44px minimum */
@media (max-width: 768px) {
  .menu-btn {
    padding: 10px 14px !important;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .profile-icon {
    width: 32px !important;
    height: 32px !important;
    padding: 6px !important;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Mobile-friendly dropdown menus */
@media (max-width: 600px) {
  .dropdown {
    min-width: 180px !important;
    max-width: 90vw !important;
  }

  .dropdown a {
    padding: 14px 16px !important;
    font-size: 14px !important;
  }

  .dropdown a span {
    font-size: 12px !important;
  }

  .menu-dropdown {
    left: 0 !important;
    right: auto !important;
  }

  .profile-dropdown {
    right: 0 !important;
    left: auto !important;
  }
}

/* Very small phones - full width dropdown */
@media (max-width: 400px) {
  .dropdown {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    width: calc(100vw - 16px) !important;
    max-width: none !important;
    top: 70px !important;
  }
}
