/* Copyright 2023 The MediaPipe Authors.

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: roboto;
  margin: 2em;
  color: #3d3d3d;
  --mdc-theme-primary: #007f8b;
  --mdc-theme-on-primary: #f1f3f4;
}

h1 {
  color: #007f8b;
}

h2 {
  clear: both;
}

video {
  clear: both;
  display: block;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  height: 280px;
}

section {
  opacity: 1;
  transition: opacity 500ms ease-in-out;
}

.removed {
  display: none;
}

.invisible {
  opacity: 0.2;
}

.detectOnClick {
  position: relative;
  float: left;
  width: 48%;
  margin: 2% 1%;
  cursor: pointer;
}
.videoView {
  position: absolute;
  float: left;
  width: 48%;
  margin: 2% 1%;
  cursor: pointer;
  min-height: 500px;
}

.videoView p,
.detectOnClick p {
  padding-top: 5px;
  padding-bottom: 5px;
  background-color: #007f8b;
  color: #fff;
  border: 1px dashed rgba(255, 255, 255, 0.7);
  z-index: 2;
  margin: 0;
}

.highlighter {
  background: rgba(0, 255, 0, 0.25);
  border: 1px dashed #fff;
  z-index: 1;
  position: absolute;
}

.canvas {
  z-index: 1;
  position: absolute;
  pointer-events: none;
}

.output_canvas {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
}

.detectOnClick {
  z-index: 0;
  font-size: calc(8px + 1.2vw);
}

.detectOnClick img {
  width: 45vw;
}
.output {
  display: none;
  width: 100%;
  font-size: calc(8px + 1.2vw);
}

.mapping-container {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.mapping-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.mappings-list {
  margin-top: 20px;
}

.mapping-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mapping-item button {
  background-color: #f44336;
  margin-left: 10px;
}

.instructions-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.instructions-container ol {
    padding-left: 20px;
}

.instructions-container ul {
    padding-left: 20px;
    margin: 10px 0;
}

.instructions-container li {
    margin-bottom: 10px;
}

/* Style for all select elements */
.mdc-select {
    min-width: 150px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

/* Style for all buttons */
.mdc-button {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mdc-button--raised {
    background-color: #009688;
    color: white;
}

.mdc-button--raised:hover {
    background-color: #00796b;
}

/* Specific styles for different action buttons */
#addMapping {
    background-color: #2196F3;
}

#addDefaultChord {
    background-color: #4CAF50;
}

#addDefaultDrum {
    background-color: #FF5722;
}

#addDefaultCastanet {
    background-color: #9C27B0;
}

#addDefaultFlute {
    background-color: #3F51B5;
}

/* Responsive design */
@media (max-width: 768px) {
    .mapping-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mdc-select, .mdc-button {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Header styling */
.mapping-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.tempo-control {
    margin: 20px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.tempo-control label {
    display: block;
    margin-bottom: 5px;
}

.tempo-control input[type="range"] {
    width: 200px;
}

.instrument-control-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 10px 0;
}

.tempo-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 4px;
    min-width: 300px;
}

.tempo-control label {
    white-space: nowrap;
    margin-right: 10px;
}

.tempo-control input[type="range"] {
    flex: 1;
    min-width: 150px;
}