/* Custom styles for Employee Workload System */

/* Line clamp utilities for task cards */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Drag and drop styles */
.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drop-zone {
    transition: all 0.2s ease-in-out;
}

.drop-zone.drag-over {
    background-color: #dbeafe !important;
    border: 2px dashed #3b82f6 !important;
    transform: scale(1.02);
}

/* Task card hover effects */
.task-card {
    transition: all 0.2s ease-in-out;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Priority indicators */
.priority-high {
    border-left: 4px solid #ef4444;
}

.priority-medium {
    border-left: 4px solid #f59e0b;
}

.priority-low {
    border-left: 4px solid #10b981;
}

/* Status column styling */
.status-column {
    min-height: 400px;
    transition: background-color 0.2s ease;
}

.status-column.drop-target {
    background-color: #f0f9ff;
    border: 2px dashed #0ea5e9;
}

/* Employee avatar colors */
.avatar-blue { background-color: #3b82f6; }
.avatar-green { background-color: #10b981; }
.avatar-purple { background-color: #8b5cf6; }
.avatar-orange { background-color: #f59e0b; }
.avatar-red { background-color: #ef4444; }
.avatar-cyan { background-color: #06b6d4; }

/* Progress bar animation */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Modal animations */
.modal-overlay {
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Notification animations */
.notification {
    animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Workload indicator colors */
.workload-low {
    color: #10b981;
    background-color: #d1fae5;
}

.workload-medium {
    color: #f59e0b;
    background-color: #fef3c7;
}

.workload-high {
    color: #ef4444;
    background-color: #fee2e2;
}

/* Card transitions */
.employee-card {
    transition: all 0.2s ease-in-out;
}

.employee-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar for task columns */
.task-column {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.task-column::-webkit-scrollbar {
    width: 6px;
}

.task-column::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.task-column::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.task-column::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .task-card {
        margin-bottom: 0.75rem;
    }
    
    .employee-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-opacity: 0.5;
}

/* Task status indicators */
.status-todo {
    border-left: 4px solid #6b7280;
}

.status-in-progress {
    border-left: 4px solid #3b82f6;
}

.status-review {
    border-left: 4px solid #f59e0b;
}

.status-completed {
    border-left: 4px solid #10b981;
}

/* Settings Toggle Styles */
.toggle-checkbox {
    transition: all 0.2s ease-in-out;
}

.toggle-checkbox:checked {
    right: 0;
    border-color: #10b981;
    background-color: #10b981;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #10b981;
}

.toggle-label {
    transition: all 0.2s ease-in-out;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #1f2937;
    color: #f9fafb;
}

.dark-mode .bg-white {
    background-color: #374151 !important;
    color: #f9fafb;
}

.dark-mode .bg-gray-50 {
    background-color: #1f2937 !important;
}

.dark-mode .text-gray-900 {
    color: #f9fafb !important;
}

.dark-mode .text-gray-600 {
    color: #d1d5db !important;
}

.dark-mode .text-gray-500 {
    color: #9ca3af !important;
}

.dark-mode .border-gray-200 {
    border-color: #4b5563 !important;
}

.dark-mode .shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Compact View Styles */
.compact-view .task-card {
    padding: 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

.compact-view .employee-card {
    padding: 0.75rem !important;
}

.compact-view .stats-card {
    padding: 1rem !important;
}

.compact-view h1 {
    font-size: 1.25rem !important;
}

.compact-view h2 {
    font-size: 1.125rem !important;
}

.compact-view .px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.compact-view .py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Right-click Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
}

.dark-mode .context-menu {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.context-menu-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.15s ease-in-out;
}

.context-menu-item:hover {
    background-color: #f3f4f6;
}

.dark-mode .context-menu-item:hover {
    background-color: #4b5563;
}

.context-menu-item i {
    width: 16px;
    text-align: center;
}

.context-menu-separator {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.25rem 0;
}

.dark-mode .context-menu-separator {
    background-color: #4b5563;
}

/* Badge Style Variations */
.badge-circular {
    border-radius: 9999px;
}

.badge-rectangular {
    border-radius: 0.25rem;
}

/* Animation for settings changes */
.settings-transition {
    transition: all 0.3s ease-in-out;
}

/* Enhanced Header Styles */
.header-dropdown {
    animation: dropdownSlideIn 0.2s ease-out;
    transform-origin: top;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: scaleY(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scaleY(1) translateY(0);
    }
}

/* Smooth hover transitions for buttons */
.header-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.header-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.header-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Enhanced notification badge pulse */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-badge {
    animation: badgePulse 2s infinite;
}

/* Glassmorphism effect for dropdowns */
.glass-dropdown {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Improved user avatar gradient */
.user-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header sticky shadow on scroll */
.header-scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Smooth transitions for all interactive elements */
.interactive-element {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: translateY(-1px);
}

/* Enhanced dropdown item hover states */
.dropdown-item {
    position: relative;
    transition: all 0.15s ease-in-out;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: all 0.15s ease-in-out;
}

.dropdown-item:hover::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Task Dependencies Styles */
.status-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.status-todo {
    background-color: #f3f4f6;
    color: #374151;
}

.status-badge.status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.status-review {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.priority-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.priority-badge.priority-low {
    background-color: #d1fae5;
    color: #065f46;
}

.priority-badge.priority-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.priority-badge.priority-high {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Dependency relationship indicators */
.dependency-item {
    transition: all 0.2s ease-in-out;
}

.dependency-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dependency visual connectors */
.dependency-connector {
    position: relative;
}

.dependency-connector::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 8px;
    height: 1px;
    background-color: #d1d5db;
}

/* Task blocking indicators */
.task-blocked {
    border: 2px solid #f59e0b !important;
    background-color: #fffbeb !important;
}

.task-blocked::after {
    content: '🔒';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
}