/* =====================================================
   GAMEFACE RESPONSIVE HEADER - MOBILE-FIRST SOLUTION
   File: gameface-header.css (enhanced version)
   ===================================================== */

/* =====================================================
   IMPROVED HEADER STRUCTURE
   ===================================================== */

.gf-dashboard-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 16px;
    height: 72px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.gf-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 12px;
}

/* =====================================================
   RESPONSIVE LOGO SECTION
   ===================================================== */

.gf-logo-section {
    display: flex;
    align-items: center;
    xxgap: 8px; /* drop this */
    flex-shrink: 0;
    min-width: 0;
}

.gf-logo-section .game,
.gf-logo-section .face {
    font-size: 20px;
    font-weight: bold;
}

.gf-logo-section .game {
    color: #1e293b;
}

.gf-logo-section .face {
    color: #667eea;
}

/* Context text that appears after logo */
.gf-header-context {
    color: #64748b;
    font-size: 18px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
	padding-top:2px;
    text-overflow: ellipsis;
}

/* =====================================================
   MOBILE-FIRST HEADER ACTIONS
   ===================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile Menu Toggle - Hidden by default, shown on mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #64748b;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: #f1f5f9;
}

/* Desktop Actions Container - Hidden on mobile */
.desktop-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile Actions Container - Hidden on desktop */
.mobile-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

/* =====================================================
   RESPONSIVE COMPONENTS
   ===================================================== */

/* Role Switcher - Responsive */
.role-switcher select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 100px;
}

/* Quick Action Buttons - Responsive */
.quick-action-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.quick-action-btn .emoji {
    background: white;
    padding: 2px 4px;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.quick-action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Notification Button with Tooltip */
.notification-container {
    position: relative;
}

.notification-btn {
    position: relative;
    background: #f1f5f9;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: #e2e8f0;
}

.notification-btn:hover .notification-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Notification Tooltip/Dropdown */
.notification-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 400px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.tooltip-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.tooltip-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.tooltip-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #fef3f3;
    border-left: 3px solid #ef4444;
}

.notification-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #667eea;
    margin-bottom: 4px;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.notification-message {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: #9ca3af;
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    text-align: center;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

.empty-notifications {
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-notifications p {
    font-size: 13px;
    margin: 0;
}

/* Mobile notification tooltip adjustments */
.mobile-notification-tooltip {
    width: 280px;
    right: -120px; /* Center better on mobile */
}

.mobile-notification-tooltip .notification-message {
    font-size: 11px;
}

.mobile-notification-tooltip .notification-item {
    padding: 10px 16px;
}

.item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    margin-right: 12px;
    color: #64748b;
}

.item-text {
    flex: 1;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 0;
}

.logout-item {
    color: #dc2626;
}

.logout-item:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.logout-item .item-icon {
    color: #dc2626;
}

/* =====================================================
   MOBILE DROPDOWN MENU
   ===================================================== */

.mobile-dropdown {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 16px;
    z-index: 999;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}

.mobile-dropdown.active {
    display: block;
}

.mobile-dropdown-section {
    margin-bottom: 20px;
}

.mobile-dropdown-section:last-child {
    margin-bottom: 0;
}

.mobile-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.mobile-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.mobile-quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: background 0.2s;
}

.mobile-quick-action:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.mobile-action-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* =====================================================
   TABLET RESPONSIVE (1024px and below)
   ===================================================== */

@media (max-width: 1024px) {
    .dashboard-header {
        padding: 0 20px;
    }
    
    .gf-header-context {
        font-size: 13px;
    }
    
    .quick-action-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .role-switcher select {
        min-width: 90px;
        font-size: 13px;
    }
}

/* =====================================================
   MOBILE RESPONSIVE (768px and below)
   ===================================================== */

@media (max-width: 768px) {
    .dashboard-header {
        padding: 0 12px;
        height: 64px;
    }
    
    /* Show mobile toggle, hide desktop actions */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .desktop-actions {
        display: none;
    }
    
    .mobile-actions {
        display: flex;
    }
    
    /* Simplified logo */
    .gf-logo-section {
        gap: 6px;
    }
    
    .gf-logo-section .game,
    .gf-logo-section .face {
        font-size: 18px;
    }
    
    .emoji-icon-xl {
        width: 24px;
        height: 24px;
    }
	
	.emoji-icon-small {
        width: 12px;
        height: 12px;
    }
    
    /* Hide context text on small screens */
    .gf-header-context {
        display: none;
    }
    
    /* Essential mobile actions only */
    .mobile-actions .notification-btn {
        padding: 6px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .mobile-actions .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .user-name {
        display: none;
    }
    
    /* Mobile dropdown positioning */
    .mobile-dropdown {
        top: 64px;
    }
}

/* =====================================================
   SMALL MOBILE (480px and below)
   ===================================================== */

@media (max-width: 480px) {
    .gf-dashboard-header {
        padding: 0 8px;
    }
    
    .gf-header-content {
        gap: 8px;
    }
    
    .gf-logo-section .game,
    .gf-logo-section .face {
        font-size: 16px;
    }
    
    .emoji-icon-xl {
        width: 20px;
        height: 20px;
    }
    
    .mobile-actions {
        gap: 4px;
    }
    
    .mobile-actions .notification-btn {
        min-width: 32px;
        min-height: 32px;
        padding: 4px;
        font-size: 14px;
    }
    
    .mobile-actions .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .mobile-dropdown {
        padding: 12px;
    }
    
    .mobile-quick-action {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* =====================================================
   LANDSCAPE MOBILE OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .dashboard-header {
        height: 56px;
    }
    
    .mobile-dropdown {
        top: 56px;
        max-height: calc(100vh - 56px);
    }
    
    .gf-logo-section .game,
    .gf-logo-section .face {
        font-size: 16px;
    }
}

/* =====================================================
   ACCESSIBILITY IMPROVEMENTS
   ===================================================== */

/* Focus states for better keyboard navigation */
.mobile-menu-toggle:focus,
.notification-btn:focus,
.user-menu-toggle:focus,
.quick-action-btn:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dashboard-header {
        border-bottom: 2px solid #000;
    }
    
    .notification-badge {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .quick-action-btn,
    .mobile-menu-toggle,
    .notification-btn,
    .user-menu-toggle,
    .mobile-dropdown {
        transition: none;
    }
    
    .quick-action-btn:hover {
        transform: none;
    }
}

/* =====================================================
   ADD THESE STYLES TO YOUR gameface-header.css FILE
   Missing User Menu Dropdown & Notification Tooltip Styles
   ===================================================== */

/* =====================================================
   USER MENU DROPDOWN STYLES
   ===================================================== */

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.dropdown-user-info strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.dropdown-user-info small {
    color: #64748b;
    font-size: 12px;
}

.dropdown-content {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
    text-decoration: none;
}

.item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    margin-right: 12px;
    color: #64748b;
}

.item-text {
    flex: 1;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 0;
}

.logout-item {
    color: #dc2626;
}

.logout-item:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.logout-item .item-icon {
    color: #dc2626;
}

.dropdown-arrow {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.2s;
}

.user-menu-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* =====================================================
   NOTIFICATION TOOLTIP STYLES
   ===================================================== */

.notification-container {
    position: relative;
}

.notification-btn:hover .notification-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 400px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.tooltip-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.tooltip-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.tooltip-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #fef3f3;
    border-left: 3px solid #ef4444;
}

.notification-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #667eea;
    margin-bottom: 4px;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.notification-message {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: #9ca3af;
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    text-align: center;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

.empty-notifications {
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.empty-notifications p {
    font-size: 13px;
    margin: 0;
}

/* Mobile notification tooltip adjustments */
.mobile-notification-tooltip {
    width: 280px;
    right: -120px; /* Center better on mobile */
}

.mobile-notification-tooltip .notification-message {
    font-size: 11px;
}

.mobile-notification-tooltip .notification-item {
    padding: 10px 16px;
}

/* =====================================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ===================================================== */

@media (max-width: 768px) {
    .user-menu-dropdown {
        right: -20px;
        width: 240px;
    }
    
    .mobile-notification-tooltip {
        right: -140px;
    }
}

@media (max-width: 480px) {
    .user-menu-dropdown {
        right: -40px;
        width: 220px;
    }
    
    .notification-tooltip {
        width: 260px;
        right: -100px;
    }
}

/* =====================================================
   DEBUGGING STYLES (Remove after testing)
   ===================================================== */

/* Uncomment these temporarily to debug dropdown positioning */
/*
.user-menu-dropdown {
    border: 2px solid red !important;
}

.notification-tooltip {
    border: 2px solid blue !important;
}
*/