/* Vani Marketplace - Main Styles */

:root {
    --primary-component-color: #457696;
    --primary-component-hover-color: #457696;

    --secondary-component-color: #89b7c2;
    --secondary-component-hover-color: #50717e;

    --tertiary-component-color: #dfe8eb;
}


/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Utility classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.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;
}

/* Loading states */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f4f6;
    border-top-color: var(--primary-component-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

img:not(.loaded) {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Custom scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {

    /* Touch targets */
    button,
    a,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improve text readability */
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Better spacing for mobile */
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hide desktop-only elements */
    .desktop-only {
        display: none;
    }
}

@media (min-width: 769px) {

    /* Hide mobile-only elements */
    .mobile-only {
        display: none;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background-color: #10b981;
    color: white;
}

.toast.error {
    background-color: #ef4444;
    color: white;
}

.toast.info {
    background-color: #3b82f6;
    color: white;
}

.toast.warning {
    background-color: #f59e0b;
    color: white;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #10b981;
    color: white;
}

.notification.error {
    background-color: #ef4444;
    color: white;
}

.notification.info {
    background-color: #3b82f6;
    color: white;
}

.notification.warning {
    background-color: #f59e0b;
    color: white;
}

/* Chat styles */
.chat-message {
    max-width: 70%;
    word-wrap: break-word;
    animation: fadeIn 0.2s ease-out;
}

.chat-message.own {
    margin-left: auto;
}

.typing-indicator {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Form enhancements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: 0;
    border-color: var(--primary-component-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

/* Button enhancements */
.btn {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
}

/* .btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
} */

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border: 1px solid #6b7280;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    border-color: #4b5563;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fecaca;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Progress indicators */
.progress {
    width: 100%;
    height: 0.5rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease-in-out;
}

/* Rating stars */
.star {
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.star.active,
.star:hover {
    color: #fbbf24;
}

/* Image gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* Search enhancements */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.search-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.search-suggestion:hover {
    background-color: #f9fafb;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .sm-hidden {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .md-hidden {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .lg-hidden {
        display: none !important;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: none;
        color: #000;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
*:focus {
    outline: 2px solid var(--primary-component-color);
    outline-offset: 2px;
}

/* Skip links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3b82f6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}