/* ZAM AI MART - Custom Styles */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #fee2e2;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #991b1b;
    font-size: 14px;
    border-top: 1px solid #fca5a5;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Line clamp utilities */
.line-clamp-1 { 
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.line-clamp-3 { 
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* NavLink active state */
a.active {
    color: #7c3aed !important;
    background-color: #f5f3ff !important;
}

.dark a.active {
    color: #a78bfa !important;
    background-color: rgba(109, 40, 217, 0.2) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4c1d95;
}

/* Transition for dark mode */
body,
.bg-white,
.bg-gray-50,
.bg-gray-800,
.bg-gray-900 {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Focus visible outline */
*:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Image lazy loading */
img {
    loading: lazy;
}

/* Tool card hover effect */
.tool-card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card-hover:hover {
    transform: translateY(-2px);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge styles */
.badge-free {
    background-color: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-paid {
    background-color: #ede9fe;
    color: #5b21b6;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Stagger animation for grid items */
.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 50ms; }
.stagger-item:nth-child(3) { animation-delay: 100ms; }
.stagger-item:nth-child(4) { animation-delay: 150ms; }
.stagger-item:nth-child(5) { animation-delay: 200ms; }
.stagger-item:nth-child(6) { animation-delay: 250ms; }
