/* Job Map Enhancements */

/* Employee Card Hover Effects */
.employee-card-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.employee-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
    border-color: #3b82f6 !important;
}

/* Employee Avatar Pulse Animation for Active Employees */
.employee-card-status:not(.inactive) + .employee-card-avatar::after,
.employee-card-item:hover .employee-card-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    animation: pulse 2s infinite;
}

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

/* Tracking Section Improvements */
.employee-tracking-section {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tracking-point {
    position: relative;
    overflow: hidden;
}

.tracking-point::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #60a5fa);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.tracking-point:hover::before {
    transform: scaleY(1);
}

/* Route Line Animation */
@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* Employee Details Card Smooth Scroll */
.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}

.card-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cbd5e1, #94a3b8);
    border-radius: 10px;
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #94a3b8, #64748b);
}

/* Status Badge Glow Effect */
.employee-card-status {
    position: relative;
    transition: all 0.3s ease;
}

.employee-card-status:not(.inactive) {
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
    }
}

/* Tracking Header Icon Rotation */
.tracking-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Skeleton for Employee Cards */
.employee-card-item.loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Map Route Markers */
.mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .employee-card-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-card-avatar {
        margin-bottom: 8px;
    }

    .tracking-list {
        max-height: 150px !important;
    }
}

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

[dir="rtl"] .tracking-arrow {
    transform: scaleX(-1);
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .employee-card-item {
        background: #1f2937;
        border-color: #374151;
    }

    .employee-card-item:hover {
        border-color: #60a5fa;
    }

    .tracking-point {
        background: #374151 !important;
    }

    .tracking-point:hover {
        background: #4b5563 !important;
    }
}

