/* Base Styles for TeacherOP */

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

/* Better focus styles */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Floating header for landing page design */
.clean-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.3) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 20px rgba(0, 0, 0, 0.03) !important;
    z-index: 1000 !important;
    transition: all 0.3s ease !important;
}

.clean-header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 30px rgba(0, 0, 0, 0.06) !important;
}

.clean-header .brand-link {
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    letter-spacing: -0.015em !important;
}

.clean-header .brand-link:hover {
    color: #10b981 !important;
}

.clean-header .nav-button {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(229, 231, 235, 0.6) !important;
    color: #374151 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    letter-spacing: -0.01em !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.clean-header .nav-button:hover {
    background: rgba(249, 250, 251, 0.95) !important;
    border-color: rgba(209, 213, 219, 0.8) !important;
}

.clean-header .nav-button-primary {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
}

.clean-header .nav-button-primary:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.clean-header .welcome-text {
    color: #6b7280;
}

/* Add padding to body to account for fixed header */
body.has-fixed-header {
    padding-top: 4rem;
}

/* Default header styles for non-landing pages */
.default-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 50;
}

.default-header .brand-link {
    color: #1f2937;
}

.default-header .brand-link:hover {
    color: #3b82f6;
}

.default-header .nav-button {
    border: 1px solid #d1d5db;
    color: #374151;
    background: #ffffff;
}

.default-header .nav-button:hover {
    background: #f9fafb;
}

.default-header .nav-button-primary {
    background: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
}

.default-header .nav-button-primary:hover {
    background: #2563eb;
}

.default-header .welcome-text {
    color: #6b7280;
}

/* Utility classes */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Button base styles */
.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-base:focus {
    outline: none;
    ring: 2px;
    ring-offset: 2px;
    ring-color: #3b82f6;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .responsive-text {
        font-size: 0.875rem;
    }
    
    .responsive-padding {
        padding: 0.5rem 1rem;
    }
    
    body.has-fixed-header {
        padding-top: 3.5rem;
    }
}

@media (max-width: 480px) {
    .responsive-text-sm {
        font-size: 0.75rem;
    }
    
    .responsive-padding-sm {
        padding: 0.375rem 0.75rem;
    }
}

/* Dashboard sidebar styles */
#sidebar {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
}

/* Ensure sidebar stays fixed on all screen sizes */
@media (min-width: 1024px) {
    #sidebar {
        position: fixed !important;
        z-index: 40;
    }
}

/* Ensure proper scrolling for sidebar content */
#sidebar nav {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Animation classes */
.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-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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