/* Custom styles for Lalitpur Hatbazar PWA */

/* Custom button styles */
.btn-red {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-red:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    color: white;
}

.btn-outline-red {
    color: #dc2626;
    border-color: #dc2626;
}

.btn-outline-red:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-outline-green {
    color: #16a34a;
    border-color: #16a34a;
}

.btn-outline-green:hover {
    background-color: #16a34a;
    border-color: #16a34a;
    color: white;
}

.btn-outline-blue {
    color: #2563eb;
    border-color: #2563eb;
}

.btn-outline-blue:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
}

.btn-outline-purple {
    color: #9333ea;
    border-color: #9333ea;
}

.btn-outline-purple:hover {
    background-color: #9333ea;
    border-color: #9333ea;
    color: white;
}

/* Card hover effects */
.card {
    transition: box-shadow 0.3s ease;
}

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

/* Area card hover effect */
.area-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.area-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Shop card hover effect */
.shop-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

/* Custom navbar brand */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

/* Badge styles */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Table styles */
.table th {
    border-top: none;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Modal styles */
.modal-header {
    border-bottom: 1px solid #e5e7eb;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
}

/* Form styles */
.form-control:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25);
}

.form-select:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    border-top-color: #dc2626;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid {
        gap: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* PWA install button */
#installPWA {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Search and filter styles */
.input-group .form-control:focus {
    z-index: 3;
}

/* Chat container styles */
.chat-container {
    background-color: #f9fafb;
}

/* Dashboard stats animation */
.card-body h4 {
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation active state */
.nav-link.active {
    background-color: #dc2626 !important;
    color: white !important;
}

/* Custom spacing utilities */
.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    .card {
        break-inside: avoid;
    }
}

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

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-gray-50 {
        background-color: #1f2937;
        color: white;
    }
    
    .card {
        background-color: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .text-gray-600 {
        color: #d1d5db !important;
    }
    
    .text-gray-800 {
        color: #f3f4f6 !important;
    }
}
