/* Custom CSS for the Digital Profile Application */
/* Light and Dark Theme Support with Enhanced Visuals */

/* Glassmorphism Effects */
.backdrop-blur-xl {
    backdrop-filter: blur(16px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Toggle Switch Styles */
.toggle-bg {
    transition: background-color 0.3s ease;
}

.toggle-dot {
    transition: transform 0.3s ease;
    top: 2px;
    left: 2px;
}

/* When checkbox is checked */
input:checked + div .toggle-bg {
    background-color: #3b82f6;
}

.dark input:checked + div .toggle-bg {
    background-color: #60a5fa;
}

input:checked + div .toggle-dot {
    transform: translateX(22px);
    background-color: white;
}

/* Form validation styles */
.invalid-feedback {
    display: none;
}

.form-invalid .invalid-feedback {
    display: block;
}

/* Enhanced password toggle */
.toggle-password {
    transition: all 0.3s ease;
}

.toggle-password:hover {
    transform: scale(1.1);
}

/* Enhanced form focus states */
.group:hover input {
    border-color: rgba(59, 130, 246, 0.3);
}

.dark .group:hover input {
    border-color: rgba(96, 165, 250, 0.3);
}

/* Button hover effects with gradients */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Enhanced card shadows */
.card-shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dark .card-shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Enhanced transitions */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(50%);
}

/* Message animations */
.message-fade-in {
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced theme toggle button */
#theme-toggle {
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.dark #theme-toggle:hover {
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
}

/* Enhanced navigation */
.navbar-link {
    position: relative;
    overflow: hidden;
}

.navbar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.dark .navbar-link::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.navbar-link:hover::before {
    left: 100%;
}

/* DataTables dark theme compatibility */
.dark .dataTables_wrapper {
    color: #f3f4f6;
}

.dark .dataTables_wrapper .dataTables_filter input {
    background-color: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
    color: #f3f4f6;
    backdrop-filter: blur(8px);
}

.dark .dataTables_wrapper .dataTables_length select {
    background-color: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
    color: #f3f4f6;
    backdrop-filter: blur(8px);
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
    color: #f3f4f6;
    backdrop-filter: blur(8px);
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: rgba(75, 85, 99, 0.9);
    border-color: rgba(107, 114, 128, 0.7);
    transform: translateY(-2px);
}

/* Enhanced scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(243, 244, 246, 0.5);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid rgba(243, 244, 246, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

.dark ::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.5);
}

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #60a5fa, #a78bfa);
    border: 2px solid rgba(55, 65, 81, 0.5);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
}

/* Enhanced focus states for accessibility */
button:focus, input:focus, select:focus, textarea:focus, a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.dark button:focus, .dark input:focus, .dark select:focus, .dark textarea:focus, .dark a:focus {
    outline-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
}

/* Mobile responsive improvements */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .dark {
        filter: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-white\/80 {
        background-color: rgba(255, 255, 255, 0.95);
    }
    
    .dark .bg-gray-800\/80 {
        background-color: rgba(31, 41, 55, 0.95);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
