* {
  box-sizing: border-box;
}

#messageWrapper {
  top: 2rem;
}

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

.info.infoBoard {
  margin-top: 0;
  margin-bottom: 2rem;
}

.info.infoControls {
  margin-bottom: 0;
  margin-top: 1.5rem;
}

#tempoSlider, #volumeSlider {
  width: 100%;
  max-width: 40rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem 0 0.5rem;

  display: flex;
  flex-direction: row;
}

#tempoSlider {
  margin-top: 0.5rem;
}

#tempoRange, #volumeRange {
  width: 100%;
}

img.volumeIcon {
  pointer-events: none;
  width: 1.2rem;
  height: 1.2rem;
}

#linkTop {
  margin-bottom: 1.6rem; /* space for message. */
  width: 100%;
  display: flex;
}

#okButtonLink {
  margin-bottom: 0.5rem;
  margin-left: auto;
  height: 2rem;
  width: 6rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#controls {
  position: relative;
  max-width: 40rem;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;

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

#visualW {
  position: relative;
  width: 100%;
  padding: 0;
  margin-top: 1rem;
  height: calc(100% - 3.25rem - 2.75rem); /* bpm, vol */

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

#stringsButton.retracted,
.stringArea.retracted,
#controls.retracted,
#linkButton.retracted,
#links.retracted,
#visualW.retracted,
#tempoSlider.retracted,
#volumeSlider.retracted {
  display: none;
}

#visual {
  position: relative;
  width: 100%;
  max-width: 60rem;

  display: flex;
}

#visualSVG {
  background: linear-gradient(var(--color-primary-text), var(--color-primary-light) 3%, var(--color-primary-fill) 97%, var(--color-primary-text));

  max-height: 100%;
  max-width: 100%;
  height: 100%;
  width: 100%;

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  display: grid;
  grid-template-columns: 1fr;
}

#visualSVG.flip {
  transform: rotateY(180deg);
}

#ratioSVG {
  width: 100%;
  height: 100%;
}

#board, #fretNums {
  width: 100%;
  height: 100%;

  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  display: grid;
  grid-template-columns: repeat(14, 1fr);
  grid-template-rows: 1fr;
}

#fretNums {
  top: -1.2rem;
  justify-items: center;
  font-size: 0.8rem;
}

#PlayButton {
  z-index: 1;
  width: 4rem;
  height: 3rem;
}

#linkButton, #handnessButton, #stringsButton, #editButton {
  cursor: pointer;
  margin-left: 0.5rem;
}

#linkButton, #infoButton, #handnessButton, #stringsButton, #editButton {
  z-index: 2;
  width: 2rem;
  height: 2rem;

  display: flex;
  align-items: center;
}

#handnessButton.on, #editButton.on {
  border: 0.15rem solid var(--color-emphasis-border);
}

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

#stringsIcon {
  padding: 20%;
}

#infoW {
  display: flex;
  justify-content: flex-start;
}

#infoW.on {
  position: static;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#rightW {
  display: flex;
  justify-content: flex-end;
}

#infoButton {
  padding: 0;
}

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

#linkIcon, #infoIcon, #handnessIcon, .drumIcon, #playIcon, #stringsIcon, #editIcon {
  pointer-events: none;
  height: 100%;
}

#infoIcon {
  padding: 0.3rem;
}

#playIcon {
  max-height: 2rem;
}

#hammer {
  margin: 0;
  transform-origin: bottom center;
  transform-box: fill-box;
  stroke: var(--color-emphasis-fill);
  fill: var(--color-emphasis-fill);
}

.loopCircle {
  transform-box: fill-box;
}

g {
  z-index: -1;
}

g.primary {
  z-index: auto;
}

#ttButton {
  margin-top: 0.5rem;
}

#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;
}

.stringArea {
  cursor: pointer;
  width: 100%;

  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: repeat(14, 1fr);
  align-items: center;

  z-index: 2;
}

.string {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 10%;
  pointer-events: none;
  background: linear-gradient(var(--color-primary-text), var(--color-primary-light), var(--color-primary-text));
}

#string0 > .string {
  height: 7%;
}

#string1 > .string {
  height: 8%;
}

#string2 > .string {
  height: 9%;
}

#string3 > .string {
  height: 11%;
}

#string4 > .string {
  height: 13%;
}

#string5 > .string {
  height: 14%;
}

.fret {
  height: 100%;
  width: 10%;
  background-color: var(--color-primary-text);
  opacity: 0.2;
}

.fret.nut {
  width: 25%;
  opacity: 0.7;
}

.fret.prenut {
  width: 0;
  opacity: 0;
}

.fretMark {
  pointer-events: none;
  user-select: none;
  cursor: pointer;
  background-color: var(--color-emphasis-fill);
  stroke: none;
  z-index: 3;
  height: 100%;
  margin-left: 30%;
  border-radius: 50%;
  border: 0.15rem solid var(--color-emphasis-fill);
}

.fretMark.sequence {
  background-color: var(--color-primary-light);
  border: 0.15rem solid var(--color-emphasis-fill);
}

.fretMark.sequence.playing {
  background-color: var(--color-emphasis-fill);
}

.fretMark.invisible {
  visibility: visible;
  background-color: var(--color-transparent);
  border-color: var(--color-transparent);
}

.fretMark.invisible > svg {
  visibility: hidden;
}

svg.svgWords {
  background-color: var(--color-transparent);
  /* Broke epiphany. */
  /* height: 100%; */
}

.fretSymbol {
  pointer-events: none;
  cursor: pointer;
  stroke: none;
}

#visualSVG.flip > #fretNums > .fretNum,
#visualSVG.flip > .stringArea > .fretMark > .fretSymbol {
  transform: scaleX(-1);
  transform-box: fill-box;
  transform-origin: center;
}

.fretSymbol.highlight {
  stroke: var(--color-emphasis-fill);
}

.fretDot {
  pointer-events: none;
  stroke: none;
  background-color: var(--color-primary-text);
  opacity: 0.5;
  border-radius: 50%;
  width: 0;
  padding: 1.5%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.fretDot.fdTop {
  top: 25%;
}

.fretDot.fdBottom {
  top: 75%;
}
