/* 
 * Main Application Styles
 * File: public/css/app.css
 */

/* Base styles - Tailwind CSS will be included in templates via CDN */

/* Custom styles for 3D models */
.model-viewer {
    width: 100%;
    height: 500px;
    background: #f3f4f6;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.model-viewer canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Loading animations */
.loader {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: auto;
}

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

/* Product image hover effect */
.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Admin sidebar */
.admin-sidebar {
    min-height: calc(100vh - 4rem);
}

.admin-sidebar a.block {
    transition: background-color 0.2s ease;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Form improvements */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Button improvements */
.btn {
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5856eb 0%, #7c3aed 100%);
}

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

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

/* Navigation improvements */
nav a {
    transition: color 0.2s ease;
}

/* Table improvements */
table {
    border-collapse: collapse;
}

table th {
    background-color: #f9fafb;
    font-weight: 600;
}

table tr:hover {
    background-color: #f9fafb;
}

/* Flash messages */
.flash-message {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.flash-message.success {
    background-color: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.flash-message.error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.flash-message.warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #d97706;
}

.flash-message.info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.new {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.in_progress {
    background-color: #fef3c7;
    color: #d97706;
}

.status-badge.completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Page transitions */
.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Mobile improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .admin-sidebar {
        position: fixed;
        z-index: 1000;
        width: 250px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    table {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .admin-sidebar {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .card {
        background-color: #374151;
    }
    
    table th {
        background-color: #374151;
    }
    
    table tr:hover {
        background-color: #4b5563;
    }
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Animation delays for staggered effects */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

