* {
  box-sizing: border-box;
}

#outer {
  --play-height: 4rem;
}

div.outer,
div.wrapper {
  min-width: auto;
}

#heading {
  grid-column: 1 / span 7;
}

#message {
  font-size: 1.2rem;
}

#volumeSlider {
  max-width: 30rem;
  margin-bottom: 0.5rem;
}

div.startWrapper {
  position: relative; /* for #seesawB */
  height: calc(var(--play-height) + 0.5rem);
  padding-bottom: 0.5rem;

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

#playButton {
  height: var(--play-height);
  width: 8rem;
  font-size: 1.5rem;
}

#playButton.down {
  background-color: var(--color-emphasis-border);
}

#timerB, #timerProgress, #seesawB, #tapB {
  position: absolute;
  bottom: 0.5rem;
  right: -2.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#clearB, #resetB {
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: none;
}

#clearB {
  margin-right: 0.1rem;
}

#resetB {
  margin-left: 0.1rem;
  padding: 0.1rem;
  left: auto;
  right: 0;
}

#tapB {
  left: -2.5rem;
  right: auto;
  border-radius: 50%;
  border-style: dotted;
  border-width: 0.2rem;
}

#timerB, #timerProgress {
  right: -5rem;
}

#timerProgress {
  bottom: 2.75rem;
  height: 0.4rem;
  justify-content: flex-start;
  border: 0.12rem solid var(--color-emphasis-border);
  border-radius: 0.2rem; /* half of height */
  background-color: var(--color-primary-fill);
}

#timerProgress > div {
  border-right: 0.12rem solid var(--color-emphasis-border);
  background-color: var(--color-emphasis-fill);
  width: 100%;
  height: 100%;
}

#timerB.on, #seesawB.on, #tapB.on {
  border-color: var(--color-emphasis-border);
  background-color: var(--color-emphasis-fill);
}

#tapB.on {
  width: 3.5rem;
  height: 4rem;
  left: -4rem;
}

#tapB.on.down {
  background-color: var(--color-primary-border);
}

.clearIcon, .resetIcon, .timerIcon, .seesawIcon, .tapIcon {
  pointer-events: none;
  width: 100%;
  padding: 0;
}

.tapIcon {
  width: 90%;
}

.timerIcon {
  width: 70%;
}

#bpmWW, div.bpmWrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bpmWW {
  position: relative; /* for #seesaw */
}

div.bpmWrapper {
  max-width: 20rem;
}

.bpmTextWrapper, .barTextWrapper {
  height: 5.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 0.4rem;
  margin-right: 0.4rem;
}

.barTextWrapper {
  height: 3rem;
  flex-direction: row;
}

#italian {
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
}

.bpmUnder,
div#bpm,
div#barLength {
  display: flex;
  align-items: center;
  justify-content: center;
}

.barTextWrapper > .bpmUnder {
  margin-left: 0.5rem;
}

button.plusMinusButton.plusMinusMore {
  font-size: 3em;
  width: 100%;
}

button.plusMinusButton {
  touch-action: manipulation;

  border: 0.12rem solid var(--color-primary-border);
  border-radius: 50%;
  font-size: 2em;
  color: var(--color-emphasis-border);
  width: 100%;
}

#timerInner > button.plusMinusButton.up {
  background-color: var(--color-primary-light);
}

div#bpm {
  font-size: 2em;
  min-width: 4rem;
  width: 4rem;
}

div#bpm.seesaw {
  font-size: 1.4rem;
}

#timer, #seesaw, #tapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

#timerInner {
  max-width: 20rem;
  background-color: var(--color-primary-fill);
  padding: 0.5rem;

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

#timerText {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#time {
  font-size: 1.6rem;
  min-width: 5rem;
  width: 5rem;
  display: flex;
  justify-content: center;
}

.timeSide {
  width: 2rem;
  min-width: 2rem;
}

#timeM {
  text-align: right;
}

#timeUnder {
  height: 1.4rem;
  display: flex;
}

#tapper {
  flex-direction: column;
  align-items: center;
}

#tapGuide, #tapInfo {
  color: var(--color-secondary-text);
  font-weight: bold;
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

#tapGuide.quiet {
  color: var(--color-primary-text);
  font-weight: normal;
  font-size: 1rem;
}

.toggleSeesaw {
  padding: 0;
  width: 100%;
  max-width: 4rem;
  height: 4.2rem; /* same as bpmTextWrapper */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.seesawTop {
  font-size: 1.1rem;
}

.seesawBpm {
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.toggleSeesaw.selected > .seesawTop {
  font-weight: bold;
}

.toggleSeesaw.selected > .seesawBpm {
  font-weight: bold;
  font-size: 1.1rem;
}

div#barLength {
  font-size: 1.5em;
}

div.barLengthWrapper {
  position: relative; /* for seesawB */
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

div.instrumentsWrapper {
  margin-top: 1rem;
  max-width: 40rem;

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  grid-gap: 1rem;
}

.instrumentButtonWrapper {
  display: flex;
  width: 33%;
}

div.instrumentWrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

#instrument2Wrapper {
  justify-content: flex-end;
}

.drumToggle {
  display: flex;
  align-items: center;
  opacity: 0.5;
  padding: 0;
}

.drumIcon {
  pointer-events: none;
  width: 100%;
  padding: 20%;
}

#visualW {
  position: relative;
  height: calc(100% - 2.5rem); /* vol */
  width: 100%;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.wrapper.infoView > #visualW {
  height: auto;
}

#pane {
  position: relative;
  width: 100%;
  max-height: calc(100% - 2.5rem);

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

#visual, #instrumentsF {
  position: relative;
  width: 100%;
  max-width: 25rem;
  max-height: 100%;

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

#controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#multiW {
  width: 100%;
  max-height: calc(100% - var(--play-height) - 0.5rem - 5.2rem - 4.2rem); /* play, play pad, bpm, bpb */
  display: flex;
  flex-direction: column;
  align-items: center;
}

#multi {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#instrumentsF {
  position: absolute;
  top: 0;
}

#visualSVG {
  stroke: var(--color-primary-text);
  /* prevents scaling of visual when side by side, both ff,chro
  max-height: 100%;
  max-width: 100%;
  height: 100%;
  width: 100%;
  */
}

#hammer {
  margin: 0;
  transform-origin: bottom center;
  transform-box: fill-box;
  fill: none;
  fill-opacity: 0;
  stroke-width: 0.3;
}

#circle {
  stroke-width: 0.5;
}

#hcircle {
  fill: var(--color-emphasis-fill);
  fill-opacity: 0.5;
}

#htop {
  stroke-linecap: round;
}

#spine {
  stroke: none;
  fill: none;
  fill-opacity: 0;
}

#circle, #lcircle, #rcircle {
  margin: 0;
  fill: none;
  fill-opacity: 0;
}

#lcircle, #rcircle {
  stroke-width: 0.7;
  transform-origin: top center;
  transform-box: fill-box;
}

#infoW {
  padding: 0 0.5rem 0 0.5rem;
  width: 100%;
  max-width: 30rem;
  display: flex;
  justify-content: flex-start;
}

#infoW.on {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

#setupButton, #eyeButton, #infoButton, #linkButton, #fullscreenButton {
  z-index: 2;
  width: 2rem;
  height: 2rem;

  display: flex;
  align-items: center;
}

#linkButton, #fullscreenButton {
  margin-left: 0.5rem;
}

#infoButton {
  padding: 0;
}

#infoButton.on {
  margin: 0;
  width: auto;
  padding: 0 0.4rem 0 0;
}

#infoButton.on > span {
  color: var(--color-emphasis-text);
}

#tapB.on > img,
#seesawB.on > img,
#timerB.on > img,
#infoButton.on > img {
  filter: var(--filter-color-emphasis-text);
}

#setupButton, #eyeButton {
  cursor: pointer;
  margin-left: auto;
}

#eyeButton {
  padding: 0.1rem;
}

#setupIcon, #eyeIcon, #infoIcon, #playIcon, #linkIcon, #fullscreenIcon {
  pointer-events: none;
  height: 100%;
  max-width: 100%;
}

#infoIcon {
  padding: 0.3rem;
}

.info.volumeInfo {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  margin-top: 0;
  padding-top: 1.5rem;
}

.info.tempo {
  margin-top: 1rem;
}

div.info.bpb {
  margin-top: 1rem;
}

div.info.multi {
  margin-top: 1rem;
  margin-bottom: 0;
}

.infoI {
  width: 1rem;
  height: 1rem;
}

#tryPloop, #howtoEmbed {
  margin-top: 0.5rem;
  border: 0.12rem solid var(--color-emphasis-border);
}

#links {
  width: 100%;
  max-width: 40rem;
  padding: 0 0.5rem 0 0.5rem;

  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

.linksLine {
  margin: 0.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hugTop {
  margin-top: 0;
}

.url {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0;
  display: flex;
  width: 100%;
}

#linkEmbedding {
  font-size: 1.1rem;
}

.copy {
  width: 1.1rem;
  margin-top: 0;
  padding: 0;
  border: none;
  display: flex;
}

#hereEmbedding {
  margin-top: 2rem;
}

#linkTop {
  margin-bottom: 2rem;
  width: 100%;
  display: flex;
}

#bottomSpacer {
  height: 100%;
}

#okButtonLink {
  margin-bottom: 0.5rem;
  margin-left: auto;
  height: 2rem;
  width: 6rem;
}

#linkButton.retracted,
#links.retracted,
#tapper.retracted,
#seesaw.retracted,
#timer.retracted,
#timerProgress.retracted,
#bpmWrapper.retracted,
div.instrumentsWrapper.retracted,
#visualW.retracted,
#visual.retracted,
#instrumentsF.retracted,
#fullscreenButton.retracted,
#setupButton.retracted,
#eyeButton.retracted {
  display: none;
}
