@@ -4996,6 +4996,10 @@ class FastSearchCard extends HTMLElement {
49964996
49974997 showCategoryButtons() {
49984998 this.collapsePanel();
4999+
5000+ // ✅ DEBUG: Was ist der Zustand VOR der Animation?
5001+ console.log('🔍 BEFORE showCategoryButtons:');
5002+ this.debugCategoryButtons();
49995003
50005004 if (this.isMobile()) {
50015005 const searchWrapper = this.shadowRoot.querySelector('.search-panel');
@@ -5005,16 +5009,63 @@ class FastSearchCard extends HTMLElement {
50055009 }
50065010
50075011 const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
5012+
5013+ // ✅ VOLLSTÄNDIGES RESET
5014+ this.resetAllCategoryStyles();
5015+
50085016 this.isMenuView = true;
50095017 categoryButtons.classList.add('visible');
50105018
5011- // ✅ SICHERHEITS-RESET vor neuer Animation
5012- this.resetCategoryButtonStyles( );
5013-
5014- // 🌊 RIPPLE EFFECT ANIMATION
5015- this.animateRippleEffect(categoryButtons );
5019+ setTimeout(() => {
5020+ console.log('🔍 AFTER reset, BEFORE animation:' );
5021+ this.debugCategoryButtons();
5022+ this.animateRippleEffect(categoryButtons);
5023+ }, 50 );
50165024 }
50175025
5026+ resetAllCategoryStyles() {
5027+ const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
5028+ const buttons = categoryButtons?.querySelectorAll('.category-button');
5029+
5030+ if (categoryButtons) {
5031+ categoryButtons.style.opacity = '';
5032+ categoryButtons.style.transform = '';
5033+ categoryButtons.style.display = '';
5034+ }
5035+
5036+ if (buttons) {
5037+ buttons.forEach(button => {
5038+ button.style.opacity = '';
5039+ button.style.transform = '';
5040+ button.style.filter = '';
5041+ button.style.transition = '';
5042+ button.style.boxShadow = '';
5043+ button.style.background = '';
5044+ });
5045+ }
5046+ }
5047+
5048+ debugCategoryButtons() {
5049+ const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
5050+ const buttons = categoryButtons?.querySelectorAll('.category-button');
5051+
5052+ console.log('🔍 DEBUG Category Buttons:');
5053+ console.log('isMenuView:', this.isMenuView);
5054+ console.log('Container classes:', categoryButtons?.className);
5055+ console.log('Container opacity:', categoryButtons?.style.opacity);
5056+ console.log('Container display:', categoryButtons?.style.display);
5057+
5058+ if (buttons) {
5059+ buttons.forEach((button, index) => {
5060+ console.log(`Button ${index}:`, {
5061+ opacity: button.style.opacity,
5062+ transform: button.style.transform,
5063+ filter: button.style.filter
5064+ });
5065+ });
5066+ }
5067+ }
5068+
50185069 resetCategoryButtonStyles() {
50195070 const categoryButtons = this.shadowRoot.querySelector('.category-buttons');
50205071 const buttons = categoryButtons?.querySelectorAll('.category-button');
0 commit comments