passkey-toast.css

4.1 KB · raw

1/* Palette — hardcoded equivalents of the popup's CSS vars (shadow DOM cannot2   inherit :root variables from the host page). */34.peach-passkey-toast {5  position: fixed;6  top: 16px;7  right: 16px;8  z-index: 2147483647;910  width: 260px;1112  background: #0C0A06;13  border: 0.5px solid rgba(240, 232, 216, 0.07);14  border-radius: 14px;15  box-shadow:16    0 4px 6px rgba(0, 0, 0, 0.4),17    0 12px 32px rgba(0, 0, 0, 0.55),18    0 0 0 0.5px rgba(0, 0, 0, 0.6);1920  overflow: hidden;2122  /* Initial state — hidden before animation */23  opacity: 0;24  transform: translateY(-12px) scale(0.96);25  pointer-events: none;2627  /* Font reset — page styles must not bleed in */28  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;29  font-size: 14px;30  line-height: 1.4;31  -webkit-font-smoothing: antialiased;32  box-sizing: border-box;33}3435.peach-passkey-toast * {36  box-sizing: border-box;37  margin: 0;38  padding: 0;39}4041.peach-passkey-toast.is-visible {42  animation: peach-passkey-in 280ms cubic-bezier(0, 0, 0, 1) forwards;43  pointer-events: auto;44}4546.peach-passkey-toast.is-exiting {47  animation: peach-passkey-out 200ms cubic-bezier(0.3, 0, 1, 1) forwards;48  pointer-events: none;49}5051@keyframes peach-passkey-in {52  from { opacity: 0; transform: translateY(-12px) scale(0.96); }53  to   { opacity: 1; transform: translateY(0) scale(1); }54}5556@keyframes peach-passkey-out {57  from { opacity: 1; transform: translateY(0) scale(1); }58  to   { opacity: 0; transform: translateY(-12px) scale(0.96); }59}6061/* Body — centered column */62.peach-passkey-toast-body {63  display: flex;64  flex-direction: column;65  align-items: center;66  padding: 16px 16px 14px;67  gap: 8px;68  text-align: center;69}7071/* Headline */72.peach-passkey-toast-headline {73  font-family: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;74  font-style: italic;75  font-size: 18px;76  font-weight: 300;77  color: #F0E8D8;78  line-height: 1.1;79  margin: 1px 0;80}8182/* User pill */83.peach-passkey-toast-user {84  font-family: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;85  font-size: 0.6875rem;86  color: rgba(240, 232, 216, 0.50);87  background: #1A1710;88  border: 1px solid rgba(240, 232, 216, 0.07);89  border-radius: 4px;90  padding: 3px 8px;91}9293.peach-passkey-toast-origin {94  color: #F0E8D8;95  overflow-wrap: anywhere;96}9798/* Countdown bar */99.peach-passkey-toast-countdown {100  width: 100%;101  height: 2px;102  background: rgba(240, 232, 216, 0.06);103  border-radius: 1px;104  overflow: hidden;105  margin-top: 2px;106}107108.peach-passkey-toast-countdown-bar {109  height: 100%;110  background: var(--peach-accent, #F49C70);111  border-radius: 1px;112  transform-origin: left;113  animation: peach-passkey-countdown linear forwards;114  /* animation-duration set inline */115}116117@keyframes peach-passkey-countdown {118  from { width: 100%; }119  to   { width: 0%; }120}121122/* Actions */123.peach-passkey-toast-actions {124  display: flex;125  gap: 8px;126  width: 100%;127}128129.peach-passkey-toast-btn {130  flex: 1;131  min-height: 32px;132  padding: 6px 9px;133  border-radius: 8px;134  border: none;135  font-size: 0.6875rem;136  font-weight: 500;137  cursor: pointer;138  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;139  letter-spacing: -0.01em;140  transition: filter 120ms ease, opacity 120ms ease, transform 120ms ease;141}142143.peach-passkey-toast-btn:focus {144  outline: none;145}146147.peach-passkey-toast-btn:focus-visible {148  outline: none;149  box-shadow: 0 0 0 2px #0C0A06, 0 0 0 4px color-mix(in srgb, var(--peach-accent, #F49C70) 50%, transparent);150}151152.peach-passkey-toast-btn:active {153  opacity: 0.75;154  transform: scale(0.97);155}156157.peach-passkey-toast-btn--deny {158  background: transparent;159  color: rgba(240, 232, 216, 0.50);160  border: 1px solid rgba(240, 232, 216, 0.07);161}162163.peach-passkey-toast-btn--deny:hover {164  color: rgba(240, 232, 216, 0.80);165  border-color: rgba(240, 232, 216, 0.12);166}167168.peach-passkey-toast-btn--signin {169  background: var(--peach-accent, #F49C70);170  color: rgba(0, 0, 0, 0.92);171  font-weight: 500;172  box-shadow:173    0 1px 0 rgba(255, 255, 255, 0.08) inset,174    0 3px 16px color-mix(in srgb, var(--peach-accent, #F49C70) 16%, transparent);175}176177.peach-passkey-toast-btn--signin:hover {178  filter: brightness(1.10) saturate(1.05);179}