/* WordPress-only additions. Everything here is derived from the prototype's own
   tokens and components (template-mapping.md § Step 4); no new colours or fonts.
   Each block says what it extends. */

/* ---------- Page hero: optional separate mobile image ----------
   The prototype's hero <img> is a direct child of .mona-page-hero. When the admin
   uploads a mobile banner the <img> sits inside a <picture>; display:contents keeps
   the layout identical, and the image gets the prototype's .mona-page-hero > img rule. */
.mona-page-hero > picture { display: contents; }
.mona-page-hero > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

/* ---------- Pagination (mona_pagination) — styled like .mona-loc-filter tabs ---------- */
.mona-pagination { margin-top: clamp(40px, 6vw, 72px); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.mona-pagination .page-numbers {
  min-width: 42px; height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.mona-pagination a.page-numbers:hover { border-color: var(--ink); }
.mona-pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.mona-pagination .page-numbers.dots { border-color: transparent; }

/* ---------- Listing: results swap while a filter is loading ---------- */
[data-listing-results] { transition: opacity .25s var(--ease); }
[data-listing-results].mona-is-loading { opacity: .45; pointer-events: none; }

/* ---------- Forms: error states for the Smart Form markup (dynamic-content.md § Forms) ---------- */
.mona-field [aria-invalid="true"] { border-color: #a5432f; }
.mona-field-error { display: block; margin-top: 6px; font-size: 12px; color: #a5432f; letter-spacing: .02em; }
.mona-form-error { margin: 0; font-size: 13px; color: #a5432f; }
.mona-field-accept { display: flex; gap: 10px; align-items: flex-start; }
.mona-field-accept input { margin-top: 4px; }
button[type="submit"][aria-busy="true"] { opacity: .6; cursor: progress; }

/* ---------- Empty states and search (derived from .mona-listing-empty / .mona-lede) ---------- */
.mona-search-head { padding: clamp(40px, 7vw, 90px) 0 0; text-align: center; }
.mona-search-head .mona-statement { margin-inline: auto; }
.mona-search-head form { max-width: 560px; margin: 26px auto 0; display: flex; gap: 10px; }
.mona-search-head input[type="search"] { flex: 1; }

/* ---------- 404 ---------- */
.mona-notfound { padding: clamp(80px, 12vw, 160px) 0; text-align: center; }
.mona-notfound .mona-statement { margin: 18px auto 30px; }
.mona-notfound-links { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: center; margin-top: 30px; }

/* ---------- Legal pages: WordPress editor output inside .mona-legal ---------- */
.mona-legal-inner img { max-width: 100%; height: auto; }
.mona-legal-inner .wp-block-table table,
.mona-legal-inner table:not([class]) { width: 100%; border-collapse: collapse; }

/* ---------- Admin bar offset for the fixed header ---------- */
body.admin-bar .mona-site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { body.admin-bar .mona-site-header { top: 0; } }
