/* settings.css — the bottom-right gear and its modal. Silver Sony-remote theme. */

#settings {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
#settings.hidden { display: none; }

#setpanel {
  width: min(94vw, 460px);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #d0d0ca 0%, #bdbdb7 55%, #aeaea8 100%);
  border: 1px solid #9d9d96;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 14px;
  box-sizing: border-box;
  color: #2c2c28;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
#setheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
#setheader .ptitle { color: #1b1b16; font-weight: 700; letter-spacing: 3px; }
#setclose {
  background: linear-gradient(180deg, #f2f2ec 0%, #dcdcd5 50%, #cbcbc4 100%);
  border: 1px solid #9d9d96; border-radius: 9px; color: #2c2c28;
  cursor: pointer; padding: 4px 11px; font-family: inherit; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 1px 2px rgba(0, 0, 0, 0.28);
}
#setclose:hover { background: linear-gradient(180deg, #f7f7f2, #e2e2db); }
#setclose:active {
  background: linear-gradient(180deg, #c9c9c2, #d8d8d1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}

#setpanel h4 { margin: 12px 0 6px; color: #1b1b16; font-weight: 700; font-size: 13px; letter-spacing: 1px; }
#setpanel .sethint { margin: 0 0 6px; color: #5a5a54; font-size: 12px; }
#setpanel .setrow { display: flex; gap: 6px; margin-bottom: 6px; }
#setpanel input, #setpanel textarea {
  width: 100%;
  background: #fff; border: 1px solid #9d9d96; border-radius: 9px; color: #1b1b16;
  font-family: inherit; padding: 8px; box-sizing: border-box; outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
#setpanel input:focus, #setpanel textarea:focus { border-color: #4a82c0; }
#setpanel textarea { height: 120px; resize: vertical; font-size: 12px; }
#setpanel button {
  background: linear-gradient(180deg, #f2f2ec 0%, #dcdcd5 50%, #cbcbc4 100%);
  border: 1px solid #9d9d96; border-radius: 9px; color: #2c2c28;
  font-family: inherit; font-weight: 700; cursor: pointer; padding: 7px 14px; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 1px 2px rgba(0, 0, 0, 0.28);
}
#setpanel button:hover { background: linear-gradient(180deg, #f7f7f2, #e2e2db); }
#setpanel button:active {
  background: linear-gradient(180deg, #c9c9c2, #d8d8d1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}

/* primary actions — blue Sony key */
#setexport, #setimport {
  background: linear-gradient(180deg, #4a82c0 0%, #2f63a0 55%, #244f86 100%);
  border: 1px solid #1e436f; color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
}
#setexport:hover, #setimport:hover { background: linear-gradient(180deg, #5a92d0, #3a72b0); }
#setexport:active, #setimport:active {
  background: linear-gradient(180deg, #2f63a0, #244f86);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}

#setmsg { min-height: 1.2em; color: #b45a00; font-weight: 700; font-size: 12px; margin: 6px 0 0; }

/* signal toggle switch (ANALOG | DIGITAL) */
#sig.sigsw {
  display: inline-flex;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #9d9d96;
  background: #cbcbc4;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
#sig.sigsw .opt {
  padding: 7px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: #5a5a54;
  transition: background 0.15s, color 0.15s;
}
#sig.analog .opt.a,
#sig.digital .opt.d {
  background: linear-gradient(180deg, #4a82c0, #2f63a0);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

/* signal-strength selector (LOW | MID | MAX) — three real buttons, segmented */
#setpanel .qualsw {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #9d9d96;
  background: #cbcbc4;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}
#setpanel .qualsw .opt {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: #5a5a54;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
#setpanel .qualsw .opt + .opt { border-left: 1px solid #b3b3ac; }   /* segment dividers */
#setpanel .qualsw .opt:hover { background: rgba(0, 0, 0, 0.06); }
#setpanel .qualsw .opt.on {
  background: linear-gradient(180deg, #4a82c0, #2f63a0);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
