/* WordPress specifics that the static site did not need. */

/* Fixed header and reading bar sit under the admin bar when logged in. */
.admin-bar .site-header { top: 32px; }
.admin-bar .progress { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .progress { top: 46px; }
}
@media (max-width: 600px) {
  /* The admin bar scrolls away on small screens. */
  .admin-bar .site-header { top: 0; }
  .admin-bar .site-header:not(.scrolled) { top: 46px; }
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Editor content inside articles and pages. */
.prose .alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.prose .alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.prose .aligncenter { margin-inline: auto; display: block; }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-caption-text { margin-top: 0.6em; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); text-align: center; }
.prose img { height: auto; }
.prose .wp-block-image img { margin-block: 0; }
.prose iframe, .prose video { max-width: 100%; }

/* Generic page template. */
.page-generic .a-head { padding-bottom: 0; }
.page-generic .share { border-top: 0; }

/* Pagination on the journal (only shows when there are more than 60 articles). */
.mh-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(40px, 5vw, 64px); }
.mh-pagination .page-numbers { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--green); font-weight: 600; text-decoration: none; }
.mh-pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: var(--white); }

/* Contact Form 7 inside the contact section: same look as the theme's form. */
.mh-cf7 .hidden-fields-container { display: none; }
.mh-cf7 .wpcf7-form-control-wrap { display: block; }
.mh-cf7 .wpcf7-submit { justify-self: start; }
.mh-cf7 .wpcf7-spinner { display: none; }
.mh-cf7.submitting .wpcf7-submit { cursor: progress; }
.mh-cf7.submitting .wpcf7-submit { opacity: 0.7; }
.mh-cf7 .wpcf7-not-valid { border-color: #a4332b; border-width: 2px; }
.mh-cf7 .wpcf7-not-valid-tip { margin-top: 6px; color: #a4332b; font-size: 0.9rem; font-weight: 550; }
.mh-cf7 .wpcf7-response-output { margin: 0 !important; padding: 12px 16px !important; border-radius: 12px; border: 1.5px solid var(--line) !important; font-size: 0.96rem; font-weight: 550; color: var(--ink-soft); }
.mh-cf7.sent .wpcf7-response-output { border-color: var(--green) !important; color: var(--green); }
.mh-cf7.invalid .wpcf7-response-output, .mh-cf7.failed .wpcf7-response-output, .mh-cf7.aborted .wpcf7-response-output, .mh-cf7.spam .wpcf7-response-output { border-color: #a4332b !important; color: #a4332b; }
.mh-cf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 860px) { .mh-cf7 .wpcf7-submit { width: 100%; } }

/* Back to top button (bottom right). Appears after scrolling down. */
.to-top {
  position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 40;
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  background: var(--green); color: var(--gold); border: 1.5px solid rgba(207, 176, 131, 0.55);
  box-shadow: 0 14px 30px -12px rgba(0, 35, 30, 0.55); text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s, background-color 0.2s, color 0.2s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold); color: var(--green); }
.to-top:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 600px) { .to-top { right: 14px; width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
#main:focus { outline: none; }
