/* Hold-to-delete and the sign-in code slots. Their layout is here so it holds on My Path, which does not load Tailwind. */

.hold-delete { display: inline-block; }
button.hb-root {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: var(--hb-radius, 10px);
  background: var(--hb-bg);
  color: var(--hb-text);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 45%, var(--line));
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
}
button.hb-root > span:not(.hb-label) {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
button.hb-root > span:last-child {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
button.hb-root .hb-label { position: relative; z-index: 2; display: grid; place-items: center; }
button.hb-root .hb-label > span { grid-area: 1 / 1; white-space: nowrap; }
button.hb-root:not([data-phase="done"]) .hb-label > span:nth-child(2) { opacity: 0; }
button.hb-root[data-phase="done"] .hb-label > span:nth-child(1) { opacity: 0; }
button.hb-root .hb-fill,
button.hb-root .hb-crest {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--hb-fill);
  color: var(--hb-fill-text);
}
button.hb-root:focus-visible { outline: 2px solid var(--bad); outline-offset: 3px; }

.mg-code-slots { display: block; margin-top: 8px; }
.mg-code-slots > div {
  display: inline-flex;
  position: relative;
  gap: var(--cs-gap, 8px);
  cursor: text;
}
.mg-code-slots input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 16px;
  caret-color: transparent;
  opacity: 0;
}
.mg-code-slots input:focus { outline: none; border: 0; box-shadow: none; }
.mg-code-slots > div > span:nth-child(n+2):nth-child(-n+7) {
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--cs-size, 44px);
  height: var(--cs-height, 52px);
  overflow: hidden;
  border-radius: var(--cs-radius, 12px);
  background: var(--cs-slot, var(--paper-2));
  box-shadow: inset 0 0 0 1px var(--line);
}
.mg-code-slots > div > span:nth-child(n+2):nth-child(-n+7) > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
}
.mg-code-slots > div > span:nth-child(n+2):nth-child(-n+7) > span:first-child {
  background: var(--cs-accent, var(--brand-ink));
}
.mg-code-slots > div[data-status="error"] > span:nth-child(n+2):nth-child(-n+7) > span:first-child {
  background: var(--cs-danger, var(--bad));
}
.mg-code-slots > div > span:nth-child(n+2):nth-child(-n+7) > span:last-child {
  z-index: 2;
  font-size: var(--cs-font, 22px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--cs-digit, var(--paper));
}
.mg-code-slots > div > span:nth-child(n+2):nth-child(-n+7)[data-active] {
  box-shadow: inset 0 0 0 1.5px var(--brand-ink);
}
.mg-code-slots > div[data-status="error"] > span:nth-child(n+2):nth-child(-n+7) {
  box-shadow: inset 0 0 0 1.5px var(--bad);
}
.mg-code-slots > div > span:nth-child(8) {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  border-radius: var(--cs-radius, 12px);
  background: var(--cs-accent);
  color: var(--cs-digit);
}
.mg-code-slots > div > span:nth-child(9) {
  position: absolute;
  top: 25%;
  left: calc(var(--cs-size, 44px) / 2 - 0.75px);
  z-index: 3;
  width: 1.5px;
  height: 50%;
  opacity: 0;
  pointer-events: none;
}
.mg-code-slots > div > span:nth-child(9)[data-show] { opacity: 1; }
.mg-code-slots > div > span:nth-child(9) > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cs-ink, var(--ink));
  animation: code-slots-blink 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .mg-code-slots > div > span:nth-child(9) > span { animation: none; }
}
