/* Qídé UI — lightweight control panel library
   Styled to match the Qídé Studio site aesthetic. */

@font-face {
  font-family: "nudicamono-regular";
  src:
    url("../../nudicamono-regular-webfont.woff2") format("woff2"),
    url("../../nudicamono-regular-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.qide-ui-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 280px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #000000;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  z-index: 1000;
  pointer-events: auto;
}

.qide-ui-panel-title {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f1f1;
  text-transform: uppercase;
  font-weight: normal;
}

.qide-ui-folder {
  border-bottom: 1px solid #333333;
}

.qide-ui-folder:last-child {
  border-bottom: none;
}

.qide-ui-folder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
}

.qide-ui-folder-header:hover,
.qide-ui-folder-header:focus {
  background-color: #111111;
}

.qide-ui-folder-arrow {
  font-size: 10px;
}

.qide-ui-folder-content {
  padding: 0 12px 10px;
}

.qide-ui-folder .qide-ui-folder {
  margin-left: 8px;
  border-bottom: none;
  border-left: 1px solid #333333;
}

.qide-ui-folder .qide-ui-folder .qide-ui-folder-header {
  padding: 8px 10px;
  font-size: 12px;
}

.qide-ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

.qide-ui-label {
  flex: 0 0 auto;
  text-transform: none;
}

.qide-ui-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.qide-ui-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 2px;
  background: #333333;
  outline: none;
}

.qide-ui-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: #f1f1f1;
  cursor: pointer;
}

.qide-ui-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #f1f1f1;
  cursor: pointer;
  border: none;
}

.qide-ui-slider-value {
  min-width: 28px;
  text-align: right;
  font-size: 11px;
  color: #ffd700;
}

.qide-ui-select {
  background-color: #000000;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  font-family: inherit;
  font-size: 12px;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 0;
}

.qide-ui-select:focus {
  outline: 1px solid #ffd700;
  outline-offset: 1px;
}

.qide-ui-toggle {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #f1f1f1;
  background-color: #000000;
  cursor: pointer;
  position: relative;
  border-radius: 0;
  flex: 0 0 auto;
}

.qide-ui-toggle:checked {
  background-color: #ffd700;
  border-color: #ffd700;
}

.qide-ui-toggle:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000000;
  font-size: 11px;
}

.qide-ui-text {
  background-color: #000000;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  font-family: inherit;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 0;
}

.qide-ui-text:focus {
  outline: 1px solid #ffd700;
  outline-offset: 1px;
}

.qide-ui-color {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #f1f1f1;
  background: none;
  cursor: pointer;
  border-radius: 0;
}

.qide-ui-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.qide-ui-color::-webkit-color-swatch {
  border: none;
}

.qide-ui-color::-moz-color-swatch {
  border: none;
}

.qide-ui-button {
  width: 100%;
  padding: 8px;
  background-color: #000000;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  border-radius: 0;
}

.qide-ui-button:hover:not(:disabled),
.qide-ui-button:focus {
  background-color: #ffd700;
  color: #000000;
  border-color: #ffd700;
}

.qide-ui-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qide-ui-separator {
  height: 1px;
  background-color: #333333;
  margin: 10px 0;
}

.qide-ui-monitor-value {
  min-width: 50px;
  text-align: right;
  font-size: 12px;
  color: #ffd700;
}
