/* Custom styles for RSU Delima Hospital Appointment System */

/* Smooth transitions for view changes */
.view {
    transition: opacity 0.3s ease-in-out;
}

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

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

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

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

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

/* Custom button hover effects */
.hover-lift {
    transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Focus styles for accessibility */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom card shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Custom animations for modals */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-full-width {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: white !important;
    }
    
    .text-gray-600 {
        color: black !important;
    }
    
    .border-gray-300 {
        border-color: black !important;
    }
}

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

/* Custom styles for appointment status badges */
.status-badge {
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

/* Custom grid layout for responsive design */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Custom styles for form validation */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-success {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

/* Custom navbar styles */
.navbar-blur {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Custom button styles */
.btn-gradient {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Custom loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Custom styles for time slot selection */
.time-slot {
    transition: all 0.2s ease-in-out;
}

.time-slot:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.time-slot.selected {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #1d4ed8;
}

/* Custom styles for appointment cards */
.appointment-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.appointment-card:hover {
    border-left-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.appointment-card.confirmed {
    border-left-color: #22c55e;
}

.appointment-card.cancelled {
    border-left-color: #ef4444;
    opacity: 0.7;
}

.appointment-card.completed {
    border-left-color: #6366f1;
}

/* Custom styles for doctor cards */
.doctor-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.doctor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.doctor-card:hover::before {
    transform: scaleX(1);
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Custom notification styles */
.notification {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Custom calendar styles */
.calendar-day {
    transition: all 0.2s ease;
}

.calendar-day:hover:not(.disabled) {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.calendar-day.selected {
    background-color: #3b82f6;
    color: white;
}

.calendar-day.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Custom progress indicators */
.progress-step {
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #e5e7eb;
    transform: translateY(-50%);
}

.progress-step.completed::after {
    background-color: #22c55e;
}

.progress-step:last-child::after {
    display: none;
}

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

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

/* Custom toast notification positioning */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

/* Custom dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

/* Custom toggle switch styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #3b82f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .bg-white {
        background-color: #374151 !important;
    }
    
    .dark-mode .text-gray-900 {
        color: #f9fafb !important;
    }
    
    .dark-mode .border-gray-300 {
        border-color: #4b5563 !important;
    }
}

/* Mobile Navigation Styles */
.mobile-nav-item {
    transition: all 0.2s ease-in-out;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    touch-action: manipulation;
    overflow: visible; /* Allow for visual effects */
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: #2563eb;
}

.mobile-nav-item svg {
    transition: all 0.2s ease-in-out;
}

.mobile-nav-item.active svg,
.mobile-nav-item:hover svg {
    transform: scale(1.1);
}

/* Enhanced active state indicator */
.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 0 0 2px 2px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-8px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Mobile Bottom Navigation - Enhanced Design */
#mobileBottomNav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    height: 80px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    min-height: 60px;
    max-height: 80px;
}

#mobileBottomNav .flex {
    height: 100%;
    align-items: center;
    justify-content: space-evenly;
    padding: 0.5rem 0.75rem;
    min-height: 100%;
    gap: 0.25rem;
}

/* Mobile Navigation Items - Enhanced */
.mobile-nav-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    touch-action: manipulation;
    border-radius: 12px;
    padding: 0.5rem 0.25rem;
    flex: 1;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    /* Ensure minimum touch target size for accessibility */
    min-width: 44px;
    min-height: 44px;
}

.mobile-nav-item:active {
    transform: scale(0.95);
    background: rgba(59, 130, 246, 0.05);
}

.mobile-nav-item.active {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.08);
}

.mobile-nav-item:hover:not(.active) {
    color: #374151;
    background: rgba(0, 0, 0, 0.02);
}

.mobile-nav-item svg {
    transition: all 0.2s ease-in-out;
    margin-bottom: 0.125rem;
}

.mobile-nav-item.active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.mobile-nav-item span {
    font-size: 0.7rem;
    line-height: 1;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* Better spacing for very small screens */
@media (max-width: 360px) {
    .mobile-nav-item {
        padding-left: 0.125rem;
        padding-right: 0.125rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.55rem;
        line-height: 0.8;
    }
}

/* Responsive adjustments for very small screens */
@media (max-width: 320px) {
    .mobile-nav-item span {
        font-size: 0.6rem;
    }
    
    .mobile-nav-item .w-6 {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .mobile-nav-item svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 375px) {
    .mobile-nav-item {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.65rem;
    }
}

/* Responsive adjustments for larger mobile screens */
@media (min-width: 376px) and (max-width: 767px) {
    .mobile-nav-item {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.75rem;
    }
}

/* Mobile responsive improvements */
@media (max-width: 767px) {
    /* Optimize for safe area on devices with notches/rounded corners */
    #mobileBottomNav {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    /* Mobile-first layout - full screen experience */
    body {
        overflow-x: hidden;
    }
    
    /* Add padding bottom for mobile bottom navigation */
    main {
        padding-bottom: 80px;
    }
    
    /* Adjust view containers for mobile - full height without top bar */
    .view {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        padding-top: 0.5rem;
        padding-bottom: 1rem;
    }
    
    /* Mobile-specific optimizations */
    .mobile-optimized {
        width: 100%;
        touch-action: manipulation;
    }
    
    /* Enhanced touch targets for mobile */
    button, .cursor-pointer, .mobile-nav-item {
        min-height: 48px;
        min-width: 48px;
        position: relative;
    }
    
    /* Mobile-friendly card spacing */
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Mobile form improvements */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
        border-radius: 8px;
    }
    
    /* Mobile typography adjustments */
    .text-3xl {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .text-2xl {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    /* Enhanced mobile navigation with better visual feedback */
    .mobile-nav-item {
        position: relative;
        overflow: hidden;
    }
    
    .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #1d4ed8);
        transition: all 0.3s ease-in-out;
        transform: translateX(-50%);
        border-radius: 0 0 3px 3px;
    }
    
    .mobile-nav-item.active::before {
        width: 40px;
    }
    
    /* Mobile ripple effect */
    .mobile-nav-item::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(59, 130, 246, 0.1);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: all 0.3s ease-out;
    }
    
    .mobile-nav-item:active::after {
        width: 60px;
        height: 60px;
    }
    
    /* Optimize mobile spacing */
    .mobile-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile-specific shadows and elevation */
    .mobile-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
    }
    
    /* Improve mobile scrolling */
    .mobile-scroll {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Enhanced Mobile Navigation Styling */
@media (max-width: 767px) {
    #mobileBottomNav {
        /* Enhanced background with subtle gradient */
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
        /* Improved border */
        border-top: 1px solid rgba(229, 231, 235, 0.8);
        /* Better shadow for depth */
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06), 0 -1px 3px rgba(0, 0, 0, 0.1);
    }
    
    /* Ensure navigation items are evenly distributed */
    #mobileBottomNav .flex {
        display: flex;
        justify-content: space-evenly;
        align-items: stretch;
        width: 100%;
        height: 100%;
    }
    
    /* Enhanced navigation item styling */
    .mobile-nav-item {
        /* Better flex distribution */
        flex: 1 1 0%;
        /* Consistent max width to prevent stretching */
        max-width: calc(25% - 0.5rem);
        /* Better visual feedback */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Improved active state */
    .mobile-nav-item.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.08) 100%);
        border: 1px solid rgba(59, 130, 246, 0.2);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    }
    
    /* Better text sizing and spacing */
    .mobile-nav-item span {
        font-size: 0.6rem;
        font-weight: 500;
        letter-spacing: 0.025em;
        margin-top: 0.125rem;
    }
    
    /* Enhanced icon styling */
    .mobile-nav-item .w-6 {
        width: 1.25rem;
        height: 1.25rem;
        margin-bottom: 0.125rem;
    }
}

/* Very small screens optimization */
@media (max-width: 360px) {
    #mobileBottomNav {
        height: 70px;
        max-height: 70px;
    }
    
    .mobile-nav-item {
        min-height: 54px;
        padding: 0.375rem 0.125rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.55rem;
    }
    
    .mobile-nav-item .w-6 {
        width: 1rem;
        height: 1rem;
    }
}

/* Large mobile screens optimization */
@media (min-width: 430px) and (max-width: 767px) {
    .mobile-nav-item span {
        font-size: 0.7rem;
    }
    
    .mobile-nav-item .w-6 {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Prevent text selection on navigation items */
.mobile-nav-item,
.nav-link {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth transitions for view changes on mobile */
@media (max-width: 767px) {
    .view {
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateZ(0); /* Force hardware acceleration */
        will-change: opacity, transform;
    }
    
    .view.hidden {
        opacity: 0;
        pointer-events: none;
    }
    
    .view:not(.hidden) {
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Mobile-optimized scrolling */
    .mobile-scroll {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
    }
    
    /* Enhanced mobile input focus */
    input:focus, textarea:focus, select:focus {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    }
    
    /* Mobile-specific card animations */
    .mobile-card {
        transition: all 0.2s ease-in-out;
    }
    
    .mobile-card:active {
        transform: scale(0.98);
    }
    
    /* Improve mobile button feedback */
    .mobile-optimized:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Mobile-specific loading states */
    .mobile-loading {
        position: relative;
        overflow: hidden;
    }
    
    .mobile-loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        animation: shimmer 1.5s infinite;
    }
    
    @keyframes shimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
}

/* Enhanced responsive navigation */
@media (max-width: 767px) {
    /* Force hide desktop navigation on mobile when not hidden by JS */
    #desktopNavbar:not(.hidden) {
        display: none;
    }
    
    /* Ensure mobile navigation is properly positioned when not hidden by JS */
    #mobileBottomNav:not(.hidden) {
        display: flex;
    }
}

@media (min-width: 768px) {
    /* Force hide mobile navigation on desktop when not hidden by JS */
    #mobileBottomNav:not(.hidden) {
        display: none;
    }
    
    /* Ensure desktop navigation is visible when not hidden by JS */
    #desktopNavbar:not(.hidden) {
        display: block;
    }
    
    /* Remove mobile bottom padding on desktop */
    main {
        padding-bottom: 0 !important;
    }
}

/* Smooth navigation transitions */
#desktopNavbar,
#mobileBottomNav {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Enhanced responsive navigation for various screen orientations */
@media (max-width: 767px) and (orientation: landscape) {
    #mobileBottomNav {
        padding: 0.25rem 0;
        min-height: 50px;
    }
    
    .mobile-nav-item {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.6rem;
    }
    
    .mobile-nav-item .w-6 {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Very large mobile screens (tablets in portrait) */
@media (min-width: 480px) and (max-width: 767px) {
    .mobile-nav-item {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.8rem;
    }
    
    #mobileBottomNav {
        min-height: 70px;
    }
}

/* Touch target optimization for better accessibility */
@media (max-width: 767px) {
    .mobile-nav-item {
        min-height: 48px; /* WCAG recommended minimum touch target */
        min-width: 48px;
    }
}

/* Enhanced touch feedback for mobile navigation */
@media (max-width: 767px) {
    .mobile-nav-item {
        /* Add subtle border for better definition */
        border: 1px solid transparent;
        /* Improved transition for better user feedback */
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.1s ease-out;
    }
    
    /* Enhanced hover state (for devices that support hover) */
    .mobile-nav-item:hover:not(.active) {
        background: rgba(107, 114, 128, 0.05);
        border-color: rgba(107, 114, 128, 0.1);
        transform: translateY(-1px);
    }
    
    /* Better active press feedback */
    .mobile-nav-item:active {
        transform: scale(0.96) translateY(0);
        background: rgba(59, 130, 246, 0.1);
    }
    
    /* Enhanced active state with better visual hierarchy */
    .mobile-nav-item.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
        border-color: rgba(59, 130, 246, 0.3);
        color: #1d4ed8;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    
    /* Enhanced icon animation for active state */
    .mobile-nav-item.active svg {
        transform: scale(1.15);
        filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
    }
    
    /* Better text contrast for active state */
    .mobile-nav-item.active span {
        color: #1d4ed8;
        font-weight: 600;
    }
}

/* User Type Toggle Styles */
.user-type-toggle {
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    background-color: #f9fafb !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb;
}

.user-type-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.user-type-toggle:hover::before {
    left: 100%;
}

.user-type-toggle.active {
    background-color: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3) !important;
    transform: translateY(-1px);
    border-color: #3b82f6 !important;
}

.user-type-toggle:not(.active):hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    transform: translateY(-1px);
    border-color: #d1d5db !important;
}

/* Enhanced login form for different user types */
.login-form-container {
    position: relative;
    overflow: hidden;
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
    pointer-events: none;
}

/* Navigation hidden by JavaScript should stay hidden regardless of responsive rules */
#desktopNavbar.hidden,
#mobileBottomNav.hidden {
    display: none !important;
}

/* Enhanced responsive navigation */
@media (max-width: 767px) {
    /* Force hide desktop navigation on mobile when not hidden by JS */
    #desktopNavbar:not(.hidden) {
        display: none;
    }
    
    /* Ensure mobile navigation is properly positioned when not hidden by JS */
    #mobileBottomNav:not(.hidden) {
        display: flex;
    }
}

@media (min-width: 768px) {
    /* Force hide mobile navigation on desktop when not hidden by JS */
    #mobileBottomNav:not(.hidden) {
        display: none;
    }
    
    /* Ensure desktop navigation is visible when not hidden by JS */
    #desktopNavbar:not(.hidden) {
        display: block;
    }
    
    /* Remove mobile bottom padding on desktop */
    main {
        padding-bottom: 0 !important;
    }
}

/* Smooth navigation transitions */
#desktopNavbar,
#mobileBottomNav {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Enhanced responsive navigation for various screen orientations */
@media (max-width: 767px) and (orientation: landscape) {
    #mobileBottomNav {
        padding: 0.25rem 0;
        min-height: 50px;
    }
    
    .mobile-nav-item {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.6rem;
    }
    
    .mobile-nav-item .w-6 {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Very large mobile screens (tablets in portrait) */
@media (min-width: 480px) and (max-width: 767px) {
    .mobile-nav-item {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .mobile-nav-item span {
        font-size: 0.8rem;
    }
    
    #mobileBottomNav {
        min-height: 70px;
    }
}

/* Touch target optimization for better accessibility */
@media (max-width: 767px) {
    .mobile-nav-item {
        min-height: 48px; /* WCAG recommended minimum touch target */
        min-width: 48px;
    }
}

/* Enhanced touch feedback for mobile navigation */
@media (max-width: 767px) {
    .mobile-nav-item {
        /* Add subtle border for better definition */
        border: 1px solid transparent;
        /* Improved transition for better user feedback */
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.1s ease-out;
    }
    
    /* Enhanced hover state (for devices that support hover) */
    .mobile-nav-item:hover:not(.active) {
        background: rgba(107, 114, 128, 0.05);
        border-color: rgba(107, 114, 128, 0.1);
        transform: translateY(-1px);
    }
    
    /* Better active press feedback */
    .mobile-nav-item:active {
        transform: scale(0.96) translateY(0);
        background: rgba(59, 130, 246, 0.1);
    }
    
    /* Enhanced active state with better visual hierarchy */
    .mobile-nav-item.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
        border-color: rgba(59, 130, 246, 0.3);
        color: #1d4ed8;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    
    /* Enhanced icon animation for active state */
    .mobile-nav-item.active svg {
        transform: scale(1.15);
        filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
    }
    
    /* Better text contrast for active state */
    .mobile-nav-item.active span {
        color: #1d4ed8;
        font-weight: 600;
    }
}

/* User Type Toggle Styles */
.user-type-toggle {
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    background-color: #f9fafb !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb;
}

.user-type-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.user-type-toggle:hover::before {
    left: 100%;
}

.user-type-toggle.active {
    background-color: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3) !important;
    transform: translateY(-1px);
    border-color: #3b82f6 !important;
}

.user-type-toggle:not(.active):hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    transform: translateY(-1px);
    border-color: #d1d5db !important;
}

/* Enhanced login form for different user types */
.login-form-container {
    position: relative;
    overflow: hidden;
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
    pointer-events: none;
}