/* The plain-text editor owns only this temporary overlay, never page nodes. */
.aern-inline-text {
  position: fixed;
  z-index: 2147483200;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #cfb57a;
  border-radius: 8px;
  background: #111512;
  color: #f4eee0;
  box-shadow: 0 12px 44px rgb(0 0 0 / 65%);
  overflow: auto;
  overscroll-behavior: contain;
  font: 14px/1.4 "Inter", sans-serif;
  text-align: left;
  isolation: isolate;
}

.aern-inline-text [hidden] { display: none !important; }

.aern-inline-text-label {
  margin: 0 0 6px;
  font: 600 13px/1.4 "Inter", sans-serif;
  color: #e6d4ac;
  overflow-wrap: anywhere;
}

.aern-inline-text textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  max-width: 100%;
  margin: 0;
  padding: 6px;
  border: 1px solid #8e805e;
  border-radius: 3px;
  background: #182019;
  caret-color: currentColor;
  outline-offset: 2px;
  resize: none;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-transform: none;
  touch-action: auto;
}

.aern-inline-text textarea[aria-invalid="true"] { border-color: #f2a49a; }
.aern-inline-text textarea:focus-visible { outline: 2px solid #e6cf8e; }

.aern-inline-text-hint {
  margin-top: 6px;
  color: #b5b8ac;
  font: 11px/1.4 "Inter", sans-serif;
  overflow-wrap: anywhere;
}

.aern-inline-text-error {
  margin-top: 6px;
  color: #ffb7ae;
  font: 13px/1.4 "Inter", sans-serif;
  overflow-wrap: anywhere;
}

.aern-inline-text-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 4px;
  background: #111512;
}

.aern-inline-text-count {
  flex: 1 1 auto;
  color: #c0c2b6;
  font: 12px/1.4 "Inter", sans-serif;
}

.aern-inline-text button {
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #8e805e;
  border-radius: 4px;
  background: #22291e;
  color: #f4eee0;
  font: 600 13px/1.2 "Inter", sans-serif;
  text-transform: none;
  cursor: pointer;
  touch-action: manipulation;
}

.aern-inline-text button.aern-inline-text-done { background: #d6bf88; color: #171b14; }
.aern-inline-text button:focus-visible { outline: 2px solid #f5dea6; outline-offset: 2px; }
