/* P1 motion. Reduced motion keeps a 120ms opacity change and skips travel. */
@view-transition { navigation: auto; }

.seg { position: relative; }
.seg .seg-thumb {
  position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 4px) / var(--n, 2));
  border-radius: 7px; background: var(--elevated); box-shadow: var(--shadow-sm);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 250ms cubic-bezier(.25, 1, .5, 1);
  pointer-events: none;
}
.phone .seg button[aria-selected="true"],
.phone .seg button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.seg button { position: relative; z-index: 1; }

.v20-strip.is-next { animation: strip-next 280ms cubic-bezier(.25, 1, .5, 1); }
.v20-strip.is-prev { animation: strip-prev 280ms cubic-bezier(.25, 1, .5, 1); }
.v20.is-next .v20-agenda, .v20.is-next .board, .v20.is-prev .v20-agenda, .v20.is-prev .board {
  animation: list-fade 160ms ease;
}
@keyframes strip-next { from { transform: translateX(28px); } }
@keyframes strip-prev { from { transform: translateX(-28px); } }
@keyframes list-fade { from { opacity: 0; } to { opacity: 1; } }

.is-settling { animation: settle 280ms cubic-bezier(.25, 1, .5, 1); }
@keyframes settle { from { transform: scale(.96); } to { transform: scale(1); } }

.toast { animation: toast-in 220ms cubic-bezier(.25, 1, .5, 1); overflow: hidden; }
@keyframes toast-in { from { transform: translate(-50%, 16px); opacity: 0; } }
.toast::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform-origin: left center; animation: drain 4s linear forwards;
}
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.hist.is-undone strong { animation: strike 200ms linear; text-decoration: line-through; }

::view-transition-group(day-pill) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(.25, 1, .5, 1);
}
/* The Calendario | Planes thumb slides with the locked switch timing. */
::view-transition-group(seg-Modo) {
  animation-duration: 250ms;
  animation-timing-function: cubic-bezier(.25, 1, .5, 1);
}
::view-transition-group(plan-hero) {
  animation-duration: 360ms;
  animation-timing-function: cubic-bezier(.32, .72, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  .seg .seg-thumb { transition: opacity 120ms linear; }
  .v20-strip.is-next, .v20-strip.is-prev, .is-settling, .toast, .hist.is-undone strong { animation: none; }
  .v20.is-next .v20-agenda, .v20.is-next .board, .v20.is-prev .v20-agenda, .v20.is-prev .board {
    animation: list-fade 120ms linear;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation-duration: 120ms;
  }
}
