/**
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

BODY {
  font-family:
    Helvetica,
    Arial,
    Sans Serif;
  margin: 0;
  padding: 0;
}

BUTTON {
  cursor: pointer;
}

#main {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background-color: #dddde0;

  display: flex;
  flex-direction: column;
  align-items: center;
}

#messagebox {
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  vertical-align: middle;
  border-top: 1px solid #aaa;
  padding: 1vh;
  color: #000;
  font-size: 3vh;
  color: #767676;
  background-color: #fff;
  margin-top: 10px;
}

#messagebox.info {
  color: #009;
  background-color: #ffa;
}

#messagebox.error {
  color: #a40;
  background-color: #ffa;
}

#messagebox.fadeout {
  transition:
    background-color ease-in 1s,
    color ease-in 1s;
  color: #777;
  background-color: #fff;
}

.waiting {
  color: #555;
  font-size: 2vh;
  font-weight: bold;
  text-align: center;
  margin-top: 15px;
}

/*
==================================================================================
Signup splash page
==================================================================================
*/

#signupview {
  flex-grow: 1;
  box-sizing: border-box;
  max-width: 50em;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 20px;
  overflow: scroll;
  color: #333;
  font-size: 16px;

  display: flex;
  flex-direction: column;
}

#signupview .title {
  color: #111;
  font-weight: bold;
  font-size: 24px;
  margin-bottom: 10px;
}

#signupview .intro DIV {
  margin-bottom: 0.5em;
}

#signupview DIV.questionbox {
  color: #333;
  background-color: #f8f8f8;
  border: 1px solid #aaa;
  padding: 20px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1em 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
  column-gap: 5px;
  align-items: start;
  justify-items: start;
}

#signupview .questionbox .questiontext {
  font-weight: bold;
  grid-row: 1;
  grid-column: 1 / span 2;
}

#signupview .questionbox .row1 {
  margin-top: 5px;
  grid-row: 2;
}

#signupview .questionbox .row2 {
  margin-top: 5px;
  grid-row: 3;
}

#signupview .questionbox INPUT {
  grid-column: 1;
}

#signupview .questionbox INPUT.checkbox {
  margin-top: 8px;
  width: 20px;
}

#signupview .questionbox LABEL {
  grid-column: 2;
  margin-left: 10px;
}

#signupview .questionbox BUTTON {
  grid-row: 4;
  grid-column: 1 / span 2;
  margin-top: 10px;
  padding: 4px 15px 4px 15px;

  font-weight: bold;
  font-size: 20px;
}

#signupview .questionbox .accountexplain {
  margin-top: 10px;
  grid-row: 5;
  grid-column: 1 / span 2;
  font-size: 14px;
  color: #555;
}

/* Signup page for phones */
@media (orientation: portrait) {
  #signupview {
    max-width: 100vw;
    border: 0;
    margin: 0;
  }
}

/*
==================================================================================
Interest form
==================================================================================
*/

#interestform {
  width: 100%;
  flex-grow: 1;
  overflow-y: scroll;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border: 0;
  align-items: center;
}

.interestformscroll {
  flex-grow: 1;
  box-sizing: border-box;
  max-width: 50em;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 20px;
  color: #333;

  display: flex;
  flex-direction: column;
}

#interestform .title {
  color: #111;
  font-weight: bold;
  font-size: 24px;
}

#interestform .sectiontitle {
  margin: 20px 0 5px 0;
  font-weight: bold;
  font-size: 20px;
}

#interestform .formbox {
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid #aaa;
  background-color: #f8f8f8;
}

#interestform .forminfobox {
  margin-bottom: 10px;
}

#interestform .fieldname {
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 16px;
  color: #000;
}

#interestform .required {
  margin-left: 5px;
  color: #c00;
}

#interestform .optional {
  margin-left: 3px;
  font-size: 13px;
  font-style: italic;
  color: #333;
}

#interestform .fielddescription {
  margin-bottom: 5px;
  font-size: 13px;
  color: #555;
}

#interestform INPUT.formtext {
  width: 35em;
  padding: 5px;
  font-size: 16px;
}

#interestform .checkboxrow {
  display: flex;
  column-gap: 5px;
  align-items: start;
}

#interestform .checkboxrow LABEL {
  font-size: 16px;
  color: #000;
}

#interestform .checkboxrow .formtext {
  width: 25em;
  padding: 2px;
}

#interestform input[type="checkbox"] {
  height: 20px;
  flex: 0 0 20px;
  margin-right: 5px;
}

#interestform input[type="radio"] {
  height: 20px;
  flex: 0 0 20px;
  margin-right: 5px;
}

#interestform .formerror {
  border: 2px solid #c00;
  filter: drop-shadow(0 0 20px #f99);
}

#interestform INPUT[type="checkbox"].formerror {
  border: 2px solid #c00;
  filter: drop-shadow(0 0 3px #f00);
}

#interestform .ifbuttons {
  display: flex;
  align-items: center;
}

#interestform .ifbuttons BUTTON {
  margin-right: 10px;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 14px;
}

#interestform .ifbuttons BUTTON.next {
  margin-right: 20px;
  font-size: 22px;
  font-weight: bold;
}

/* Interest form page for phones */
@media (orientation: portrait) {
  .interestformscroll {
    max-width: 100vw;
    border: 0;
    padding: 10px;
    margin: 0;
  }

  #interestform INPUT.formtext {
    width: calc(100vw - 44px);
  }
}

/*
==================================================================================
Consent forms
==================================================================================
*/

#consentview {
  flex-grow: 1;
  box-sizing: border-box;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 20px;
  overflow: hidden;
  color: #333;

  display: flex;
  flex-direction: column;
}

#consentview .title {
  color: #111;
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 10px;
}

#consentview .wholine {
  color: #555;
  font-size: 14px;
  margin-bottom: 10px;
}

#consentview .consentarea {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#consentview .consentarea .consentscroll {
  box-sizing: border-box;
  flex-grow: 1;
  border: 1px solid #aaa;
  width: calc(100vw - 96px);
  overflow: scroll;
  background-color: #fff;
  color: #000;
  padding: 8px;
}

#consentview .consentarea .consentbox {
  margin: 8px 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

#consentview .consentbox LABEL {
  margin: 0 0 0 5px;
}

#consentview .consentbox INPUT {
  margin: 0;
}

#consentview .buttonbox BUTTON {
  padding: 4px 10px 4px 10px;
  margin-right: 10px;
  font-size: 18px;
}

#consentview .buttonbox BUTTON.next {
  margin-right: 20px;
  font-size: 22px;
  font-weight: bold;
}

#consentview #agreementusername {
  margin-left: 5px;
  width: 20em;
  padding: 5px;
  font-size: 14px;
}

#consentview INPUT.formerror {
  border: 2px solid #c00;
  filter: drop-shadow(0 0 20px #f99);
}

/* Consent form page for phones */
@media (orientation: portrait) {
  #consentview {
    width: 100vw;
    border: 0;
    padding: 5px;
    margin: 0;
  }

  #consentview .consentarea .consentscroll {
    width: calc(100vw - 10px);
  }

  #consentview .consentarea .consentbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
}

/*
==================================================================================
Instructions view
==================================================================================
*/

#instructionview {
  flex-grow: 1;
  max-width: 50em;
  box-sizing: border-box;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 20px;
  overflow: scroll;
  color: #444;
  background-color: #fff;

  display: flex;
  flex-direction: column;
  align-items: center;
}

#instructionview .title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 4px;
  text-align: center;
}

#instructionview .helptext {
  font-size: 18px;
  text-align: left;
}

#instructionview .helptext LI {
  font-size: 18px;
  margin-bottom: 4px;
}

#instructionview .video {
  margin-top: 15px;
}

#instructionview .video IFRAME {
  width: calc(min(560px, 100vw - 40px));
  height: calc(min(315px, 0.5625 * (100vw - 40px)));
}

#instructionview button {
  font-size: 20px;
  margin-top: 10px;
}

#instructionview BUTTON {
  margin-top: 10px;

  height: 50px;
  border-radius: 25px;
  padding: 0 30px 0 30px;
  font-size: 22px;
  font-weight: bold;
  border: 3px solid #66e;
  background-color: #00b;
  color: #fff;
}

/* Instructions page for phones */
@media (orientation: portrait) {
  #instructionview {
    max-width: 100vw;
    width: 100vw;
    padding: 10px 0 10px 0;
    margin: 0;
  }

  #instructionview .title,
  #instructionview .helptext {
    margin-left: 10px;
    margin-right: 10px;
    align-self: center;
  }

  #instructionview .video IFRAME {
    width: 100vw;
    height: calc(0.5625 * 100vw);
  }
}

/*
==================================================================================
Setup and permissions view
==================================================================================
*/

#setupview {
  max-width: 90vw;
  box-sizing: border-box;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 20px;
  overflow: hidden;
  color: #222;
  background-color: #fff;

  display: flex;
  flex-direction: column;
  align-items: center;
}

#setupview.askingpermission {
  margin-top: 25vh;
}

#setupview.success {
  background-color: #eef;
  color: #008;
}

#setupview.blocked {
  background-color: #fec;
  color: #400;
}

#setupview .title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 4px;
}

#setupview .buttonrow {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 15px;
  justify-content: center;
  align-items: center;
}

#setupview BUTTON {
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  font-weight: bold;
}

#setupview BUTTON:disabled {
  cursor: not-allowed;
}

#setupview BUTTON.start {
  min-width: 15vw;
  height: 50px;
  border-radius: 25px;
  padding: 0 30px 0 30px;
  font-size: 22px;
  border: 3px solid #66e;
  background-color: #00b;
  color: #fff;
}

#setupview BUTTON.start:disabled {
  border: 3px solid #eee;
  background-color: #ccc;
  color: #fff;
}

#setupview BUTTON.settings {
  height: 30px;
  min-width: 10em;
  border-radius: 15px;
  padding: 0 20px 0 20px;
  font-size: 14px;
  border: 2px solid #aaa;
  background-color: #ccc;
  color: #333;
}

#setupview BUTTON.ask {
  width: 15vw;
  min-width: 10em;
  height: 50px;
  border-radius: 25px;
  padding: 0 20px 0 20px;
  font-size: 20px;
  border: 3px solid #d62;
  background-color: #a52;
  color: #fee;
}

#setupview BUTTON.logout {
  border-radius: 15px;
  height: 30px;
  padding: 0 20px 0 20px;
  border: 3px solid #fcaeae;
  background-color: #e02c2c;
  color: white;
  font-weight: bold;
}

#setupview .requesttext {
  color: #000;
  margin: 10px 0 10px 0;

  padding: 40px;
  font-size: 20px;
}

#setupview .deniedtext {
  margin: 10px 0 10px 0;
  font-size: 18px;
  padding: 40px;
}

#setupview .successtext {
  padding: 40px;
  font-size: 18px;
}

#setupview .micsettings {
  color: #000;

  padding: 40px;
  font-size: 18px;

  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#setupview .micsettings .devices.disabled {
  color: #aaa;
}

#setupview .micsettings .devices {
  margin: 10px 0 0 15px;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 5px;
}

#setupview .micsettings .savebuttonrow {
  margin-top: 35px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 15px;
  row-gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

#setupview .micsettings .savebuttonrow BUTTON.save,
#setupview .micsettings .savebuttonrow BUTTON.cancel {
  height: 30px;
  min-width: 10em;
  border-radius: 15px;
  padding: 0 20px 0 20px;
  font-size: 15px;
  border: 2px solid #aaa;
  background-color: #ccc;
  color: #333;
}

#setupview .micsettings .savebuttonrow BUTTON.save {
  height: 30px;
  min-width: 10em;
  border-radius: 15px;
  padding: 0 20px 0 20px;
  font-size: 15px;
  border: 2px solid #00f;
  background-color: #00a;
  color: #fff;
}

#setupview .micsettings .savebuttonrow BUTTON:disabled {
  border: 2px solid #ddd;
  background-color: #999;
  color: #fff;
}

/* Mic settings page for phones */
@media (orientation: portrait) {
  #setupview .micsettings {
    padding: 20px 0 20px 0;
  }
}

/*
==================================================================================
Recording view
==================================================================================
*/

#recordingview {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;

  z-index: 80; /* This seems to persuade Safari iOS 13 to be less buggy */
}

#recordingview BUTTON {
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  font-weight: bold;
}

#recordingview BUTTON:disabled {
  cursor: not-allowed;
}

#recordingview .cardribbon {
  margin-top: 5vh;
  width: calc(3 * 80vw + 10vw);
  min-width: calc(3 * 80vw + 10vw);
  display: flex;
  overflow: hidden;
}

#recordingview .cardribbon .thiscard {
  margin: 0 5vw 0 5vw;
  font-weight: bold;
  font-size: 5vh;

  display: flex;
  align-items: center;
  justify-content: center;
}

#recordingview .cardribbon .prevcard {
  cursor: pointer;
}

#recordingview .cardribbon .nextcard {
  cursor: pointer;
}

#recordingview .card {
  box-sizing: border-box;
  width: 80vw;
  min-width: 80vw;
  height: 60vh;
  min-height: 60vh;
  padding: 3vh;
  color: rgba(0, 0, 80, 1);
  background-color: #eef;
  border: 3px solid #bbd;
}

#recordingview .card.recorded {
  color: rgba(60, 60, 60, 1);
  background-color: #eeeef4;
  border-color: #bbbbc2;
}

#recordingview .card.imagecard {
  display: flex;
  flex-direction: column;

  padding: 1vh;
  margin: 0 5vw 0 5vw;
}

#recordingview .card.imagecard DIV.text {
  flex-grow: 0;
  font-weight: bold;
  font-size: 2vh;
  margin-bottom: 1vh;
}

#recordingview .card.imagecard DIV.image {
  flex-grow: 1;
  width: calc(100% - 0.5vh);
  height: calc(100% - 0.5vh);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top center;
}

#recordingview .cardribbon .tts {
  position: fixed;
  z-index: 500;
  top: 6vh;
  right: 11vw;
  font-size: 2vw;
  padding: 0.5vw 0.7vw 0.5vw 0.7vw;
}

#recordingview .cardribbon .tts.playing {
  background-color: #fe9;
  filter: drop-shadow(0 0 calc(max(2vh, 2vw)) #fe9);
}

#recordingview .navpanel {
  margin: 2vh 0 0 0;

  width: 80vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#recordingview .navpanel .donetext {
  margin: 0 1vw 0 1vw;
  font-size: 2vh;
  color: #626262;
  text-align: center;
}

#recordingview .navpanel BUTTON {
  width: calc(12em + 3vw);
  min-height: 5vh;

  padding: 1vh 1.5vw 1vh 1.5vw;
  border-radius: 1vh;
  border: 2px solid #bbd;
  background-color: #ddf;
  color: #446;
  font-weight: bold;
  font-size: 2vh;
  white-space: nowrap;
}

#recordingview .navpanel BUTTON:disabled {
  border: 2px solid #ccc;
  background-color: #eee;
  color: #888;
}

#recordingview .progresswidget {
  box-sizing: border-box;
  width: 80vw;
  min-width: 80vw;
  padding: 0;
  margin: 2vh 0 0 0;
  border: 1px solid #aae;
  background-color: #eee;
  user-select: none;
}

#recordingview .progressleft {
  box-sizing: border-box;
  white-space: nowrap;
  background-color: #aaf;
  font-size: calc(min(2vh, 2vw));
  padding: calc(min(0.5vh, 0.5vw));
}

#recordingview .progressleft.zero {
  background-color: #0000;
}

#recordingview .progresswidget.done .progressleft {
  text-align: center;
  font-size: 3vh;
  font-weight: bold;
  color: #420;
  background-color: #fe9;
  filter: drop-shadow(0 0 calc(max(2vh, 2vw)) #fe9);
  white-space: normal;
}

#recordingview .controlpanel {
  margin: 5vh 0 0 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

#recordingview .controlpanel .secondarybuttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

#recordingview .controlpanel .mainbuttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

#recordingview .metabuttons {
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-right: 10vw;
}

#recordingview BUTTON.logout,
#recordingview BUTTON.carousel,
#recordingview BUTTON.help {
  width: calc(min(4vh, 4vw));
  min-width: 1em;
  height: calc(min(4vh, 4vw));
  border-radius: 3vh;
  font-size: calc(min(1.5vh, 1.5vw));
  border: 2px solid #ccc;
  background-color: #ddd;
  color: #555;
}

#recordingview BUTTON.carousel {
  width: auto;
  padding: 0 1em;
}

#recordingview BUTTON.carousel.active {
  color: white;
  border: 3px solid #66e;
  background-color: #00b;
}

#recordingview BUTTON.logout {
  width: auto;
  padding: 0 1em;
  color: white;
  border: 3px solid #fcaeae;
  background-color: #e02c2c;
}

#recordingview BUTTON.listen,
#recordingview BUTTON.delete {
  margin: 0 1vw 0 1vw;
  width: 13vw;
  min-width: 7em;
  height: calc(min(6vh, 6vw));
  border-radius: 3vh;
  font-size: calc(min(2vh, 2vw));

  border: 2px solid #cce;
  background-color: #ddf;
  color: #339;
}

#recordingview .controlpanel BUTTON.listen.playing {
  border: 2px solid #c77;
  background-color: #a00;
  color: #fde;
}

#recordingview BUTTON.record {
  margin: 0 1vw 0 1vw;
  width: 35vw;
  min-width: 10em;
  height: calc(min(10vh, 10vw));

  border-radius: 5vh;
  font-size: calc(min(3vh, 3vw));

  border: 3px solid #66e;
  background-color: #00b;
  color: #fff;
}

#recordingview .controlpanel.newcard BUTTON.record {
  margin-left: 32.5vw;
}

#recordingview BUTTON.listen {
  margin-left: 10vw;
}

#recordingview .controlpanel.recorded BUTTON.record {
  width: 20vw;
  min-width: calc(10em + 6vw);
  height: 6vh;
  border-radius: 3vh;
  font-size: calc(min(2vh, 2vw));
  border: 2px solid #cce;
  background-color: #ddf;
  color: #339;
}

#recordingview .controlpanel.recorded BUTTON.record:disabled {
  border: 2px solid #bbb;
  background-color: #888;
  color: #bbb;
}

#recordingview BUTTON.record.recording {
  display: grid;
  align-items: center;
  grid-template-columns: calc(5vh + 3vw) 1fr calc(5vh + 3vw);
  column-gap: 1vw;
  border: 2px solid #c77;
  background-color: #a00;
}

#recordingview BUTTON.record.recording:hover {
  background-color: #c33;
}

#recordingview BUTTON.record.recording .label {
  justify-self: center;
}

#recordingview BUTTON.record.recording .recordlight {
  width: 3vw;
  height: 3vw;
  border-radius: 1.5vw;
  background: linear-gradient(45deg, #800, #f44);
  border: 1px solid #faa;
  filter: drop-shadow(0 0 1vw #fdd);
  justify-self: end;
  margin-right: 3vh;
}

#recordingview .controlpanel.recorded BUTTON.record.recording {
  grid-template-columns: calc(3vh + 2vw) 1fr calc(3vh + 2vw);
  column-gap: 1vw;
  border: 2px solid #c77;
  background-color: #a00;
  color: #fff;
  min-width: calc(8em + 6vw);
}

#recordingview .controlpanel.recorded BUTTON.record.recording:hover {
  background-color: #c33;
}

#recordingview .controlpanel.recorded BUTTON.record.recording .recordlight {
  width: 2vw;
  height: 2vw;
  border-radius: 1vw;
  margin-right: 2vh;
}

#recordingview BUTTON.record:hover {
  background-color: #33d;
}

#recordingview .controlpanel BUTTON:disabled {
  border: 3px solid #bbb;
  background-color: #888;
  color: #bbb;
}

#recordingview .controlpanel BUTTON.cancel {
  min-height: calc(min(6vh, 6vw));

  margin: 0 0 0 1vw;
  padding: 1vh 3vw 1vh 3vw;
  border-radius: 3vh;
  font-size: calc(min(2vh, 2vw));

  border: 2px solid #ccc;
  background-color: #ddd;
  color: #555;
}

#recordingview BUTTON.cancel:hover {
  background-color: #eee;
}

/* Recording screen layout for phones */
@media (orientation: portrait) {
  #messagebox {
    margin-top: 0;
  }

  #recordingview .cardribbon {
    margin-top: 2vh;
  }

  #recordingview .cardribbon .thiscard {
    font-size: 8vw;
  }

  #recordingview .cardribbon .tts {
    top: 3vh;
    font-size: 2vh;
    padding: 0.5vh 0.7vh 0.5vh 0.7vh;
  }

  #recordingview .navpanel {
    width: 95vw;
  }

  #recordingview .navpanel BUTTON {
    width: 30vw;
    height: 5vh;
    padding: 1vh 1.5vw 1vh 1.5vw;
    font-size: 1.5vh;
  }

  #recordingview .progresswidget {
    width: 95vw;
    min-width: 95vw;
  }

  #recordingview .progressleft {
    font-size: 2vh;
    padding: 0.5vh;
  }

  #recordingview .progresswidget.done .progressleft {
    font-size: 2vh;
  }

  #recordingview .controlpanel {
    display: grid;
    grid-template-columns: 1fr;
    margin: 2vh 0 0 0;
    row-gap: 1vh;
    justify-items: center;
  }

  #recordingview BUTTON.record {
    margin: 0 1vw 0 1vw;
    width: 50vw;
    height: 8vh;
    min-width: calc(6em + 8vh);

    border-radius: 4vh;
    font-size: 3vh;
  }

  #recordingview .controlpanel.newcard BUTTON.record {
    margin-left: calc(4vh + 2vw);
  }

  #recordingview .controlpanel BUTTON.record.recording {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 2vw;
    margin-left: 21vw;
  }

  #recordingview BUTTON.record.recording .recordlight {
    width: 3vh;
    height: 3vh;
    min-width: 3vh;
    min-height: 3vh;
    border-radius: 1.5vh;
    margin-right: 0;
  }

  #recordingview .controlpanel BUTTON.cancel {
    width: 20vw;
    min-height: 5vh;
    border-radius: 2.5vh;
    font-size: 1.5vh;
  }

  #recordingview .metabuttons {
    margin-left: calc(4vh + 2vw);
    margin-right: 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  #recordingview BUTTON.logout,
  #recordingview BUTTON.carousel,
  #recordingview BUTTON.help {
    width: 4vh;
    min-width: 4vh;
    height: 4vh;
    border-radius: 3vh;
    font-size: 1.5vh;
  }

  #recordingview BUTTON.carousel,
  #recordingview BUTTON.logout {
    width: auto;
    padding: 0 1em;
  }

  #recordingview BUTTON.listen,
  #recordingview BUTTON.delete {
    margin: 0 1vw 0 1vw;
    width: 13vw;
    min-width: calc(7em + 5vh);
    height: 5vh;
    border-radius: 2.5vh;
    font-size: 1.7vh;
  }

  #recordingview .controlpanel.recorded BUTTON.record {
    width: 20vw;
    min-width: calc(10em + 6vh);
    height: 6vh;
    border-radius: 3vh;
    font-size: 2vh;
    margin-left: calc(4vh + 2vw);
  }

  #recordingview .controlpanel.recorded BUTTON.record.recording .recordlight {
    width: 2vh;
    height: 2vh;
    min-width: 2vh;
    min-height: 2vh;
    border-radius: 1vh;
    margin-left: 3vw;
    margin-right: -10vw;
  }
}

/*
==================================================================================
Done view
==================================================================================
*/

#doneview {
  flex-grow: 1;
  max-width: 50em;
  box-sizing: border-box;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 20px;
  overflow: hidden;
  color: #444;
  background-color: #fff;

  display: flex;
  flex-direction: column;
  align-items: center;
}

#doneview .title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

#doneview B.count {
  font-size: 18px;
  font-weight: bold;
  color: #00a;
}

#doneview button {
  font-size: 20px;
  margin-top: 10px;
}

#doneview BUTTON {
  margin-top: 20px;

  height: 50px;
  border-radius: 25px;
  padding: 0 30px 0 30px;
  font-size: 22px;
  font-weight: bold;
  border: 3px solid #66e;
  background-color: #00b;
  color: #fff;
}

#doneview BUTTON.review {
  height: 30px;
  border-radius: 15px;
  padding: 0 15px 0 15px;
  font-size: 16px;
  font-weight: bold;
  border: 1px solid #aae;
  background-color: #fff;
  color: #44e;
}

/* Done page for phones */
@media (orientation: portrait) {
  #doneview {
    max-width: 100vw;
    width: 100vw;
    padding: 10px;
    margin: 0;
  }
}
