/* ─── Event Builder (Outbox events page) ─── */
.eb-class-name {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  padding: 2px var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  word-break: break-word;
}

.eb-class-module {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  margin-left: var(--space-2);
  word-break: break-all;
}

.eb-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eb-field {
  display: flex;
  flex-direction: column;
}

.eb-field-label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.eb-field-name {
  font-family: var(--font-mono);
  font-weight: 600;
}

.eb-required {
  color: var(--danger);
  font-weight: 600;
}

.eb-field-type {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 400;
  color: var(--text-muted);
}

.eb-field-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.eb-field input[type="text"],
.eb-field input[type="number"],
.eb-field input[type="datetime-local"],
.eb-field textarea,
input.eb-input,
textarea.eb-input,
select.eb-input {
  width: 100%;
  padding: var(--space-2) 10px;
  border-radius: var(--radius-badge);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  box-sizing: border-box;
}

input.eb-input:focus,
textarea.eb-input:focus,
select.eb-input:focus {
  outline: none;
  border-color: var(--primary);
  border-width: 2px;
  padding: 7px 9px;
  box-shadow: 0 0 0 4px var(--primary-18), 0 1px 2px var(--page-overlay-06);
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input.eb-input:hover:not(:focus),
textarea.eb-input:hover:not(:focus),
select.eb-input:hover:not(:focus) {
  border-color: var(--primary);
}

.eb-field textarea {
  resize: vertical;
  min-height: 80px;
}

.dropdown--input.dropdown {
  width: var(--dropdown-width, auto);
  max-width: var(--dropdown-width, 640px);
}

.dropdown--input .dropdown-trigger {
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: var(--space-2) 10px;
  border-radius: var(--radius-badge);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  gap: var(--space-2);
}

.dropdown--input .dropdown-trigger:hover {
  border-color: var(--primary);
  background: var(--bg-elevated);
}

.dropdown--input .dropdown-trigger:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-18), 0 1px 2px var(--page-overlay-06);
  background: var(--surface);
}

.dropdown--input .dropdown-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-18);
  background: var(--surface);
}

.dropdown--input .dropdown-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown--input .dropdown-menu {
  max-height: 360px;
  border-radius: var(--radius-badge);
}

.eb-action-radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eb-action-radios label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--text-primary);
}

.eb-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}

.eb-action-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.eb-action-desc {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.eb-action-radios input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.eb-action-radios input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-18);
  border-radius: 50%;
}

.js-event-json-editor {
  display: block;
  width: 100%;
  max-width: 720px;
  max-height: 50vh;
  min-height: 240px;
  padding: var(--space-3) 14px;
  border-radius: var(--radius-badge);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.5;
  box-sizing: border-box;
  resize: vertical;
}

.js-event-json-editor:focus,
.js-event-json-editor:focus-within {
  outline: none;
  border-color: var(--primary);
  border-width: 2px;
  padding: 11px 13px;
  box-shadow: 0 0 0 4px var(--primary-18), 0 1px 2px var(--page-overlay-06);
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.js-event-json-editor:hover:not(:focus) {
  border-color: var(--primary);
}

[data-tab] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 90px;
  justify-content: center;
}

[data-tab].btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}

[data-tab].btn-secondary {
  background: var(--surface-raised);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-tab].btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

.eb-field input:focus,
.eb-field textarea:focus,
.eb-field input:focus-within,
.eb-field textarea:focus-within {
  outline: none;
  border-color: var(--primary);
  border-width: 2px;
  padding: 7px 9px;
  box-shadow: 0 0 0 4px var(--primary-18), 0 1px 2px var(--page-overlay-06);
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.eb-field input:hover:not(:focus),
.eb-field textarea:hover:not(:focus) {
  border-color: var(--primary);
}

.eb-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.eb-field input[type="checkbox"]:hover:not(:focus) {
  border-color: var(--primary);
}

.eb-field input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-18);
  border-width: 2px;
  padding: 0;
}

.eb-routing-hint {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  align-items: baseline;
  margin: 0;
  padding: var(--space-2) 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-badge);
}

.eb-routing-hint dt {
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0;
}

.eb-routing-hint dd {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-primary);
  margin: 0;
  word-break: break-all;
}

.eb-routing-hint dd code {
  font-family: inherit;
  font-size: inherit;
}

.eb-routing-empty {
  display: inline-block;
  padding: var(--space-1) 10px;
  border-radius: var(--radius-xs);
  background: var(--surface-raised);
  border: 1px dashed var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}
