/* Header Redesign - RTL Optimized */
:root {
    --primary-purple: #6f6fea;
    --primary-blue: #4361EE;
    --secondary-blue: #129dff;
    --accent-pink: #f72585;
    --accent-pink-light: #ff6b9d;
    --bg-light: #F3F1FF;
    --text-primary: #374151;
    --text-secondary: #6b7280;
    --border-light: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* RTL Support */
[dir="rtl"] .header-dropdown {
    left: auto;
    right: 0;
}

[dir="rtl"] .notification-dropdown {
    left: auto;
    right: -120px;
}

[dir="rtl"] .search-dropdown {
    left: auto;
    right: -120px;
}

/* Header Base Styles */
.app-header {
    background: var(--bg-light);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(111, 111, 234, 0.1);
}

/* Notification Button Enhancements */
.notification-button {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-button:hover {
    transform: translateY(-1px);
}

.notification-badge {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.2);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Notification Dropdown Enhancements */
.notification-dropdown {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    transform: rotate(45deg);
    border-radius: 2px;
}

[dir="rtl"] .notification-dropdown::before {
    right: auto;
    left: 140px;
}

/* Profile Button Enhancements */
.profile-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.profile-avatar {
    transition: all 0.3s ease;
}

.profile-button:hover .profile-avatar {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(111, 111, 234, 0.2);
}

/* Profile Dropdown Enhancements */
.profile-dropdown {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    transform: rotate(45deg);
    border-radius: 2px;
}

[dir="rtl"] .profile-dropdown::before {
    right: auto;
    left: 20px;
}

/* Menu Item Hover Effects */
.menu-item {
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(111, 111, 234, 0.1), transparent);
    transition: right 0.5s ease;
}

.menu-item:hover::before {
    right: 100%;
}

[dir="rtl"] .menu-item::before {
    right: auto;
    left: -100%;
}

[dir="rtl"] .menu-item:hover::before {
    left: 100%;
}

/* Icon Containers */
.icon-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover .icon-container {
    transform: scale(1.1) rotate(5deg);
}

/* Status Indicator */
.status-indicator {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

/* Smooth Scrollbar for Dropdowns */
.dropdown-scroll::-webkit-scrollbar {
    width: 4px;
}

.dropdown-scroll::-webkit-scrollbar-track {
    background: rgba(111, 111, 234, 0.1);
    border-radius: 2px;
}

.dropdown-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-purple), var(--primary-blue));
    border-radius: 2px;
}

.dropdown-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-blue), var(--primary-purple));
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .notification-dropdown,
    .profile-dropdown {
        width: 90vw;
        max-width: 320px;
        right: 5vw;
        left: 5vw;
    }
    
    .notification-dropdown::before,
    .profile-dropdown::before {
        right: 50%;
        left: auto;
        transform: translateX(50%) rotate(45deg);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-light: #374151;
        --white: #111827;
    }
    
    .notification-dropdown,
    .profile-dropdown {
        background: rgba(17, 24, 39, 0.95);
        border-color: rgba(55, 65, 81, 0.5);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .notification-button,
    .profile-button {
        border: 2px solid var(--primary-purple);
    }
    
    .menu-item:hover {
        background: var(--primary-purple) !important;
        color: var(--white) !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
.notification-button:focus,
.profile-button:focus,
.menu-item:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Custom Properties for Dynamic Theming */
.header-theme-purple {
    --primary-color: var(--primary-purple);
    --secondary-color: var(--primary-blue);
}

.header-theme-blue {
    --primary-color: var(--primary-blue);
    --secondary-color: var(--secondary-blue);
}

/* Print Styles */
@media print {
    .notification-dropdown,
    .profile-dropdown,
    .notification-button,
    .profile-button {
        display: none !important;
    }
}

/* Search Dropdown Enhancements */
.search-dropdown {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
    transform: rotate(45deg);
    border-radius: 2px;
}

[dir="rtl"] .search-dropdown::before {
    right: auto;
    left: 140px;
}

/* Search Type Button Styling */
.search-type-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-type-btn.active {
    background: white;
    color: var(--primary-purple);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-type-btn:not(.active) {
    color: #6b7280;
}

.search-type-btn:not(.active):hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

/* Search Input Enhancements */
.search-input-enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-enhanced:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 111, 234, 0.15);
}

/* Command K Search Modal */
.search-modal {
    backdrop-filter: blur(20px);
}

.search-modal-content {
    max-height: 80vh;
    animation: modalSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Search Results Styling */
.search-result-item {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-result-item:hover {
    transform: translateX(-2px);
}

[dir="rtl"] .search-result-item:hover {
    transform: translateX(2px);
}

.search-result-selected {
    background: linear-gradient(90deg, rgba(111, 111, 234, 0.05), rgba(67, 97, 238, 0.05));
    border-right: 3px solid var(--primary-purple);
}

[dir="rtl"] .search-result-selected {
    border-right: none;
    border-left: 3px solid var(--primary-purple);
}

/* Search Categories */
.search-category-header {
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid rgba(111, 111, 234, 0.1);
}

/* Keyboard Shortcuts */
.search-kbd {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.search-kbd:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    transform: translateY(-1px);
}

/* Loading Animation */
.search-loading {
    animation: searchPulse 1.5s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Search Button Enhancement */
.search-button-cmd {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-button-cmd:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 111, 234, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .search-result-item {
        padding: 1rem;
    }
    
    .search-kbd {
        display: none;
    }
} 