/* Reflex Time Tracker - Custom Styles */

/* Mobile-first responsive design */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

/* Ensure proper mobile scaling */
* {
    box-sizing: border-box;
}

/* Custom timesheet grid styles */
.timesheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.day-card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s ease-in-out;
}

.day-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.day-header {
    font-weight: bold;
    color: #495057;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.time-input {
    margin-bottom: 0.75rem;
}

.time-input label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    transition: all 0.15s ease-in-out;
}

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

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

/* Mobile navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1000;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-content {
    margin-top: 80px;
    padding: 1rem;
}

/* Status messages */
.alert {
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.5rem;
}

/* Location badges */
.badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control-sm,
.form-select-sm {
    font-size: 0.875rem;
}

/* Button groups */
.btn-group-sm > .btn,
.btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timesheet-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .day-card {
        padding: 0.75rem;
    }
    
    .main-content {
        margin-top: 70px;
        padding: 0.5rem;
    }
    
    .mobile-nav {
        padding: 0.5rem;
    }
    
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .h1, .h2 {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .timesheet-grid {
        gap: 0.5rem;
    }
    
    .day-card {
        padding: 0.5rem;
    }
    
    .main-content {
        padding: 0.25rem;
    }
    
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Dark mode support (if needed later) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Print styles */
@media print {
    .mobile-nav,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .timesheet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .day-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Animation utilities */
.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); }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

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

/* 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;
    }
}