/* ============================================================
   Shared Header Component Styles — IndianMarriage.com
   ============================================================ */

/* Glass nav effect */
.sh-glass { backdrop-filter: blur(10px); background: rgba(255,255,255,0.95); }
.dark .sh-glass { background: rgba(30,30,35,0.95); }

/* ---- Dropdown menus ---- */
.sh-nav-item { position: relative; }

.sh-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
  pointer-events: none;
}

.sh-nav-item:hover > .sh-dropdown,
.sh-dropdown.sh-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Mega menu (multi-column) */
.sh-mega {
  min-width: 480px;
  max-width: 600px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.dark .sh-mega { background: #1E1E23; border-color: #374151; }

.sh-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}
.sh-mega-item:hover { background: #fdf2f8; }
.dark .sh-mega-item:hover { background: #374151; }

.sh-mega-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sh-mega-text-primary {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}
.dark .sh-mega-text-primary { color: #f3f4f6; }

.sh-mega-text-secondary {
  font-size: 0.75rem;
  color: #6b7280;
}
.dark .sh-mega-text-secondary { color: #9ca3af; }

/* Single-column dropdown */
.sh-dropdown-list {
  min-width: 240px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.dark .sh-dropdown-list { background: #1E1E23; border-color: #374151; }

.sh-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sh-dropdown-item:hover { background: #fdf2f8; color: #EC4899; }
.dark .sh-dropdown-item { color: #d1d5db; }
.dark .sh-dropdown-item:hover { background: #374151; color: #f472b6; }

/* ---- Action panels (notifications, user menu) ---- */
.sh-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 300px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}
.sh-panel.sh-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dark .sh-panel { background: #1E1E23; border-color: #374151; }

.sh-panel-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  font-weight: 600;
  font-size: 0.85rem;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dark .sh-panel-header { border-color: #374151; color: #f3f4f6; }

.sh-panel-body { padding: 0.5rem 0; max-height: 320px; overflow-y: auto; }

.sh-panel-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.sh-panel-item:hover { background: #f9fafb; }
.dark .sh-panel-item { color: #d1d5db; }
.dark .sh-panel-item:hover { background: #374151; }

.sh-panel-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sh-panel-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

.sh-panel-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 0.25rem 0;
}
.dark .sh-panel-divider { background: #374151; }

/* ---- Notification badge animation ---- */
@keyframes sh-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.sh-badge-pulse { animation: sh-badge-pulse 2s ease-in-out infinite; }

/* ---- Click-outside overlay for panels ---- */
.sh-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
}
.sh-overlay.sh-open { display: block; }

/* ---- Mobile slide-in menu ---- */
.sh-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.sh-mobile-backdrop.sh-open { opacity: 1; visibility: visible; }

.sh-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 20rem;
  max-width: 85vw;
  height: 100%;
  background: #fff;
  z-index: 41;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}
.sh-mobile-drawer.sh-open { transform: translateX(0); }
.dark .sh-mobile-drawer { background: #1E1E23; }

/* Mobile menu sections */
.sh-mobile-section { border-top: 1px solid #f3f4f6; padding-top: 0.75rem; margin-top: 0.75rem; }
.dark .sh-mobile-section { border-color: #374151; }

.sh-mobile-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.sh-mobile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color 0.15s;
}
.sh-mobile-link:hover { color: #EC4899; }
.dark .sh-mobile-link { color: #d1d5db; }
.dark .sh-mobile-link:hover { color: #f472b6; }

.sh-mobile-badge {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  margin-left: auto;
}

/* ---- IndianMarriage color utilities ---- */
.gradient-love { background: linear-gradient(135deg, #EC4899, #D4AF37); }
.text-love-pink { color: #EC4899; }
.bg-love-pink { background-color: #EC4899; }
.text-marriage-gold { color: #D4AF37; }
.bg-marriage-gold { background-color: #D4AF37; }
.text-destiny-purple { color: #8b5cf6; }

/* Nav transition utility */
.sh-transition { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* User status indicator */
.sh-status-online {
  width: 0.75rem;
  height: 0.75rem;
  background: #10B981;
  border-radius: 50%;
  border: 2px solid #fff;
  position: absolute;
  bottom: -2px;
  right: -2px;
}
.dark .sh-status-online { border-color: #1E1E23; }

/* Profile completion bar */
.sh-progress-bar {
  width: 4rem;
  height: 0.25rem;
  background: #e5e7eb;
  border-radius: 9999px;
}
.dark .sh-progress-bar { background: #374151; }
.sh-progress-fill {
  height: 100%;
  background: #10B981;
  border-radius: 9999px;
}

/* ================================================================
   Auth-aware section toggling
   ================================================================ */
/* Default: hide auth-only sections, show guest sections */
[data-auth-show="authenticated"] { display: none !important; }

/* When authenticated: flip visibility */
body.is-authenticated [data-auth-show="authenticated"] { display: block !important; }
body.is-authenticated [data-auth-show="guest"] { display: none !important; }

/* Layout-aware variants for flex/grid containers */
body.is-authenticated [data-auth-show="authenticated"][data-auth-display="flex"] { display: flex !important; }
body.is-authenticated [data-auth-show="authenticated"][data-auth-display="grid"] { display: grid !important; }

/* Smooth entrance for auth sections */
.auth-fade-in {
  animation: sh-auth-fade 0.3s ease-in;
}
@keyframes sh-auth-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
