/* Animate compositor properties only; never animate page padding or dimensions. */
#app-page-content {
  contain: paint;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: none !important;
}

html[data-imart-page-transition] #app-page-content {
  pointer-events: none;
}
[data-imart-motion-surface] { animation: none !important; }
[data-imart-motion-surface] > .imart-order-modal { animation: none !important; }

.imart-drawer-panel {
  animation: none !important;
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
}
[data-imart-motion-surface="drawer"] {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.imart-page-veil { position: fixed; z-index: 900; pointer-events: none; opacity: 0; }

dialog[data-imart-dialog] { animation: none !important; }
dialog[data-imart-dialog]::backdrop { animation: imart-backdrop-in 240ms ease-out both; }
dialog[data-imart-dialog][data-imart-closing]::backdrop { animation: none; opacity: 0; transition: opacity 180ms ease; }
@keyframes imart-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

/* No continuous layout transition on a freshly opened iframe or its host. */
.imart-product-search-frame { background: #f5f9fd; }
.imart-guide-portal { position: absolute; inset: 80px 0 72px; min-height: 0; background: #f5f9fd; }
.imart-guide-portal iframe { display: block; width: 100%; height: 100%; border: 0; background: #f5f9fd; }

/* Silky-Smooth Instant Tactile Micro-Interactions (Zero-Lag Snappy Architecture) */
button,
.button,
[role="button"],
a[role="button"],
a[href],
summary,
a.intro-contact,
a.intro-more,
.start-card,
.home-category-rail button,
.branch-open-header-button,
.income-career-nav button,
[data-testid^="bottom-nav-"],
.bottom-nav-item,
.imart-drawer-panel [onClick],
.imart-drawer-panel div[style*="cursor: pointer"],
.imart-drawer-panel div[style*="cursor:pointer"],
.interactive-tap,
.quick-action-btn,
.gds-floating-chat-trigger,
.imt-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent !important;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.12s ease !important;
  will-change: transform;
}

button:active:not(:disabled),
.button:active:not(:disabled),
[role="button"]:active:not([aria-disabled="true"]),
a[role="button"]:active,
a[href]:active,
summary:active,
a.intro-contact:active,
a.intro-more:active,
.start-card:active,
.home-category-rail button:active,
.branch-open-header-button:active,
.income-career-nav button:active,
[data-testid^="bottom-nav-"]:active,
.bottom-nav-item:active,
.imart-drawer-panel [onClick]:active,
.imart-drawer-panel div[style*="cursor: pointer"]:active,
.imart-drawer-panel div[style*="cursor:pointer"]:active,
.interactive-tap:active,
.quick-action-btn:active,
.gds-floating-chat-trigger:active,
.imt-btn:active {
  transform: scale(0.97) translate3d(0, 1px, 0) !important;
}

/* Tactile bounce for drawer navigation items */
.imart-drawer-panel div[onClick],
.imart-drawer-panel [data-nav-item] {
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.12s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

.imart-drawer-panel div[onClick]:active,
.imart-drawer-panel [data-nav-item]:active {
  transform: scale(0.975) translate3d(3px, 0, 0) !important;
}

/* Glass backdrop blur for modals and overlays */
[data-imart-motion-surface="modal"],
[data-imart-presence="modal"] {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
  dialog[data-imart-dialog]::backdrop { animation: none !important; }
  .imart-drawer-panel { animation: none !important; }
  html { scroll-behavior: auto !important; }
  button, .button, [role="button"], [data-testid^="bottom-nav-"], .imart-drawer-panel div[onClick] {
    transition: none !important;
    transform: none !important;
  }
}
