/* VIEW TRANSITIONS*/

/* https://github.com/joomla/joomla-cms/pull/45787 */

/* enable View Transitions */
@media screen and (prefers-reduced-motion: no-preference) {
  @view-transition {navigation: auto;}
}

/* changes the duration of the global animation but not for Title and Image if we put (root).
But if we put (*) it will be for everything.
See https://developer.mozilla.org/en-US/docs/Web/CSS/::view-transition-group */
::view-transition-group(root) {
    animation-duration: 2s;
}

/* Apply the custom "slide" animation to the old and new page states. Without this we simply get a Fade */
::view-transition-old(root) {
  animation: 0.5s ease-in both move-out;
}
::view-transition-new(root) {
  animation: 0.5s ease-in both move-in;
}

/* Elements with NO animation. Attention: unique name for each Element of course */

header {view-transition-name: header;}
div.tm-toolbar {view-transition-name: tm-toolbar;}

/* Elements with animations */
#title-item1 {view-transition-name: call-out-title-1}
#title-item189 {view-transition-name: call-out-title-189}
#title-item190 {view-transition-name: call-out-title-190}
#title-item191 {view-transition-name: call-out-title-191}
#title-item192 {view-transition-name: call-out-title-192}

#img-item1 {view-transition-name: call-out-img-1}
#img-item189 {view-transition-name: call-out-img-189}
#img-item190 {view-transition-name: call-out-img-190}
#img-item191 {view-transition-name: call-out-img-191}
#img-item192 {view-transition-name: call-out-img-192}

/* defines a transition for my Title and my Image which is different from the default one */
::view-transition-group(call-out-title-1),
::view-transition-group(call-out-title-189),
::view-transition-group(call-out-title-190),
::view-transition-group(call-out-title-191),
::view-transition-group(call-out-title-192) {
  animation-duration: 1s;
  animation-timing-function: ease;
  z-index: 1;
}
::view-transition-group(call-out-img-1),
::view-transition-group(call-out-img-189),
::view-transition-group(call-out-img-190),
::view-transition-group(call-out-img-191),
::view-transition-group(call-out-img-192) {
  animation-duration: 1.5s;
  animation-timing-function: ease;
  z-index: 1;
}


/* defines our own animation */ 
@keyframes move-out {
  to {
    translate: 0 -100vh;
  }
}

@keyframes move-in {
  from {
    translate: 0 100vh;
  }
}


/* see https://www.bram.us/2025/05/31/supercharge-web-ux-with-view-transitions-2025-05-28-webexpo/ around 19'00" */
::view-transition {
    pointer-events: none;
}


/* otherwise navbar is semi-transparent */
.uk-navbar-container:not(.uk-navbar-transparent) {
  background: white;
}