/* BoboEdu: blink-game.css
   Blink preview cards, answer states, reading fuse and timer. */

.bcard {
  position: relative;
  perspective: 1400px;
}
.bcard .inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.bcard.on .inner {
  transform: rotateY(180deg);
}
.bcard .face {
  min-height: 236px;
}
.bcard .face.front {
  grid-template-rows: auto;
  align-content: stretch;
  gap: 14px;
}
.bcard .face.front .tag {
  margin-bottom: 4px;
}
.blink-context {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.blink-explanation {
  margin-top: 16px;
}
.bfact {
  margin: 0;
  align-self: start;
  max-width: 32ch;
  text-wrap: balance;
  overflow-wrap: break-word;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.bfact-long {
  font-size: clamp(19px, 2.5vw, 25px);
  line-height: 1.3;
  max-width: 40ch;
}
.bcard .face.back {
  grid-template-rows: auto auto 1fr;
  align-content: stretch;
  padding-top: 18px;
}
.bcard .face.back .btimer {
  align-self: end;
}
.bcard .face.back .tag {
  margin-bottom: 22px;
}
.bcard .face.back .prompt {
  font-size: clamp(22px, 2.7vw, 28px);
}
.bcard .tap {
  font-size: 14px;
  color: var(--muted);
}

/* The whole card is a button while the clue shows: tap it to flip early */
.bskip {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.bskip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* The fuse burns down while you read */
.fuse {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fuse .track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}
.fuse .burn {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: var(--ink);
  transform-origin: left center;
}
.fuse .n {
  min-width: 1ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fuse.low .burn {
  background: var(--flame);
}
.fuse.low .n {
  color: var(--flame);
}

/* Answers, dealt in as the card lands */
.bask {
  display: grid;
  gap: 20px;
}
.bask:empty {
  display: none;
}
.bopts.fresh .opt {
  animation: bl-deal 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(0.32s + var(--i, 0) * 60ms);
}
@keyframes bl-deal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* After answering: the clue and correct answer, one above the other */
.pair {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.pair p {
  display: grid;
  gap: 1px;
}
.pair .k {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* "Clue shows for" setting, on the rules screen and in the side panel */
.bltime {
  display: grid;
  gap: 6px;
  justify-items: start;
}
.bltime .lab {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .bopts.fresh .opt {
    animation: none;
  }
}
