/* Custom styles for Xavuren */

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Utility classes */
.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;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Gradient backgrounds */
.gradient-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

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

/* Button styles */
.btn-primary {
    @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-medium hover:bg-blue-700 transition duration-300;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-800 px-6 py-3 rounded-lg font-medium hover:bg-gray-300 transition duration-300;
}

.btn-success {
    @apply bg-green-600 text-white px-6 py-3 rounded-lg font-medium hover:bg-green-700 transition duration-300;
}

.btn-danger {
    @apply bg-red-600 text-white px-6 py-3 rounded-lg font-medium hover:bg-red-700 transition duration-300;
}

/* Form styles */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

/* Alert styles */
.alert {
    @apply p-4 rounded-lg border-l-4;
}

.alert-success {
    @apply bg-green-50 border-green-500 text-green-700;
}

.alert-error {
    @apply bg-red-50 border-red-500 text-red-700;
}

.alert-warning {
    @apply bg-yellow-50 border-yellow-500 text-yellow-700;
}

.alert-info {
    @apply bg-blue-50 border-blue-500 text-blue-700;
}

/* Navigation styles */
.nav-link {
    @apply text-gray-600 hover:text-blue-600 transition duration-300;
}

/* Hero section styles */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Card styles */
.service-card {
    @apply bg-white rounded-lg shadow-md hover:shadow-xl transition duration-300 overflow-hidden;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

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

/* Wallet specific styles */
.wallet-card {
    @apply bg-white rounded-lg shadow-lg p-6;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.balance-display {
    @apply text-3xl font-bold text-gray-900;
    font-variant-numeric: tabular-nums;
}

/* Admin styles */
.admin-header {
    background: linear-gradient(135deg, #dc2626 0%, #ec4899 100%);
}

.admin-card {
    @apply bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition duration-300;
}

/* Product styles */
.product-image {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.price-display {
    @apply text-2xl font-bold text-blue-600;
}

.original-price {
    @apply text-lg text-gray-500 line-through;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 28rem;
    width: 100%;
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
}

/* Improved modal for better scrolling */
.modal-scrollable {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    flex-shrink: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    min-height: 0; /* Important for Firefox */
}

.modal-footer {
    flex-shrink: 0;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    background-color: #f9fafb;
}

/* Ensure modals work properly on mobile */
@media (max-height: 600px) {
    .modal-scrollable {
        max-height: 95vh;
    }
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Table styles */
.data-table {
    @apply min-w-full divide-y divide-gray-200;
}

.data-table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50;
}

.data-table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

/* Status badges */
.status-online {
    @apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800;
}

.status-offline {
    @apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800;
}

.status-pending {
    @apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

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

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

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

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

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}