/* JSON to XML / XML to JSON: the options bar, the input and output side by side, and the warnings list. */

.xj { display: flex; flex-direction: column; gap: 20px; }

.xj-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; }

/* The direction switch is two links to the two pages, styled like the other segmented controls. */
.xj-direction { display: inline-flex; align-items: center; text-decoration: none; }
.xj-direction[aria-current="page"] { font-weight: 700; background: var(--accent); }

.xj-option { display: flex; flex-direction: column; gap: 6px; }
.xj-option-label { font-size: 14px; font-weight: 700; }
.xj-option .segmented-btn { min-height: 40px; padding: 0 14px; font-size: 14px; }

.xj-root { max-width: 260px; }
.xj-root-input { height: 40px; font: 14px var(--font-mono); }
.xj-root-hint { display: none; font-size: 12px; color: var(--ink-3); }
.xj-root.is-unused .xj-root-input { opacity: 0.55; }
.xj-root.is-unused .xj-root-hint { display: block; }

.xj-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; font-weight: 600; cursor: pointer; }
.xj-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

.xj-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* Both panes get a head of the same height, so the two text boxes line up. */
.xj-pane-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 40px; }
.xj-actions { display: flex; gap: 8px; }
.xj-btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.xj-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.xj-text {
  display: block;
  width: 100%;
  height: 440px;
  margin: 0;
  padding: 14px 16px;
  font: 14px/1.55 var(--font-mono);
  color: var(--ink);
  tab-size: 4;
  white-space: pre;
  overflow: auto;
  background: var(--surface-2);
  border: var(--border);
  border-radius: 12px;
}
textarea.xj-text { resize: vertical; }
.xj-output { background: var(--surface); }
.xj-output.is-empty { color: var(--line-soft); }

.xj-share-status { font-size: 13px; color: var(--ink-2); }
.xj-share-status:empty { display: none; }

.xj-summary { margin: 0; font: 600 15px var(--font-mono); }
.xj-summary:empty { display: none; }

.xj-warnings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 12px 16px 12px 34px;
  font-size: 14px;
  background: #FFFAEB;
  border: var(--border);
  border-left: 6px solid #F79009;
  border-radius: 12px;
}

@media (max-width: 860px) {
  .xj-panes { grid-template-columns: minmax(0, 1fr); }
  .xj-text { height: 300px; }
}
