/**
 * Modern Admin Header Component
 * Reusable across all admin pages
 */

.admin-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Left side - Logo and title */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.9;
}

.header-logo-icon {
  font-size: 1.5rem;
}

.header-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.5rem;
}

.header-page-title {
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 400;
}

/* Right side - User menu */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Prayer Switcher Dropdown */
.prayer-switcher-dropdown {
  position: relative;
}

.prayer-switcher-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.prayer-switcher-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.prayer-icon {
  font-size: 1.125rem;
}

.prayer-name {
  font-weight: 500;
}

.prayer-dropdown-menu {
  min-width: 280px;
}

.prayer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
}

.prayer-item.active {
  background: #f1f5f9;
  color: #1e40af;
  font-weight: 500;
}

.prayer-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.prayer-item-domain {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* User Profile Dropdown */
.user-profile-dropdown {
  position: relative;
}

.user-profile-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.user-profile-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
}

.user-email {
  font-size: 0.875rem;
  font-weight: 500;
}

.user-role {
  font-size: 0.75rem;
  opacity: 0.8;
}

.dropdown-icon {
  font-size: 1rem;
  transition: transform 0.2s;
}

.user-profile-dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 240px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  overflow: hidden;
}

.user-profile-dropdown.open .dropdown-menu,
.prayer-switcher-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dropdown-email {
  font-size: 0.875rem;
  color: #1e293b;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.dropdown-role {
  font-size: 0.75rem;
  color: #64748b;
}

.dropdown-items {
  padding: 0.5rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #1e40af;
}

.dropdown-item-icon {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0.5rem 0;
}

.dropdown-item.danger {
  color: #dc2626;
}

.dropdown-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Super Admin Badge */
.super-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #78350f;
}

/* Quick Actions (optional) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.header-action-icon {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }
  
  .header-page-title {
    display: none;
  }
  
  .user-info {
    display: none;
  }
  
  .header-divider {
    display: none;
  }
  
  .dropdown-menu {
    min-width: 200px;
  }
}

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