@font-face {
  font-family: "Schoolbell";
  src: url("fonts/Schoolbell.ttf") format("truetype");
  font-display: block;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #cfe7f6;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* The iPad screen, 1024×768 points; stage.ts scales it to the window. */
#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1024px;
  height: 768px;
  overflow: hidden;
  background: #cfe7f6 center / 100% 100% no-repeat;
  transform-origin: 50% 50%;
  box-shadow: 0 0 40px rgb(0 0 0 / 0.15);
}

/* UIColor(patternImage:) draws the @2x image at its point size from the top-left. */
.view {
  position: absolute;
  background: left top / auto 100% no-repeat;
}
.view.stretch { background-size: 100% 100%; }

.draggable { cursor: grab; touch-action: none; }
.draggable:active { cursor: grabbing; }
.moving-back { transition: left 0.3s, top 0.3s; }
.settling { transition: left 0.8s, top 0.8s; }

.attention { animation: attention 0.25s ease-in-out 2 alternate; }
@keyframes attention { to { transform: scale(1.4); } }

/* addReplayIntroButton: fades in after 3 s */
.replay { cursor: pointer; opacity: 0; animation: fade-in 1.5s 3s forwards; z-index: 50; }
@keyframes fade-in { to { opacity: 1; } }

/* addArrowAnimation: hover 10 points up and back */
.arrow { animation: hover 0.25s ease-in-out infinite alternate; }
@keyframes hover { to { translate: 0 -10px; } }

/* VooruitButton */
.vooruit-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
  border-radius: 10px;
  color: #fff;
  font: 40px/1 "Schoolbell", "Comic Sans MS", cursive;
  cursor: pointer;
}
.vooruit-button.start {
  border-radius: 100px;
  background: url(img/login_empty_circle.png) center / 100% 100%;
}
.vooruit-button.small { font-size: 30px; }
.vooruit-button:focus-visible { outline: 4px solid #1b6fd1; outline-offset: 4px; }

#rotate { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  #rotate {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #cfe7f6;
    font: 32px/1.2 "Schoolbell", "Comic Sans MS", cursive;
    color: #2a4a63;
    text-align: center;
  }
  #rotate img { width: 120px; animation: turn 2s ease-in-out infinite; }
  #rotate span { font-size: 22px; opacity: 0.7; }
  @keyframes turn { 50% { transform: rotate(90deg); } }
}

/* Parent screen: UIAlertController and a form sheet, iOS 12 style */
.dim {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.4);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: #000;
  -webkit-user-select: text;
  user-select: text;
}
.dim button { font: inherit; border: 0; background: none; cursor: pointer; color: #007aff; padding: 0; }
.dim button:disabled { color: #c7c7cc; cursor: default; }
.dim button:focus-visible { outline: 3px solid #007aff; outline-offset: -3px; }

.ios-alert {
  width: 270px;
  border-radius: 14px;
  background: rgb(248 248 248 / 0.97);
  text-align: center;
  overflow: hidden;
}
.ios-alert h2 { margin: 20px 16px 2px; font-size: 17px; font-weight: 600; }
.ios-alert p { margin: 0 16px 14px; font-size: 13px; }
.ios-field {
  box-sizing: border-box;
  width: calc(100% - 32px);
  margin: 0 16px 18px;
  padding: 5px 6px;
  border: 1px solid #c8c7cc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  touch-action: manipulation;
}
.ios-alert-buttons { display: flex; border-top: 1px solid #dbdbdf; }
.ios-alert-buttons button { flex: 1; height: 44px; }
.ios-alert-buttons button + button { border-left: 1px solid #dbdbdf; }
.dim .bold { font-weight: 600; }

.ios-sheet:focus { outline: none; }
.ios-sheet {
  width: 540px;
  height: 620px;
  border-radius: 10px;
  background: #efeff4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ios-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  background: #f7f7f7;
  border-bottom: 1px solid #c8c7cc;
}
.ios-nav h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ios-nav .ios-link { justify-self: end; font-weight: 600; }
.ios-body { overflow: auto; padding-bottom: 16px; touch-action: pan-y; }
.ios-header { margin: 24px 16px 6px; font-size: 13px; font-weight: 400; color: #6d6d72; text-transform: uppercase; min-height: 1px; }
.ios-group { background: #fff; border-top: 1px solid #c8c7cc; border-bottom: 1px solid #c8c7cc; }
.dim .ios-row {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 60px;
  padding: 8px 16px;
  text-align: left;
}
.dim .ios-row + .ios-row { border-top: 1px solid #c8c7cc; margin-left: 16px; width: calc(100% - 16px); padding-left: 0; }
.ios-label { display: flex; flex-direction: column; }
.ios-label small { color: #8e8e93; font-size: 15px; }
.dim .ios-choice { color: #000; min-height: 44px; }
.ios-choice[aria-pressed="true"]::after { content: "✓"; color: #007aff; font-weight: 600; }
.dim .ios-destructive { color: #ff3b30; justify-content: center; min-height: 44px; }
.ios-footer { margin: 8px 16px; font-size: 13px; color: #6d6d72; min-height: 1em; }
/* UIStepper */
.ios-stepper { display: flex; border: 1px solid #007aff; border-radius: 5px; overflow: hidden; flex: none; }
.ios-stepper button { width: 47px; height: 29px; font-size: 22px; line-height: 1; }
.ios-stepper button + button { border-left: 1px solid #007aff; }
.ios-stepper button:active:not(:disabled) { background: rgb(0 122 255 / 0.15); }
