/* Custom CSS for Gumi-gumi-gumii Time Tracker */
/* Created by Syed - Enhanced UI/UX Version */

/* 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;
    
    /* Enhanced Color Palette */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    
    /* Shadow Variables */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    line-height: 1.6;
}

/* Responsive Grid Adjustments */
@media (min-width: 1024px) {
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Custom Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes animate-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

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

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.group:hover .group-hover\:animate-pulse {
    animation: pulse 1s infinite;
}

/* 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) {
    /* General adjustments for smaller screens */
    .max-w-7xl {
        max-width: 100%;
    }
    .mx-auto {
        margin-left: 0;
        margin-right: 0;
    }
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    /* Header adjustments */
    header .h-20 {
        height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    header .flex-col {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    header .space-x-4 {
        space-x: 0;
        margin-bottom: 1rem;
    }
    header .hidden.sm\:block {
        display: block !important;
        margin-top: 0.5rem;
    }
    header .text-right {
        text-align: center;
    }

    /* Main content grid */
    .grid-cols-1.lg\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .lg\:col-span-1, .lg\:col-span-2 {
        grid-column: span 1 / span 1;
    }
    .gap-8 {
        gap: 1.5rem;
    }

    /* Card adjustments */
    .p-6 {
        padding: 1.5rem;
    }
    .text-2xl {
        font-size: 1.5rem;
    }
    .text-xl {
        font-size: 1.25rem;
    }
    .text-lg {
        font-size: 1.125rem;
    }
    .text-sm {
        font-size: 0.875rem;
    }
    .text-xs {
        font-size: 0.75rem;
    }

    /* Footer adjustments */
    footer .grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    footer .text-center.md\:text-left,
    footer .text-center.md\:text-right {
        text-align: center;
    }
    footer .justify-start.md\:justify-start,
    footer .justify-end.md\:justify-end {
        justify-content: center;
    }
    footer .space-x-3 {
        space-x: 0.75rem;
    }
    footer .mb-4 {
        margin-bottom: 1rem;
    }
    footer .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    footer .mt-16 {
        margin-top: 2rem;
    }

    /* Floating WhatsApp button */
    .fixed.bottom-6.right-6 {
        bottom: 1rem;
        right: 1rem;
    }
    .group.bg-gradient-to-r.from-green-500.to-emerald-600.text-white.px-6.py-4.rounded-full.shadow-lg.hover\:shadow-xl.transform.hover\:scale-110.transition-all.duration-300.flex.items-center.space-x-3.animate-bounce {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        font-size: 0.875rem; /* text-sm */
    }
    .group .fab.fa-whatsapp.text-2xl {
        font-size: 1.5rem; /* text-xl */
    }
    .group .font-semibold.hidden.sm\:block {
        display: none !important; /* Hide text on small screens */
    }
}

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