/* Custom styles for Kosher Market POS */

:root {
    /* Custom color variables for kosher theme */
    --kosher-blue: #1e40af;
    --kosher-green: #059669;
    --kosher-gold: #d97706;
    --kosher-red: #dc2626;
    
    /* Receipt styles */
    --receipt-font: 'Courier New', monospace;
    --receipt-width: 300px;
}

/* Global enhancements */
body {
    font-size: 14px;
    line-height: 1.5;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

/* Card enhancements */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* Button enhancements */
.btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn-group .btn {
    transform: none;
}

.btn-group .btn:hover {
    transform: none;
    z-index: 1;
}

/* Table enhancements */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Form enhancements */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Badge enhancements */
.badge {
    font-weight: 500;
}

/* Alert enhancements */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert .fas {
    margin-right: 0.5rem;
}

/* POS Terminal specific styles */
.pos-container {
    min-height: calc(100vh - 200px);
}

#barcodeInput {
    font-family: var(--receipt-font);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.cart-item {
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.5);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.02);
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    overflow: hidden;
}

.quantity-control input {
    border: none;
    width: 60px;
    text-align: center;
    padding: 0.25rem;
}

.quantity-control button {
    border: none;
    background: var(--bs-light);
    padding: 0.25rem 0.5rem;
    transition: background 0.2s ease;
}

.quantity-control button:hover {
    background: var(--bs-primary);
    color: white;
}

/* Search results */
.search-result-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--bs-primary);
    color: white;
}

.search-result-item:hover .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Product management */
.product-row {
    transition: all 0.2s ease;
}

.product-row:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    cursor: pointer;
}

/* Receipt styles */
.receipt-preview {
    font-family: var(--receipt-font);
    max-width: var(--receipt-width);
    margin: 0 auto;
    background: white;
    color: black;
    padding: 1rem;
    border: 1px solid #ddd;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.receipt-items {
    margin-bottom: 1rem;
}

.receipt-totals {
    border-top: 1px solid #000;
    padding-top: 0.5rem;
}

.receipt-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #000;
    font-size: 0.875rem;
}

/* Kosher indicators */
.kosher-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mevushal-badge {
    background-color: var(--kosher-gold);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-weight: 600;
}

.hechsher-badge {
    background-color: var(--kosher-blue);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-weight: 500;
}

/* Currency indicators */
.currency-symbol {
    font-weight: 700;
    font-size: 1.1em;
}

.exchange-rate {
    font-size: 0.875rem;
    color: var(--bs-secondary);
    font-style: italic;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    #barcodeInput {
        font-size: 1rem;
    }
    
    .pos-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bs-dark);
        padding: 1rem;
        z-index: 1000;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .receipt-preview {
        max-width: none;
        border: none;
        padding: 0;
        font-size: 12px;
    }
    
    body {
        background: white;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .cart-item {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .cart-item:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

[data-bs-theme="dark"] .receipt-preview {
    background: var(--bs-dark);
    color: var(--bs-light);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .quantity-control {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .quantity-control button {
    background: var(--bs-secondary);
    color: var(--bs-light);
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Success/Error states */
.success-state {
    color: var(--kosher-green);
}

.error-state {
    color: var(--kosher-red);
}

.warning-state {
    color: var(--kosher-gold);
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .table th,
    .table td {
        border-width: 2px;
    }
}

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

.feature-card {
    background-color: #23272f !important;
    color: #fff !important;
}

.feature-card .text-muted {
    color: #b0b8c1 !important;
}
