/* Enhanced Missing Report Cards v4 - Integrated Location Prompting Styles */
/* Added: 2025-01-25 - Mobile-first responsive design with location integration */

/* Location Prompt Animations */
@keyframes locationPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.9; 
    }
}

@keyframes floatingIcon {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-5px) rotate(5deg); 
    }
}

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

/* Enhanced Card States */
.missing-card-location-prompt {
    position: relative;
    overflow: hidden;
}

.missing-card-location-prompt::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    animation: shimmerEffect 3s infinite;
}

.location-icon-animate {
    animation: locationPulse 2s infinite ease-in-out;
}

.floating-pattern-icon {
    animation: floatingIcon 4s infinite ease-in-out;
}

/* Enhanced Button Styles */
.location-enable-button {
    position: relative;
    background: linear-gradient(45deg, var(--color-primary, #3b82f6), var(--color-primary-dark, #2563eb));
    border: none;
    border-radius: 9999px;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    min-height: 44px;
    min-width: 44px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
    overflow: hidden;
    cursor: pointer;
}

/* Color variations for different card types */
.location-enable-button.red {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.location-enable-button.orange {
    background: linear-gradient(45deg, #f97316, #ea580c);
    box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.39);
}

.location-enable-button.blue {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.location-enable-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.5);
}

.location-enable-button:active {
    transform: translateY(0);
}

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

.location-enable-button:hover::before {
    left: 100%;
}

/* Responsive Improvements */
@media (max-width: 640px) {
    .missing-card-v4 {
        margin: 0 auto;
        max-width: 380px;
    }
    
    .location-enable-button {
        padding: 14px 28px;
        font-size: 0.875rem;
        min-height: 48px;
        min-width: 48px;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .floating-pattern-icon {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .missing-card-v4 {
        max-width: 100%;
    }
    
    .location-enable-button {
        width: 100%;
        padding: 16px 20px;
        min-height: 52px;
    }
    
    .card-image-container {
        height: 180px;
    }
}

/* Enhanced Notification Styles */
.location-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    z-index: 9999;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-notification.show {
    transform: translateX(0);
}

.location-notification.error {
    border-left-color: #ef4444;
}

.location-notification.info {
    border-left-color: #3b82f6;
}

.location-notification.success {
    border-left-color: #10b981;
}

/* Loading States */
.card-loading {
    position: relative;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.card-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

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

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .location-icon-animate,
    .floating-pattern-icon,
    .missing-card-location-prompt::before,
    .location-enable-button::before {
        animation: none;
    }
    
    .location-enable-button {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .location-enable-button {
        border: 2px solid currentColor;
    }
    
    .missing-card-v4 {
        border: 2px solid #000;
    }
    
    .location-notification {
        border: 2px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .missing-card-v4 {
        background: #1f2937;
        border-color: #374151;
    }
    
    .card-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .location-notification {
        background: #1f2937;
        color: #f9fafb;
    }
}

/* Touch Target Improvements */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (pointer: coarse) {
    .touch-target {
        min-height: 48px;
        min-width: 48px;
    }
    
    .location-enable-button {
        min-height: 48px;
        min-width: 48px;
        padding: 16px 32px;
    }
}

/* Focus Indicators */
.location-enable-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.missing-card-v4:focus-within {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 1px;
}

/* Card Transition States */
.card-state-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.6s ease-out forwards;
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Gradient Backgrounds */
.bg-red-gradient {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.bg-orange-gradient {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.bg-blue-gradient {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
}
