/* Didiandrems Custom Styles */

/* Typography improvements */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth transitions for all interactive elements */
* {
    transition-property: color, background-color, border-color, opacity, transform, box-shadow;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

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

/* Focus states for better accessibility */
.focus\:ring-2:focus {
    outline: none;
    ring-width: 2px;
    ring-color: #3b82f6;
    ring-opacity: 0.5;
}

/* Image loading animation */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Drag and drop styling */
.drag-over {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

/* Upload progress bar styling */
.progress-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    transition: width 0.3s ease;
}

/* Lightbox backdrop blur */
.lightbox-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Animation for modal transitions */
@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modal-fade-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Custom animations for loading states */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient backgrounds for cards without images */
.gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}

/* Hover effects for cards */
.card-hover {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* File upload area styling */
.upload-zone {
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.upload-zone.drag-active {
    border-color: #3b82f6;
    background-color: #eff6ff;
    transform: scale(1.02);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

/* Notification styles */
.notification {
    animation: slideInRight 0.3s ease;
}

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

/* Media grid responsive improvements */
@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1280px) {
    .grid-responsive {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1rem;
    }
}

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

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

/* Error state styling */
.error-state {
    color: #ef4444;
    background-color: #fef2f2;
    border-color: #fecaca;
}

/* Success state styling */
.success-state {
    color: #10b981;
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

/* Warning state styling */
.warning-state {
    color: #f59e0b;
    background-color: #fffbeb;
    border-color: #fed7aa;
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border {
        border-width: 2px;
    }
    
    .shadow-sm {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}
