/* SMS Bridge config UI: light theme, high contrast, monospaced everywhere. */

:root {
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ink: #111111;
  --muted: #4d4d4d;
  --line: #767676;
  --surface: #ffffff;
  --surface-alt: #f3f3f3;
  --error: #b00020;
  --focus: #0b57d0;
  --banner-bg: #fff4ce;
  --banner-line: #7a5c00;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
}

input,
textarea,
button {
  font: inherit;
  color: inherit;
}

.activity {
  padding: 24px;
  max-width: 100%;
}

/* Fields */

.field {
  margin: 0 0 20px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.required {
  color: var(--error);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.field textarea {
  resize: vertical;
  min-height: 6em;
}

/* SMS Name doubles as the page header: big, bold, bottom border only. */
.field--title input {
  padding: 4px 0 6px;
  font-size: 24px;
  font-weight: 700;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--line);
  opacity: 1;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin: 6px 0 0;
  color: var(--error);
  font-weight: 700;
}

/* Focus */

:focus {
  outline: none;
}

:focus-visible,
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Standalone preview */

.debug-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 20px;
  padding: 8px 12px;
  background: var(--banner-bg);
  border: 1px solid var(--banner-line);
  border-radius: 4px;
}

.debug-banner p {
  margin: 0;
}

button {
  padding: 6px 12px;
  background: var(--ink);
  color: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #333333;
}

.preview h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.preview-source {
  margin: 0 0 8px;
  color: var(--muted);
}

.preview pre {
  margin: 0;
  padding: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
