/* pages.css — v2 PRESENTATION helpers for the server-rendered public pages.
   This is NOT the design system (that is styles.css, ported verbatim from the
   prototype). It only supplies styling the prototype expressed through the
   <image-slot> custom element, which we render as a plain placeholder box. */

/* Decorative photo placeholder (where the prototype dropped an <image-slot>). */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 160px;
  box-sizing: border-box;
  padding: 16px;
  border: 2px dashed var(--green-300);
  background: var(--green-50);
  color: var(--forest-600);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .02em;
  border-radius: 14px;
}
/* Fill the parent (hero background, fixed-height columns, news thumbs). */
.photo-placeholder.photo-fill { height: 100%; min-height: 100%; border-radius: inherit; }

/* Light countdown variant (inner.jsx NextCells: cells on a paper card). */
.countdown.cd-on-light .cd-cell { background: var(--paper-2); border: 1px solid var(--line); }
.countdown.cd-on-light .cd-cell b { color: var(--ink-900); }
.countdown.cd-on-light .cd-cell span { color: var(--forest-600); }

/* Contact form — honeypot (hidden from humans) + validation error banner. */
.hp { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fdecea; border: 1px solid #f5c6cb; color: #9b271b; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: .9rem; }
.form-error ul { margin: 0; }

/* ---- Forum rich editor — phase 1.5 polish (icon toolbar, link dialog, placeholder) ---- */
.aa-editor-source-hidden { display: none !important; }
.aa-editor-wrap { display: flex; flex-direction: column; position: relative; }
.aa-editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 7px 8px; border: 1.5px solid var(--line); border-bottom: 0;
  border-radius: var(--r-btn) var(--r-btn) 0 0; background: var(--paper-2);
}
.aa-tb-sep { align-self: stretch; width: 1px; margin: 2px 4px; background: var(--line); }
.aa-tb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 30px; padding: 0; cursor: pointer;
  color: var(--ink-700); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.aa-tb-btn .aa-tb-ico { display: block; width: 18px; height: 18px; pointer-events: none; }
.aa-tb-btn:hover { border-color: var(--accent); color: var(--ink-900); background: var(--accent-soft); }
.aa-tb-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.aa-tb-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.aa-tb-btn.is-active:hover { color: var(--accent-ink); }
.aa-editor-surface {
  border: 1.5px solid var(--line); border-radius: 0 0 var(--r-btn) var(--r-btn);
  background: var(--card); color: var(--ink-900); padding: 14px 16px; min-height: 132px;
}
.aa-editor-surface:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.aa-editor-surface .ProseMirror { outline: none; min-height: 104px; font-size: 1.02rem; line-height: 1.55; }
.aa-editor-surface .ProseMirror > * + * { margin-top: .6em; }
.aa-editor-surface .ProseMirror h2 { font-size: 1.3rem; }
.aa-editor-surface .ProseMirror h3 { font-size: 1.12rem; }
.aa-editor-surface .ProseMirror ul,
.aa-editor-surface .ProseMirror ol { padding-left: 1.4em; }
.aa-editor-surface .ProseMirror blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 12px; color: var(--ink-600); }
.aa-editor-surface .ProseMirror a { color: var(--accent-strong); text-decoration: underline; }
/* Empty-state placeholder (from the @tiptap Placeholder extension) */
.aa-editor-surface .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder); color: var(--ink-500);
  float: left; height: 0; pointer-events: none;
}
/* Inline accessible link dialog */
.aa-link-dialog {
  position: absolute; z-index: 20; min-width: min(360px, 92%); padding: 12px;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-btn); box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.aa-link-dialog[hidden] { display: none; }
.aa-ld-label { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-700); margin-bottom: 6px; }
.aa-ld-row { display: flex; gap: 8px; align-items: center; }
.aa-ld-input {
  flex: 1 1 auto; min-width: 0; font-family: var(--font); font-size: .95rem;
  padding: 8px 10px; color: var(--ink-900); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 8px;
}
.aa-ld-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.aa-ld-error { margin: 8px 0 0; font-size: .8rem; color: var(--danger); }
.aa-ld-error[hidden] { display: none; }
