/* Diamond Power Service App Styles */

:root {
    --diamond-blue: #0056b3;
    --diamond-dark: #003d82;
    --diamond-light: #e6f2ff;
    --diamond-orange: #ff6b35;
    --diamond-gray: #6c757d;
}

/* Base Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--diamond-orange);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Category Tabs */
.category-tab {
    transition: all 0.3s ease;
}

.category-tab.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.product-card .badge {
    transition: all 0.2s ease;
}

.product-card:hover .badge {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Checklist Items */
.checklist-item {
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background-color: var(--diamond-light);
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--diamond-blue);
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.custom-checkbox:checked {
    background-color: var(--diamond-blue);
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--diamond-light);
    border-top: 3px solid var(--diamond-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Maintenance Checklist Styles */
.task-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #1e3a8a;
    cursor: pointer;
}

.task-checkbox:checked {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

.na-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #6b7280;
    cursor: pointer;
}

.na-checkbox:checked {
    background-color: #6b7280;
    border-color: #6b7280;
}

.task-select-all {
    width: 16px;
    height: 16px;
    accent-color: #f97316;
    cursor: pointer;
}

.task-select-all:checked {
    background-color: #f97316;
    border-color: #f97316;
}

/* Checkbox labels */
.task-checkbox + span {
    color: #1e3a8a;
    font-weight: 600;
}

.na-checkbox + span {
    color: #6b7280;
    font-weight: 600;
}

/* Table scroll for large number of sootblowers */
.overflow-x-auto {
    max-width: 100%;
    overflow-x: auto;
}

/* Checklist table hover effects */
.checklist-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Compact checkbox cells */
.checklist-table td {
    padding: 0.25rem !important;
}

/* Status indicators */
.status-completed {
    background-color: #10b981;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.status-na {
    background-color: #6b7280;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Reduce padding and spacing */
    .py-8 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Product cards stack better */
    .product-card {
        margin-bottom: 1rem;
    }
    
    /* Category tabs scroll horizontally */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .overflow-x-auto::-webkit-scrollbar {
        display: none;
    }
    
    /* Forms stack better */
    .grid-cols-1 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Reduce text sizes */
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Buttons full width on mobile */
    .flex-wrap.gap-3 button {
        flex: 1;
        min-width: 120px;
    }
    
    /* Modal adjustments */
    .max-w-2xl {
        max-width: 95%;
        margin: 1rem;
    }
    
    /* Service form adjustments */
    .max-w-2xl.mx-auto {
        margin: 0 1rem;
        width: auto;
    }
    
    /* Mobile Navigation */
    #mobileNav {
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-nav-btn {
        transition: all 0.2s ease;
    }
    
    .mobile-nav-btn:hover {
        background-color: var(--diamond-light);
        border-radius: 0.5rem;
    }
    
    .mobile-nav-btn.active {
        color: var(--diamond-blue);
    }
    
    /* Service dashboard cards stack on mobile */
    .lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Adjust padding for mobile nav */
    .pb-24 {
        padding-bottom: 6rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    /* Even tighter spacing */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Hero section adjustments */
    .bg-gradient-to-r {
        padding: 1.5rem !important;
    }
    
    /* Category tabs smaller */
    .category-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Product cards compact */
    .product-card {
        padding: 1rem;
    }
    
    /* Buttons stack vertically */
    .flex.gap-3 {
        flex-direction: column;
    }
    
    .flex.gap-3 button {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    header, footer, nav, button {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Focus Styles for Accessibility */
button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--diamond-orange);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid var(--diamond-blue);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
