/**
 * scene_menu_styles.css
 * Styles and animations for KIAS Scene Menu System
 */

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

/* Menu Panel Animations */
#kias-scene-menu-panel {
    animation: slideInUp 0.3s ease;
}

/* Section hover glow effect */
.section-header:hover {
    box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.2);
}

/* Menu item active state */
.menu-item.active {
    background: linear-gradient(90deg, #667eea33 0%, transparent 100%) !important;
    border-left-color: #667eea !important;
    font-weight: 600 !important;
}

.menu-item.active span:first-child {
    color: white !important;
}

/* Loading spinner for menu items */
.menu-item.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* Smooth expand/collapse */
.section-content {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge pulse on hover */
.menu-item:hover .badge {
    animation: pulse 1.5s infinite;
}

/* Scrollbar styling for Firefox */
#menu-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.6) rgba(0, 0, 0, 0.2);
}

/* Custom scrollbar for WebKit browsers */
#menu-content::-webkit-scrollbar {
    width: 6px;
}

#menu-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#menu-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

#menu-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7b8ff5 0%, #8a5ab3 100%);
}

/* Minimize animation */
#kias-scene-menu-panel.minimized {
    max-height: 60px !important;
    transition: max-height 0.3s ease;
}

#kias-scene-menu-panel.minimized #menu-content {
    display: none;
}

/* Dragging state */
.dragging {
    cursor: grabbing !important;
    user-select: none;
}

/* Notification toast styles */
.kias-notification {
    animation: slideInUp 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.kias-notification.closing {
    animation: slideOutDown 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #kias-scene-menu-panel {
        width: 90% !important;
        max-width: 340px;
        right: 5% !important;
        left: 5% !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #kias-scene-menu-panel {
        border-width: 2px;
    }
    
    .section-header {
        border-left-width: 4px;
    }
}

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