/**
 * Snap Mode heads-up notice.
 *
 * Loaded alongside the app bundle rather than compiled into it — see snap-notice.js for why.
 * Everything is namespaced under .snap-notice so it cannot collide with the bundle's own CSS.
 *
 * Pinned to the viewport, not the toolbar: the toolbar wraps at narrow widths and sits in a
 * scrolling column, so an in-flow notice would shove the canvas down the moment it appeared —
 * moving the very control the user just clicked.
 */
@keyframes snap-notice-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.snap-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 0);
  /* Above the slice chrome, whose highest layer is 105. */
  z-index: 300;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  /* Never wider than the phone it is on, never wider than one comfortable line on desktop. */
  max-width: 520px;
  max-width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d9dee4;
  /* One quiet accent edge instead of a coloured fill: this is information, not an alarm. */
  border-left: 3px solid #4a6fa5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  color: #2b3138;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  animation: snap-notice-in 180ms ease-out;
}

.snap-notice-text {
  flex: 1 1 auto;
}

.snap-notice-close {
  flex: 0 0 auto;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #7a828b;
  font-size: 18px;
  line-height: 1.1;
  cursor: pointer;
}

.snap-notice-close:hover,
.snap-notice-close:focus {
  color: #2b3138;
}

@media (prefers-reduced-motion: reduce) {
  .snap-notice {
    animation: none;
  }
}
