/* ==========================================================================
   Settings modal
   ========================================================================== */

.settings{ display: flex; min-height: 420px; }
.settings__nav{
  width: 180px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-soft);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings__navitem{
  text-align: left;
  padding: 9px 10px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
}
.settings__navitem:hover{ background: var(--bg-hover); }
.settings__navitem.is-active{ background: var(--bg-hover); color: var(--text-primary); font-weight: 500; }

.settings__content{ flex: 1; padding: 20px 24px; overflow-y: auto; max-height: 70vh; }
.settings__panel{ display: none; }
.settings__panel.is-active{ display: block; }
.settings__panel h3{ font-size: 16px; margin-bottom: 14px; }
.settings__panel .btn{ margin-right: 8px; margin-bottom: 8px; }

.settings__row{
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 16px;
}
.settings__row:last-of-type{ border-bottom: none; }
.settings__row-desc{ color: var(--text-secondary); font-size: 13.5px; margin-bottom: 12px; }
.settings__row select, .settings__row input[type="range"]{
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text-primary);
}

.segmented{ display: flex; background: var(--bg-input); border-radius: var(--radius-sm); padding: 2px; }
.segmented button{
  border: none; background: transparent; padding: 6px 12px;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-secondary);
}
.segmented button[aria-checked="true"]{ background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-2); }

.swatches{ display: flex; gap: 8px; }
.swatch{
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}
.swatch.is-active{ border-color: var(--text-primary); }

.switch{ position: relative; display: inline-block; width: 40px; height: 24px; flex-shrink: 0; }
.switch input{ opacity: 0; width: 0; height: 0; }
.switch span{
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background var(--dur-fast) var(--ease);
  cursor: pointer;
}
.switch span::before{
  content: "";
  position: absolute; width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease);
}
.switch input:checked + span{ background: var(--accent); }
.switch input:checked + span::before{ transform: translateX(16px); }

.memory-list{ list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.memory-item{
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.memory-item button{ border: none; background: transparent; color: var(--text-tertiary); cursor: pointer; }
.memory-item button:hover{ color: var(--danger); }
