/* Enhanced Loading States & Micro-interactions */

/* Contextual Loading Animations */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-12) var(--space-6);
    gap: var(--space-6);
}

.detective-scanner {
    position: relative;
    width: 120px;
    height: 120px;
    border: 3px solid var(--primary-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detective-scanner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: detective-scan 2s linear infinite;
}

.detective-scanner i {
    font-size: 2.5rem;
    color: var(--primary-600);
    animation: detective-pulse 1.5s ease-in-out infinite;
}

@keyframes detective-scan {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Progressive Loading for Images */
.image-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

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

/* Success Celebration */
.success-celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
}

.celebration-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--success-600);
    border-radius: 50%;
    animation: celebrate-fall 3s ease-in-out forwards;
}

@keyframes celebrate-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced Button States */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all var(--transition-normal);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:active {
    transform: translateY(1px) scale(0.98);
}

/* Status Indicators with Animation */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.status-stolen {
    background: var(--error-50);
    color: var(--error-800);
    border: 1px solid var(--error-200);
}


.status-recovered {
    background: var(--success-50);
    color: var(--success-800);
    border: 1px solid var(--success-200);
}

.status-recovered::before {
    content: '';
    position: absolute;
    left: var(--space-2);
    width: 6px;
    height: 6px;
    background: var(--success-600);
    border-radius: 50%;
}

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

/* Enhanced Form Focus States */
.form-input-enhanced {
    position: relative;
    border: 2px solid var(--border-primary);
    transition: all var(--transition-normal);
    background: var(--bg-primary);
}

.form-input-enhanced:focus {
    border-color: var(--primary-600);
    box-shadow: 
        0 0 0 3px var(--primary-50),
        0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Contextual Empty States */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-6);
    color: var(--text-muted);
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-6);
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-400);
    position: relative;
}

.empty-state-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px dashed var(--gray-300);
    border-radius: 50%;
    animation: rotate-border 8s linear infinite;
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}