@import 'interfaceThemes.css';

.panel { 
  /* height: 100%; */
  background-color: var(--bg-col-1);
  border: 1px solid var(--border-col-1);
  color: var(--text-col-1);
  width: 300px;
  padding: 0.2rem;
  resize:none;
  user-select: none;
  overflow: auto;
  max-width: 100%;
  line-height: 1;
  height: 100%;
  z-index: 100;
  position: relative;
  padding-right: 8px;
  direction: rtl;
}

#panel::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  background: var(--border-col-2);
  direction: ltr;
}

/* h1 {
    margin-bottom: 20px;
} */

header, section, footer {
    margin-bottom: 1rem;
    direction: ltr;
}

header {
  container-type: inline-size;
}

header h1 {
  font-size: 1.2rem;
  font-size: clamp(0.75rem, 15cqw, 2rem);
  text-align: center;
  margin: 0 0 10px 0;
}

h2 {
  font-size: 1rem;
  margin: 5px 0;
}

fieldset {
  padding: 0.4rem;
  flex: 1;
}

.foxdot-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  /* margin-bottom: 5px; */
  /* gap: 0.1rem */
}

.info-row {
  background-color: var(--bg-col-2);
  border: 1px solid var(--border-col-2);
  transition: border-color 0.5s ease; 
  border-radius: 0.1rem;
}

.info-row legend {
  font-size: 1rem;
  padding: 0 10px;
}

.info-text {
  color: var(--text-col-2);
  text-align: center;
  font-size: 1rem;
}

.simple-text {
  color: var(--text-col-2);
  font-size: 1rem;
  overflow: auto;
}



.help-tabs {
  height: 100%;
}

.help-tabs input[type="radio"] {
  display: none;
  margin: 1rem 0;
}

.help-label {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.help-label .tab {
  flex: 1;
  width: 100%;
}

.help-label label {
  padding: 0.5rem;
  display: block;
  border: 1px solid var(--border-col-2);
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

.help-label label:hover {
  background-color: var(--text-col-1);
  color: var(--bg-col-1);
}

.help-content {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  padding-top: 0.5rem;
  gap: 0.2rem;
  overflow-y: hidden;
  /* height: 40vh; */
}

.help-tabs input[type="radio"]:nth-of-type(1):checked ~ .help-label .tab:nth-of-type(1) label,
.help-tabs input[type="radio"]:nth-of-type(2):checked ~ .help-label .tab:nth-of-type(2) label,
.help-tabs input[type="radio"]:nth-of-type(3):checked ~ .help-label .tab:nth-of-type(3) label {
  background-color: var(--text-col-1);
  color: var(--bg-col-1);
}

.help-tabs input[type="radio"]:nth-of-type(1):checked ~ .help-content:nth-of-type(1),
.help-tabs input[type="radio"]:nth-of-type(2):checked ~ .help-content:nth-of-type(2),
.help-tabs input[type="radio"]:nth-of-type(3):checked ~ .help-content:nth-of-type(3) {
  display: grid;
}

#helpLoop span, #helpSynth span, #helpFx span {
  display: block;
  border: 1px inset var(--border-col-2);
  /* margin-bottom: 0.3rem; */
}

/* .help-tabs {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.help-tabs input[type="radio"] {
  display: none;
}

.help-tabs label:hover {
  background: var(--text-col-2);
  color: var(--bg-col-1);
} */

/* .help-tabs label {
  flex: 1;
  margin: 0;
  padding: 0.5rem;
  cursor: pointer;
  border: 1px solid var(--text-col-2);
  margin-right: 0.5rem;
  border-radius: 0.1rem;
  color: var(--text-col-2);
  font-size: 16px;
} */

/* #helpLoop, #helpSynth, #helpFx {
  display: none;
  column-count: 2;
} */

/* #helpLoop span, #helpSynth span, #helpFx span {
  display: block;
  margin-bottom: 0.3rem;
} */

/* #tab-loop:checked ~ #help #helpLoop,
#tab-synth:checked ~ #help #helpSynth,
#tab-fx:checked ~ #help #helpFx {
    display: block;
} */

/* .help-tabs input[type="radio"]:checked + label {
  background: var(--text-col-2);
  color: var(--bg-col-1);
} */

/* .help-tabs label {
  display: inline-block;
  margin-bottom: 0.5rem;
} */

/* #help {
  display: block;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 0.2rem;
} */


.h10 {
  max-height: 10vh;
}

.h20 {
  max-height: 20vh;
}

.h40 {
  max-height: 40vh;
}

.beat-steps {
  background-color: var(--bg-col-2);
  color: var(--text-col-2);
  padding: 2px;
  text-align: center;
  border: 1px solid var(--border-col-2);
  margin-bottom: 2px;
  background: linear-gradient(to right, var(--beat-col-2) 0%, var(--beat-col-1) 0%);
}

#timer {
  cursor: pointer;
}

textarea {
  width: 100%;
  max-width: calc(100% - 10px);
  height: auto;
  background-color: var(--bg-col-2);
  color: var(--text-col-2);
  border: 1px solid var(--border-col-2);
  padding: 5px;
  max-height: 33%;
}

.player-line {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  cursor: pointer;
}
.player-line:hover {
  background-color: var(--bg-col-1);
}

.player-id {
  color: var(--text-col-2);
}
.player-synth {
  color: var(--text-col-1);
}
.player-duration {
  color: #4caf50;
}

.player-solo {
  opacity: 0.2;
}

/* pianoroll */
#root {
  cursor: pointer;
}

#piano-roll {
  display: flex;
  position: fixed;
  top: 0;
  left: 60%;
  height: 11em;
  z-index: 1000;
  box-sizing: border-box;
}

.piano-key {
  height:11em;
  font-weight: bold;
  width: auto; 
  margin: 0 auto;
  padding-right: 1rem;
  padding-bottom: 0.5rem;
  box-sizing: border-box;
  border:1px solid #160801;
  border-radius: 0 0 1em 1em;
  box-shadow:0 0 50px rgba(0,0,0,0.5) inset,0 1px rgba(212,152,125,0.2) inset,0 5px 15px rgba(0,0,0,0.5);
  position:relative;
  display: flex;
  align-items: flex-end; /* Aligner le contenu en bas */
  justify-content: center; /* Centrer le contenu horizontalement */
}

.piano-key li {
  margin:0;
  padding:0;
  list-style:none;
  position:relative;
  /* float:left; */
  width: 100%;
  text-align: center; /* Centrer le texte */
  cursor: pointer;
  user-select: none;
}

.piano-key .white {
  color: var(--bg-col-2);
  padding-bottom: 0.5rem;
  height:100%;
  width:4em;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Aligner le texte en bas */
  z-index:1;
  border-left:1px solid #bbb;
  border-bottom:1px solid #bbb;
  border-radius:0 0 5px 5px;
  box-shadow:-1px 0 0 rgba(255,255,255,0.8) inset,0 0 5px #ccc inset,0 0 3px rgba(0,0,0,0.2);
  background:linear-gradient(to bottom,#eee 0%,#fff 100%)
}
.piano-key .white:active {
  border-top:1px solid #777;
  border-left:1px solid #999;
  border-bottom:1px solid #999;
  box-shadow:2px 0 3px rgba(0,0,0,0.1) inset,-5px 5px 20px rgba(0,0,0,0.2) inset,0 0 3px rgba(0,0,0,0.2);
  background:linear-gradient(to bottom,#fff 0%,#e9e9e9 100%)
}

.piano-key .black {
  color: var(--text-col-2);
  height:7em;
  width:2em;
  margin:0 0 0 -1em;
  padding-bottom: 0.5rem;
  z-index:2;
  border:1px solid #000;
  border-radius:0 0 3px 3px;
  box-shadow:-1px -1px 2px rgba(255,255,255,0.2) inset,0 -5px 2px 3px rgba(0,0,0,0.6) inset,0 2px 4px rgba(0,0,0,0.5);
  background:linear-gradient(45deg,#222 0%,#555 100%);
  transform: translateY(-55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Aligner le texte en bas */
}

.piano-key .black:active {
  box-shadow:-1px -1px 2px rgba(255,255,255,0.2) inset,0 -2px 2px 3px rgba(0,0,0,0.6) inset,0 1px 2px rgba(0,0,0,0.5);
  background:linear-gradient(to right,#444 0%,#222 100%)
}

.piano-key li.c,.piano-key li.d,.piano-key li.e,.piano-key li.g,.piano-key li.a, .piano-key li.b {
  margin:0 0 0 -1em
}

.piano-key li:first-child {
  border-radius:5px 0 5px 5px
}

.piano-key li:last-child {
  border-radius:0 5px 5px 5px
}

#piano-roll.hidden {
  display: none;
}