/* Custom CSS for Work Hours Tracker */
/* Created by Syed */

/* Root Variables for Consistent Theming */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --purple-color: #8b5cf6;
    --purple-hover: #7c3aed;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Smooth Transitions for Better UX */
* {
    transition: all 0.2s ease-in-out;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Enhanced Button Styles */
.btn {
    @apply inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-200;
}

.btn-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500;
}

.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;
}

.btn-purple {
    @apply bg-purple-600 text-white hover:bg-purple-700 focus:ring-purple-500;
}

/* Enhanced Form Inputs */
.form-input {
    @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 transition-all duration-200;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Card Hover Effects */
.card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 transition-all duration-200;
}

.card:hover {
    @apply shadow-md;
    transform: translateY(-2px);
}

/* Enhanced Table Styles */
.table-row {
    @apply transition-all duration-200;
}

.table-row:hover {
    @apply bg-gray-50;
}

/* Timer Display Animation */
.timer-display {
    animation: pulse-subtle 2s infinite;
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Status Indicators */
.status-active {
    @apply text-green-600;
    animation: pulse 1.5s infinite;
}

.status-inactive {
    @apply text-gray-500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Toast Animations */
.toast-enter {
    transform: translateX(100%);
}

.toast-show {
    transform: translateX(0);
}

.toast-exit {
    transform: translateX(100%);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modal-slide-up 0.3s ease-out;
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .mobile-stack {
        @apply flex-col space-y-3 space-x-0;
    }
    
    .mobile-full {
        @apply w-full;
    }
    
    .mobile-text-sm {
        @apply text-sm;
    }
    
    .mobile-px-4 {
        @apply px-4;
    }
}

/* Dark Mode Support (for future enhancement) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-friendly {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}

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

/* Focus Indicators */
.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Date Picker Styling */
input[type="date"] {
    position: relative;
    background: white;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Enhanced Time Input Styling */
input[type="time"] {
    position: relative;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    background: transparent;
    cursor: pointer;
}

/* Animation for New Entries */
.entry-new {
    animation: slide-in 0.5s ease-out;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Workspace Tab Styling */
.workspace-tab {
    @apply px-4 py-2 text-sm font-medium text-gray-500 hover:text-gray-700 hover:bg-gray-50 rounded-md cursor-pointer transition-all duration-200;
}

.workspace-tab.active {
    @apply bg-blue-100 text-blue-700;
}

/* Duration Highlight */
.duration-highlight {
    @apply font-mono text-lg font-semibold;
}

.duration-positive {
    @apply text-green-600;
}

.duration-warning {
    @apply text-yellow-600;
}

.duration-error {
    @apply text-red-600;
}