/*
 * utm-builder.css — per-tool styles for the UTM Campaign URL Builder.
 * Defines the classes used by view.php + utm-builder.js that aren't in the
 * shared component/utility layers: the param-code chip on field labels, the
 * checkbox option row, the readable/encoded code output blocks, the result
 * labels, and the built-URL history list.
 * Tokens only; no inline styles (CSP: style-src 'self').
 */

/* Inline parameter name (e.g. utm_source) shown beside a field label. */
.param-code {
  font: 12px/1.4 var(--font-mono);
  color: var(--text-muted);
  background: var(--neutral-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  margin-left: var(--space-2);
  white-space: nowrap;
}

/* Options: single checkbox row — input sits inline with its label text. */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.checkbox-row input {
  flex: none;
  accent-color: var(--blue-600);
}

/* Small label above a stand-alone result value (encoded / readable URL). */
.result-label {
  font: 600 13px var(--font-sans);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

/* Monospace output surface for the readable URL preview. Wraps long URLs so
   they never push the page into horizontal scroll. */
.code-output {
  font: 13px/1.5 var(--font-mono);
  background: var(--neutral-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-output-muted { color: var(--text-muted); }

/* ---- Built-URL history (localStorage, last 20) ---- */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* Stacked URL + meta. min-width:0 lets the URL wrap instead of overflowing. */
.history-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.history-url {
  font: 13px/1.4 var(--font-mono);
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
