/* «نافذة النص», as the prototype draws it (A2.html .stabs/.stab, .field, .ferr, .oneline): the four language tabs, the title and
   the description of the tab, the plain-text line, «حفظ» and «إلغاء». Values are tokens; the gaps between the parts are the
   spacing tokens (the owner's spacing rule, M-004-1): nothing touches the text around it, the error box included. */
.tw-tabs {
  display: flex;
  gap: var(--spacing-xs);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--app-line);
  scrollbar-width: none;
}

.tw-tab {
  flex: none;
  min-height: 44px;
  padding: 0 var(--spacing-row);
  border: 0;
  border-bottom: 2px solid transparent;
  background-color: transparent;
  color: var(--app-muted);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.tw-tab[aria-selected="true"] {
  border-bottom-color: var(--app-btn);
  color: var(--app-ink);
}

.tw-field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.tw-field label {
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.tw-field input,
.tw-field textarea {
  width: 100%;
  padding: var(--spacing-row);
  border: 1px solid var(--app-line-strong);
  border-radius: var(--radius-md);
  background-color: var(--app-surface);
  color: var(--app-ink);
  font-family: inherit;
  font-size: var(--font-size-body);
  line-height: 1.6;
}

.tw-field textarea {
  min-height: 160px;
  resize: vertical;
}

.tw-error {
  margin: 0 0 var(--spacing-md);
  padding: var(--spacing-row) var(--spacing-md);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  color: var(--color-danger);
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.65;
}

.tw-error[hidden] {
  display: none;
}

.tw-note {
  margin: 0 0 var(--spacing-md);
  font-size: var(--font-size-meta);
  color: var(--app-ink-soft);
}
