/* Swish POS Custom Styles */

:root {
    --swish-primary: #3B82F6;
    --swish-secondary: #6B7280;
    --swish-success: #10B981;
    --swish-warning: #F59E0B;
    --swish-danger: #EF4444;
    --swish-info: #06B6D4;
    --swish-light: #F8FAFC;
    --swish-dark: #1F2937;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--swish-light);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #D1D5DB;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--swish-primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* POS Specific Styles */
.pos-container {
    height: calc(100vh - 120px);
    overflow: hidden;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.product-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    min-height: 120px;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: var(--swish-primary);
}

.product-card.selected {
    border-color: var(--swish-success);
    background-color: rgba(16, 185, 129, 0.1);
}

.cart-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.cart-item {
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem;
    transition: background-color 0.2s ease-in-out;
}

.cart-item:hover {
    background-color: var(--swish-light);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    background: linear-gradient(135deg, var(--swish-primary), #2563EB);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* QR Code Container */
.qr-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.qr-container canvas {
    border: 4px solid var(--swish-primary);
    border-radius: 0.5rem;
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

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

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Tables */
.table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background-color: var(--swish-light);
    border-bottom: 2px solid #E5E7EB;
    font-weight: 600;
    color: var(--swish-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .pos-container {
        height: auto;
    }
    
    .cart-container {
        margin-top: 2rem;
        max-height: 400px;
    }
    
    .stat-card .stat-number {
        font-size: 2rem;
    }
}

/* Touch-friendly buttons for tablets */
@media (max-width: 1024px) {
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .product-card {
        min-height: 100px;
        padding: 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

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

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

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Success/Error States */
.success-state {
    border-color: var(--swish-success) !important;
    background-color: rgba(16, 185, 129, 0.1);
}

.error-state {
    border-color: var(--swish-danger) !important;
    background-color: rgba(239, 68, 68, 0.1);
}

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

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--swish-secondary);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--swish-primary);
}

/* Print Styles */
@media print {
    .navbar, .btn, .modal, .toast-container {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white !important;
    }
}