* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, Helvetica, sans-serif;
}
.keyboard .container {
  display: block;
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}
.keyboard .btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.keyboard button {
  border: none;
  background: #fff;
  padding: 10px 50px;
  width: 23%;
  font-weight: bold;
  color: #555;
  outline: none;
  border: 1px solid #aaa;
  cursor: pointer;
  margin-bottom: 50px;
  transition: all 0.2s ease-in-out;
  position: relative;
}
.keyboard button:after {
  position: absolute;
  content: "";
  top: 50%;
  transform: translate(0, -50%);
  right: -13.4%;
  width: 13%;
  height: 3px;
  background-color: #eee;
}
.keyboard button:nth-last-child(1):after {
  content: none;
}
.keyboard button:hover,
button.active {
  background-color: #a70f0e;
  border-color: transparent;
  color: #fff;
}

/* Details */
.details {
  margin-top: 30px;
}
.details h4 {
  margin-bottom: 5px;
}
.details select {
  /* background-color: reds; */
  width: 40vw;
  padding: 10px;
  border: 1px solid #aaa;
  color: #222;
}
.details select:focus {
  box-shadow: 1px 1px 3px #ccc;
}
.details option {
  width: 500px;
}

/* Switches */
h4.case-heading {
  margin-top: 20px;
  border-bottom: 1px dotted #222;
  width: fit-content;
  margin-bottom: 5px;
}
.details .switches .inputs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}
.details .switches label {
  font-weight: bold;
  font-size: 16px;
}
/* Keygroups */
.details .keygroups .keyboards {
  display: flex;
  align-items: center;
  gap: 10px;
}
.details .keyboards h4 {
  margin-bottom: 20px;
}
.details .keyboards img {
  width: 150px;
}
.details .keyboards h5 {
  text-align: left;
  font-size: 12px;
}

.details .keyboards button {
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  width: fit-content;
  transition: 0.2s border-color ease;
}
.details .keyboards button:hover {
  background: transparent;
  border-color: transparent;
  outline: 2px solid #a70f0e;
  color: #555;
}
.details .keyboards button:after {
  content: none;
}

/* Colors of keyboards */
.none {
  display: none !important;
}
.keyboard .colors {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.keyboard .colors button:hover {
  background-color: transparent;
  color: #555;
  border-color: #aaa;
}
.keyboard .colors button:after {
  content: none;
}
.keyboard .colors img {
  height: 32px;
  width: 32px;
}
.keyboard .buttons {
  display: flex;
}

.keyboard .buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0px;
  font-weight: 500;
  font-size: 24px;
  width: fit-content;
  transition: none;
  padding: 7px;
}
.keyboard .buttons .selected {
  border: 2px solid #a70f0e;
}
.keyboard .colors .group button.selected {
  border: 1px solid #fff;
  outline: 2px solid #a70f0e;
}
.keyboard .colors .group button:hover {
  border: 1px solid #a70f0e;
}
.keyboard .colors .group div {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}
.keyboard .colors .group button {
  height: 25px;
  margin: 0px;
  width: 25px;
  padding: 0px;
}

/* Details : legends */
.details {
  position: relative;
}

.details .legends .flex {
  display: flex;
  align-items: center;
  gap: 40px;
}
.details .legends img {
  width: 270px;
}
/* overlay */
.details .legends .overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #222;
  opacity: 0.7;
  z-index: 2;
}

/* Alphanumeric */
.details .legends .change.none {
  display: none;
}
.details .legends .detail button {
  margin-bottom: 0px;
  width: fit-content;
}
.details .legends .select {
  display: grid;
  grid-template-columns: repeat(4, 17vw);
  gap: 10px;
  position: fixed;
  top: 0;
  left: 0;
  max-width: 1100px;
  margin: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 30px;
  background-color: #fff;
  max-height: 70vh;
  overflow-y: scroll;
  z-index: 3;
}
.details .legends .select div {
  cursor: pointer;
  padding: 10px;
}
.details .legends .select div.selected {
  outline: 1px solid #a70f0e;
}
.details .legends .select img {
  width: 100%;
}
.details .legends .detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.details .legends .ok {
  position: fixed;
  bottom: 15.2vh;
  z-index: 4;
  max-width: 900px;
  left: 50%;
  transform: translate(-50%);
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: fit-content;
}
.details .legends .ok button {
  margin-bottom: 0px;
  margin-right: 10px;
  width: fit-content;
  text-transform: uppercase;
}
/* Modifiers */
.details .legends .modifier .detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.details .legends .modifier button {
  margin-bottom: 0px;
  width: fit-content;
}
/* Dampners */
.options .dampners {
  width: 100%;
}
.options .dampners select,
option {
  width: 100%;
}
.dampners {
  margin-bottom: 20px;
}
.options textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  outline: none;
}
.options textarea:focus {
  border-color: #a70f0e;
}

@media (max-width: 768px) {
  .btns span {
    display: none;
  }
  .btns button {
    width: 100%;
    padding: 10px 30px;
  }

  .switches select {
    width: 100%;
  }
  .keyboard .colors {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 30px;
  }
  .keyboard .colors .group div {
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
  }
  .keyboard .colors .group button {
    width: 40px;
    height: 40px;
  }
  .details .keygroups .keyboards {
    margin-top: 10px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .keyboard .legends .flex {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
  }
  .details .legends .detail,
  .details .legends .modifier .detail {
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }
  .keyboard .legends .flex .keyboard .legends .flex .modifier {
    width: 100%;
  }
  .details .legends img {
    width: 100%;
  }
  .details .legends .select {
    height: 100vh;
    max-height: initial;
    grid-template-columns: 1fr;
    right: 0;
    left: initial;
    transform: translate(0);
    top: 0;
    max-width: 80vw;
    padding-bottom: 100px;
  }
  .details .legends .ok {
    bottom: 0;
    width: 80vw;
    padding: 20px;
    background: #eee;
    right: 0px;
    left: initial;
    height: 90px;
    transform: translate(0);
  }
}
.nhi {
  pointer-events: none;
  cursor: not-allowed;
  /* opacity: 0.7; */
  filter: grayscale(1);
}
