/* ==========================================================================
   OmniResume — Editor Control Widgets
   ========================================================================== */

/* Color picker row */
.color-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.color-control__preview {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  flex: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.color-control__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.color-control__hex {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  padding: 6px 10px;
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 0;
}

/* Select with custom arrow */
.control-select {
  position: relative;
  width: 100%;
}

.control-select .select {
  padding-right: 2rem;
  font-size: var(--text-sm);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-2xs) 0;
  font-size: var(--text-sm);
}

.toggle-row__label {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

/* Segmented control */
.segmented {
  display: inline-flex;
  padding: 2px;
  background: var(--color-background-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  gap: 2px;
}

.segmented__btn {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.segmented__btn:hover {
  color: var(--color-text-strong);
}

.segmented__btn.is-active {
  background: var(--color-background-elevated);
  color: var(--color-text-strong);
  box-shadow: var(--shadow-xs);
}

/* Preset buttons */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.preset-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-background-elevated);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-weight: var(--font-weight-medium);
}

.preset-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.preset-chip.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* Color theme presets (bands) */
.theme-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}

.theme-preset {
  aspect-ratio: 1 / 1.4;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
  transition: all var(--duration-fast) var(--ease-out);
}

.theme-preset:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.theme-preset.is-active {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.theme-preset__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--preset-color, #0B5FFF);
}

.theme-preset__bar--wide { width: 70%; }
.theme-preset__bar--narrow { width: 40%; }
.theme-preset__bar--thin { height: 2px; opacity: 0.6; }

.theme-preset__swatch {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--preset-color, #0B5FFF);
}