/* Educational Enterprise Interaction Excellence */
/* Global professional interactions for all pages */

/* ========================================
   SMOOTH TRANSITIONS (200ms)
   ======================================== */

/* Universal smooth transitions for interactive elements */
.btn, .card, .nav-link, .form-control, .form-select, .modal, 
.dropdown-menu, .alert, .badge, .list-group-item {
    transition: all 0.2s ease-in-out;
}

/* Navigation smooth transitions */
.navbar-nav .nav-link {
    transition: all 0.2s ease-in-out;
}

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

/* Modal smooth animations */
.modal.fade .modal-dialog {
    transition: transform 0.2s ease-in-out;
}

/* Form field transitions */
.form-control, .form-select {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* ========================================
   PROFESSIONAL HOVER STATES
   ======================================== */

/* Button hover excellence */
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    border-color: #1e40af;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* Card hover excellence */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(30, 58, 138, 0.2);
}

/* Navigation hover states */
.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transform: translateY(-1px);
}

.mobile-nav-link:hover {
    background-color: rgba(30, 58, 138, 0.1);
    border-radius: 6px;
    padding-left: 1.25rem;
}

/* List item hover */
.list-group-item:hover {
    background-color: rgba(30, 58, 138, 0.05);
    border-color: rgba(30, 58, 138, 0.2);
    transform: translateX(4px);
}

/* Dropdown hover */
.dropdown-item:hover {
    background-color: rgba(30, 58, 138, 0.1);
    transform: translateX(4px);
}

/* ========================================
   CLEAN FOCUS INDICATORS
   ======================================== */

/* Professional focus rings for accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* Navigation focus states */
.navbar-nav .nav-link:focus {
    outline: 2px solid rgba(30, 58, 138, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Modal focus management */
.modal:focus {
    outline: none;
}

.modal-header .btn-close:focus {
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* Form focus excellence */
.form-control:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    transform: none;
}

.form-select:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Skip links for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #1e3a8a;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
}

/* ========================================
   ELEGANT LOADING STATES
   ======================================== */

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(30, 58, 138, 0.2);
    border-radius: 50%;
    border-top-color: #1e3a8a;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading button state */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Skeleton loading for tables */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 1rem;
}

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

/* Progress indicator */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Form saving state */
.form-saving {
    opacity: 0.7;
    pointer-events: none;
}

.form-saving::after {
    content: 'Opslaan...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    color: #1e3a8a;
    z-index: 10;
}

/* ========================================
   PROFESSIONAL ANIMATIONS
   ======================================== */

/* Fade in animation for new content */
.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 from right for mobile menus */
.slide-in-right {
    animation: slideInRight 0.3s ease-in-out;
}

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

/* Pulse animation for important elements */
.pulse-once {
    animation: pulseOnce 0.6s ease-in-out;
}

@keyframes pulseOnce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Success feedback animation */
.success-feedback {
    animation: successPulse 0.5s ease-in-out;
}

@keyframes successPulse {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(34, 197, 94, 0.1);
    }
    100% {
        background-color: transparent;
    }
}

/* ========================================
   ENHANCED INTERACTIVE ELEMENTS
   ======================================== */

/* Professional cursor states */
.btn, .nav-link, .dropdown-item, .list-group-item-action {
    cursor: pointer;
}

.btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

/* Enhanced table row interactions */
.table tbody tr:hover {
    background-color: rgba(30, 58, 138, 0.05);
    transform: translateX(2px);
}

/* Interactive icons */
.fa:hover, .fas:hover, .far:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

/* Professional alert animations */
.alert {
    animation: slideDown 0.3s ease-in-out;
}

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

/* Enhanced modal entrance */
.modal.show .modal-dialog {
    animation: modalSlideIn 0.3s ease-in-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn:focus, .form-control:focus, .form-select:focus {
        outline: 3px solid;
        outline-offset: 2px;
    }
}