/* ERPM Custom Styles */

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Smooth page transitions */
.page {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Input styling */
input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}

/* Prevent zoom on input focus (iOS) */
input, button, textarea, select {
    font-size: 16px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Button ripple effect */
button {
    position: relative;
    overflow: hidden;
}

button:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1), translate(-50%, -50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    to {
        transform: scale(40), translate(-50%, -50%);
        opacity: 0;
    }
}

button:active::after {
    animation: ripple 0.6s ease-out;
}

/* Safe area padding for notch devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Splash screen */
.splash-screen {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Product grid responsive */
@media (min-width: 640px) {
    #productsList {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cart styles */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #374151;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Order list */
.order-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-card:active {
    transform: scale(0.98);
}

/* Animation for empty states */
.empty-state {
    text-align: center;
    padding: 2rem;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Loading animation */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background: #3b82f6;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-info {
    background: #dbeafe;
    color: #0c4a6e;
    border: 1px solid #93c5fd;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header, nav, .no-print {
        display: none;
    }
}
