/* flowers.css — the look of the spinning bouquet: a program running in a terminal.
   One typeface throughout, the kind where every letter is the same width, because the
   bouquet itself is made of letters laid out on a grid. */

:root {
  --ink: #05060c;                 /* the screen: almost black, with a breath of midnight blue */
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  /* --bleed: how far the real screen reaches below what the page was told. flowers.js
     measures it; it is 0 everywhere except an iPhone running the page from its home screen. */
  --bleed: 0px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html, body { background-color: var(--ink); }       /* also the colour a phone gives the edges of its screen */
body {
  overflow: hidden;
  font-family: var(--mono);
  color: #c9cbd6;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;                               /* dragging should turn the bouquet, not select text */
}

/* the bouquet's canvas fills the screen; everything else is laid over it */
#screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: calc(100% + var(--bleed));
  display: block;
  touch-action: none;                              /* a finger drags the bouquet instead of scrolling the page */
  cursor: grab;
}
#screen.is-held { cursor: grabbing; }

.prompt {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top) + 6px));
  left: 16px;
  right: 16px;
  margin: 0;
  font-size: .82rem;
  color: #8f93a6;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}
.prompt__sign { color: #6fbf73; }
/* the blinking block at the end of the line */
.caret { display: inline-block; width: .55em; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: #c9cbd6; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(max(14px, env(safe-area-inset-bottom) + 6px) - var(--bleed));
  padding: 0 12px;
  text-align: center;
  pointer-events: none;                            /* only the buttons inside take taps */
}
.foot p { margin: 0; }
.say { min-height: 1.3em; font-size: 1.02rem; font-weight: 700; color: #ff8fb6; transition: opacity .5s ease; }
.say.is-changing { opacity: 0; }
.from { margin-top: .25em !important; font-size: .84rem; color: #a9adbd; }
.keys { margin-top: .7em !important; font-size: .78rem; color: #6c7084; }
.status { margin-right: .6em; }
.keys button {
  margin: 0 .15em;
  padding: .5em .3em;                              /* small on screen, but a comfortable size to tap */
  border: 0;
  background: none;
  color: #9aa0b8;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}
.keys button:hover, .keys button:focus-visible { color: #fff; outline: none; }
.keys button:active { color: #ff8fb6; }
.tip { margin-top: .1em !important; font-size: .7rem; color: #555a6e; }

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .say { transition: none; }
}
