/* Motion confirms interaction and keeps the compact navigation continuous. */
.design-workspace {
  --motion-feedback: 140ms;
  --motion-reveal: 180ms;
  --motion-rail: 220ms;
  --motion-ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .design-workspace :is(.primary, .quiet, .alerts-button, .request,
    .notification, .person-row, .dash-request, .segments button,
    .tabs button, .calendar-day button[data-g-event], .month-picker-grid button) {
    transition: background-color var(--motion-feedback) ease,
      border-color var(--motion-feedback) ease,
      color var(--motion-feedback) ease,
      box-shadow var(--motion-feedback) ease;
  }

  .design-workspace :is(input, textarea, select) {
    transition: border-color var(--motion-feedback) ease,
      background-color var(--motion-feedback) ease;
  }

  .design-workspace .account-control > #preview-options::after {
    transition: transform var(--motion-reveal) var(--motion-ease);
  }

  .design-workspace .account-control > #preview-options[aria-expanded="true"]::after {
    transform: rotate(225deg);
  }

  .design-workspace :is(.account-menu:not([hidden]), .month-picker-popup) {
    animation: grt-disclosure-reveal var(--motion-reveal) var(--motion-ease);
  }

  .design-workspace #calendar-event-dialog[open] {
    animation: grt-surface-reveal var(--motion-reveal) var(--motion-ease);
  }

  .design-workspace #calendar-event-dialog[open]::backdrop {
    animation: grt-backdrop-reveal var(--motion-reveal) ease-out;
  }

  .design-workspace #feedback:not(:empty) {
    animation: grt-surface-reveal var(--motion-reveal) var(--motion-ease);
  }
}

/* Explicit expansion keeps the rail stable while calendar content scrolls. */
@media(min-width:951px) and (prefers-reduced-motion:no-preference){
 .design-workspace .sidebar{transition:width var(--motion-rail) var(--motion-ease),box-shadow var(--motion-rail) ease}
 .design-workspace .sidebar nav a>span,.design-workspace .sidebar .profile>span:not(.avatar){transition:opacity var(--motion-feedback) ease}
}

@keyframes grt-disclosure-reveal {
  from { opacity: .5; clip-path: inset(0 0 8% round 12px); }
  to { opacity: 1; clip-path: inset(0 round 12px); }
}

@keyframes grt-surface-reveal {
  from { opacity: .55; }
  to { opacity: 1; }
}

@keyframes grt-backdrop-reveal {
  from { background-color: #18243a00; }
  to { background-color: #18243a66; }
}

/* Keep hover and focus feedback immediate, without spatial movement. */
@media (prefers-reduced-motion: reduce) {
  .design-workspace *,
  .design-workspace *::before,
  .design-workspace *::after,
  .design-workspace *::backdrop {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
