/* Custom styles for TeachRouteLT */

/* Smooth transitions for all elements */
* {
    transition: all 0.2s ease-in-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

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

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    background: #059669;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #10b981;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Custom focus styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
    ring-width: 2px;
    ring-color: #059669;
    ring-opacity: 0.5;
}

/* Hover effects for cards */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.dark .card-hover:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Navigation tab active indicator */
.nav-tab-active {
    position: relative;
}

.nav-tab-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #059669;
    border-radius: 2px 2px 0 0;
}

/* Form validation styles */
.form-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.dark .form-error {
    border-color: #ef4444;
    background-color: #450a0a;
}

/* Success styles */
.form-success {
    border-color: #059669;
    background-color: #f0fdf4;
}

.dark .form-success {
    border-color: #059669;
    background-color: #022c22;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.dark .btn-secondary {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.dark .btn-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* Responsive design helpers */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .nav-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gray-800,
    .bg-gray-900 {
        background: white !important;
    }
    
    .text-white {
        color: black !important;
    }
}

/* Custom animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

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

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-emerald-600 {
        background-color: #000 !important;
    }
    
    .text-emerald-600 {
        color: #000 !important;
    }
    
    .border-emerald-600 {
        border-color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.focus-visible:focus {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* Custom utility classes */
.text-gradient {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-emerald {
    box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.39);
}

.border-gradient {
    border-image: linear-gradient(135deg, #059669 0%, #047857 100%) 1;
}
