/* ============================================================
   editor.css — chrome for the server-backed editor.
   Added 2026-08-11 alongside api/api.php. Kept separate from
   admin.css so the original login styling stays untouched.

   Mobile-first on purpose: Laurie edits from her phone, so
   controls are thumb-sized and Save is pinned to the bottom.
   ============================================================ */

.editor { max-width: 780px; margin: 0 auto; padding: 0 16px 110px; }

.ed-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.ed-brand {
  font-family: var(--display, inherit);
  letter-spacing: 2px; font-size: 1.05rem;
  color: var(--gold-soft, #f0d69a);
}
.ed-bar-actions { display: flex; gap: 14px; align-items: center; }
.ed-link {
  background: none; border: 0; padding: 8px 2px; cursor: pointer;
  font: inherit; font-size: .85rem; color: var(--ink-soft, #b9b4cc);
  text-decoration: underline; text-underline-offset: 3px;
}
.ed-link:hover { color: var(--gold, #e9c878); }

.ed-tabs { display: flex; gap: 8px; margin: 16px 0 22px; flex-wrap: wrap; }
.ed-tab {
  flex: 1 1 auto; min-height: 44px; padding: 10px 14px; cursor: pointer;
  font: inherit; font-size: .9rem;
  background: rgba(255, 255, 255, .04); color: var(--ink-soft, #b9b4cc);
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 10px;
}
.ed-tab.is-on {
  background: rgba(233, 200, 120, .12);
  border-color: var(--gold, #e9c878);
  color: var(--gold-soft, #f0d69a);
}

.ed-group {
  font-family: var(--display, inherit);
  font-size: 1rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-soft, #f0d69a);
  margin: 30px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ed-group:first-child { margin-top: 4px; }

.editor .field { display: block; margin: 0 0 18px; }
.editor .field > span { display: block; margin-bottom: 6px; font-size: .9rem; color: #ded9ee; }
.editor .field > span small { color: var(--ink-soft, #b9b4cc); font-weight: 400; }

.editor input, .editor textarea {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); color: #f2f0f8;
  border: 1px solid rgba(255, 255, 255, .12);
  font: inherit;
  font-size: 16px;          /* 16px keeps iOS from zooming in on focus */
  line-height: 1.5;
}
.editor textarea { resize: vertical; min-height: 88px; }
.editor input:focus, .editor textarea:focus {
  outline: 2px solid var(--gold, #e9c878); outline-offset: 1px;
}
.ed-help { display: block; margin-top: 6px; font-size: .78rem; color: var(--ink-soft, #b9b4cc); }

.ed-post {
  padding: 16px; margin: 0 0 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .09);
}
.ed-post-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ed-remove {
  background: none; border: 0; cursor: pointer; padding: 8px;
  font: inherit; font-size: .82rem; color: #e6a0a0; text-decoration: underline;
}

.ed-note {
  margin-top: 26px; padding: 14px 16px; border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border-left: 3px solid var(--gold, #e9c878);
  font-size: .86rem; line-height: 1.6; color: var(--ink-soft, #b9b4cc);
}

/* Save bar stays under the thumb */
.ed-save {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(14, 11, 24, .96);
  border-top: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(8px);
}
.ed-save .btn { min-height: 46px; padding: 12px 26px; margin: 0; width: auto; }
.ed-status { font-size: .85rem; color: var(--ink-soft, #b9b4cc); }
.ed-status.is-ok  { color: #9fd9a8; }
.ed-status.is-bad { color: #ff9d9d; }

.btn-ghost { background: none; border: 1px dashed rgba(255, 255, 255, .25); color: var(--ink-soft, #b9b4cc); }
.btn-ghost:hover { border-color: var(--gold, #e9c878); color: var(--gold-soft, #f0d69a); }

@media (min-width: 700px) {
  .ed-tabs .ed-tab { flex: 0 0 auto; }
  .ed-save { justify-content: flex-end; }
  .ed-save .ed-status { margin-right: auto; }
}
