/* How things enter. A modal rises 30px as it fades in over 0.25s and closes at once. Search and the
   bell's list fade in over 0.2s. On a phone, a panel that covers the screen rises 24px over 0.4s
   instead. The chat panel's fades and the phone panels' exits run from their controllers, which wait
   for them before hiding. Pressed buttons give a little, to 98%. Reduced motion turns all of it off
   (base.css and settings.css). */
:root {
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}

@keyframes cover-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

.modal[open],
.support-panel:not([hidden]) {
  animation: rise-in 0.25s var(--ease-out-cubic);
}

.search-dialog[open],
.search-dialog[open]::backdrop,
.notification-panel:not([hidden]) > * {
  animation: fade-in 0.2s linear;
}

.button,
.icon-button {
  transition: scale 0.15s var(--ease-standard);
}

.button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  scale: 0.98;
}

@media (max-width: 767px) {
  .search-dialog[open],
  .support-panel:not([hidden]) {
    animation: cover-in 0.4s var(--ease-out-expo);
  }

  .search-dialog[open]::backdrop {
    animation: none;
  }
}
