/* Venturi Header Component Styles */
:root {
  --topbar-ring: rgba(80, 90, 90, 0.2);
  --pill-bg: rgba(60, 80, 80, 0.2);
  --pill-hover: rgba(100, 120, 120, 0.3);
}

/* Ensure header container takes full width */
.venturi-header-container {
  width: 100%;
  position: relative;
  z-index: 1000;
}

.venturi-header {
  display: flex !important;
  align-items: center;
  gap: 18px !important;
  padding: 12px 20px !important;
  margin: 0 !important;
  background: rgba(20, 25, 25, 0.8);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(60, 80, 80, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
}

.venturi-header .header-left,
.venturi-header .header-center,
.venturi-header .header-right {
  display: flex;
  align-items: center; /* Ensure all content is vertically centered */
}

.venturi-header .header-left {
  gap: 10px;
  min-width: 120px; /* Reserve space for logo */
}

.venturi-header .header-right {
  gap: 10px;
  min-width: 120px; /* Balance the layout */
  justify-content: flex-end;
}

.avatar-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--topbar-ring);
  background: linear-gradient(180deg, #c94f3c, #a63a2a);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--topbar-ring);
  background: rgba(0,0,0,0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.12);
}

/* User menu dropdown */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--topbar-ring);
  background: rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 6px rgba(0,0,0,0.6);
}

.user-btn:hover {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.12);
}

.user-btn .avatar-btn {
  width: 24px;
  height: 24px;
  margin: 0;
}

.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-badge {
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.inbox-count {
  background: #3b82f6;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 6px;
}

.dropdown-icon {
  transition: transform 0.2s ease;
}

.user-btn[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 160px;
  background: rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1100;
}

.user-dropdown[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.1);
}

.dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.venturi-header .header-center {
  flex: 1;
  justify-content: center;
  gap: 20px !important;
}

.venturi-header .nav-item {
  padding: 8px 14px !important;
  border-radius: 0;
  color: #87ceeb;
  text-decoration: none;
  font-weight: 400 !important;
  letter-spacing: 0.2px;
  transition: color .18s, border-bottom .18s;
  outline: none;
  position: relative;
  border-bottom: 2px solid transparent;
  margin: 0 !important;
  text-shadow: 0 1px 3px rgba(0,139,139,0.8), 0 0 6px rgba(0,212,255,0.6);
}

.venturi-header .nav-item:hover {
  color: #00d4ff;
  border-bottom-color: rgba(0, 212, 255, 0.7);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.venturi-header .nav-item.active {
  color: #00ffff;
  border-bottom-color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 1);
}

.header-left .brand {
  height: 32px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  transition: all 0.2s ease;
}

.header-left .brand:hover {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
  transform: scale(1.02);
}

/* Top gradient behind navigation (optional - include if needed) */
.header-gradient {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 130px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0) 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .venturi-header {
    padding: 8px 12px !important;
    margin: 0 !important;
    gap: 12px !important;
  }
  
  .venturi-header .header-center {
    gap: 12px !important;
  }
  
  .venturi-header .nav-item {
    padding: 6px 10px !important;
    font-size: 0.9rem;
    font-weight: 400 !important;
    margin: 0 !important;
  }
  
  .venturi-header .header-left .brand {
    height: 26px; /* Increased from 18px to maintain proportion */
  }
}

@media (max-width: 480px) {
  .venturi-header .header-center {
    display: none !important;
  }
  
  .venturi-header .header-left,
  .venturi-header .header-right {
    min-width: auto;
  }
  
  .venturi-header .header-left {
    flex: 1;
  }
}

/* TV Navigation Focus Styles */
.venturi-header .tv-focusable {
  position: relative;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.venturi-header .tv-focusable:focus {
  outline: 3px solid #20b2aa;
  outline-offset: 2px;
  background-color: rgba(32, 178, 170, 0.1);
  transform: scale(1.05);
  z-index: 310;
}

.venturi-header .nav-item:focus {
  color: #20b2aa;
  text-shadow: 0 0 8px rgba(32, 178, 170, 0.6);
}

.venturi-header .user-btn:focus {
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.3);
}

.venturi-header .icon-btn:focus {
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.3);
}

/* Dropdown focus styles */
.venturi-header .tv-dropdown-item:focus {
  background-color: rgba(32, 178, 170, 0.15);
  color: #20b2aa;
  outline: 2px solid #20b2aa;
  outline-offset: -2px;
}

/* Focus visibility enhancements */
.venturi-header .tv-focusable:focus::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #20b2aa;
  border-radius: 6px;
  animation: focusPulse 2s infinite;
  pointer-events: none;
}

@keyframes focusPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Hide focus outline on non-keyboard interactions */
.venturi-header .tv-focusable:focus:not(:focus-visible) {
  outline: none;
}

.venturi-header .tv-focusable:focus:not(:focus-visible)::before {
  display: none;
}

/* Category Dropdown Styles */
.nav-dropdown {
  position: relative;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px !important;
  border-radius: 0;
  color: #e8e3df;
  text-decoration: none;
  font-weight: 400 !important;
  letter-spacing: 0.2px;
  transition: color .18s, border-bottom .18s;
  outline: none;
  position: relative;
  border-bottom: 2px solid transparent;
  margin: 0 !important;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  font-size: inherit;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 6px rgba(0,0,0,0.6);
}

.dropdown-btn:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.dropdown-btn[aria-expanded="true"] {
  color: #fff;
  border-bottom-color: #fff;
}

.dropdown-btn[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  min-width: 180px;
  background: rgba(20, 25, 25, 0.95);
  border: 1px solid rgba(60, 80, 80, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(40, 50, 50, 0.6);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1100;
}

.nav-dropdown-menu[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 8px;
}

.dropdown-column {
  display: flex;
  flex-direction: column;
}

.dropdown-grid .dropdown-item {
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 4px;
  margin: 2px;
}

.dropdown-grid .dropdown-item:hover {
  background: rgba(255,255,255,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-dropdown-menu {
    min-width: 240px;
  }
}

@media (max-width: 480px) {
  .nav-dropdown {
    display: none;
  }
}

/* Upload Button Special Styling */
.venturi-header .nav-item.upload-btn {
  background: linear-gradient(135deg, rgba(32, 178, 170, 0.25), rgba(32, 178, 170, 0.15));
  border: 1px solid rgba(32, 178, 170, 0.3);
  border-radius: 8px;
  padding: 8px 16px !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(32, 178, 170, 0.1);
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
}

.venturi-header .nav-item.upload-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.venturi-header .nav-item.upload-btn:hover {
  background: linear-gradient(135deg, rgba(32, 178, 170, 0.4), rgba(32, 178, 170, 0.25));
  border-color: rgba(32, 178, 170, 0.5);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
  border-bottom-color: rgba(32, 178, 170, 0.5) !important;
}

.venturi-header .nav-item.upload-btn:hover::before {
  left: 100%;
}

.venturi-header .nav-item.upload-btn svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Responsive adjustments for upload button */
@media (max-width: 768px) {
  .venturi-header .nav-item.upload-btn {
    padding: 6px 12px !important;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .venturi-header .nav-item.upload-btn {
    display: none;
  }
}
