/* Settings panel */
#settings{
  position: fixed;
  top: 16px; right: 16px;
  width: 280px;
  max-height: calc(100vh - 32px);
  z-index: 10000;
  background: rgba(18,19,22,.94);
  border: 1px solid #2c2e33;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  color: #d6d8dc;
  font: 12px/1.45 system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(6px);
}
.panel__head{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #2c2e33;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.panel__head:active{ cursor: grabbing; }
.panel__grip{ color: #55585f; }
.panel__title{ font-weight: 700; letter-spacing: .12em; flex: 1; }
.panel__close{
  background: none; border: 0; color: #9a9da3;
  font-size: 16px; cursor: pointer; padding: 0 4px;
}
.panel__close:hover{ color: #fff; }

.panel__body{ overflow-y: auto; padding: 4px 12px 10px; }
.panel__body section{ padding: 8px 0; border-bottom: 1px solid #232529; }
.panel__body section:last-of-type{ border-bottom: 0; }
.panel__body h3{
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: .14em;
  color: #8b8e95;
  text-transform: uppercase;
}
.gridinfo{ color: #6fdc8c; margin-left: 6px; letter-spacing: .06em; }

.row{
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}
.row > select, .row > input[type=text], .row > input[type=number],
.row > input[type=datetime-local]{
  flex: 1;
  min-width: 0;
  background: #0e0f11;
  color: #e6e7ea;
  border: 1px solid #33363c;
  border-radius: 5px;
  padding: 4px 6px;
  font: inherit;
  outline: none;
}
.row > input:focus, .row > select:focus{ border-color: #5a80c9; }
.row > input[type=range]{ flex: 1; accent-color: #6fdc8c; }
.row .val{ width: 44px; text-align: right; color: #9a9da3; }
.row.check{ justify-content: flex-start; }
.row button, .panel__foot button{
  background: #23262b;
  color: #e6e7ea;
  border: 1px solid #3a3d44;
  border-radius: 5px;
  padding: 4px 10px;
  font: inherit;
  cursor: pointer;
}
.row button:hover, .panel__foot button:hover{ background: #2d3138; }

.modeopts{ display: none; margin: 2px 0 0; }
.row.locked{ opacity: .38; }
.row.locked > select, .row.locked > input{ cursor: not-allowed; }
.hint{ color: #797d84; margin: 4px 0 0; }
.hint code{
  display: inline-block;
  background: #0e0f11;
  border-radius: 4px;
  padding: 2px 5px;
  margin-top: 3px;
  font-size: 11px;
  color: #9fc3a8;
}
.panel__foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

/* toast shown when the panel closes */
.flapper-toast{
  position: fixed;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  background: rgba(18,19,22,.92);
  border: 1px solid #2c2e33;
  color: #c9ccd2;
  font: 12px system-ui, sans-serif;
  letter-spacing: .1em;
  padding: 8px 14px;
  border-radius: 8px;
  transition: opacity .5s;
}
.flapper-toast.gone{ opacity: 0; }
