/* GtmCamp — WordPress-specific layer on top of main.css (which is built from the approved mockups). */

/* ---------- Accessibility helpers ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; margin: 0; clip-path: none; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Admin bar vs. sticky elements ---------- */
.admin-bar .site-header { top: 32px; }
.admin-bar .sidebar-sticky, .admin-bar .toc, .admin-bar .buy, .admin-bar .dash-nav, .admin-bar .about .portrait { top: 136px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* ---------- Header details ---------- */
/* header logo styles come from main.css (mockups/assets/style.css is the single source) */
.card-cover .corner { text-transform: uppercase; }
a.tag:hover { background: color-mix(in srgb, var(--accent, var(--blue)) 16%, white); }

/* ---------- Covers with a real featured image ---------- */
.card-cover.has-image { background: var(--bg-soft); }
.card-cover.has-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Pagination (three slots: newer · page · older) ---------- */
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; }
.pagination .pagination-older { text-align: right; }
.pagination .mono-label { text-align: center; }

.empty-state { padding: 40px 0; color: var(--navy-soft); font-size: 17px; }

/* ---------- Post without a table of contents: centre the article ---------- */
.post-layout--no-toc { grid-template-columns: minmax(0, 720px); justify-content: center; }
.page-body { display: grid; grid-template-columns: minmax(0, 720px); justify-content: center; padding-top: 48px; padding-bottom: 96px; }
.author-box .more { color: var(--blue); font-weight: 600; white-space: nowrap; }

/* ---------- 404 ---------- */
.not-found { padding-top: 72px; padding-bottom: 120px; }
.not-found-card { max-width: 640px; margin: 0 auto; padding: 48px 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); text-align: center; }
.not-found-card code { display: inline-block; margin: 18px 0 8px; font: 700 clamp(22px, 4vw, 32px) var(--mono); background: #fff; padding: 10px 18px; border: 1.5px solid var(--navy); border-radius: 6px; box-shadow: 5px 5px 0 var(--orange); }
.not-found-card p { color: var(--navy-soft); margin: 14px 0 24px; }
.not-found-card .search-big { text-align: left; margin-bottom: 28px; }
.not-found-card .search-big input { background: #fff; }

/* ---------- Gutenberg blocks inside .prose ---------- */
.prose img { height: auto; border-radius: var(--radius); }
.prose .wp-block-image img { border: 1px solid var(--line-strong); }
.prose figcaption, .prose .wp-element-caption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.prose .alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.prose .alignleft { float: left; margin: 6px 24px 12px 0; }
.prose .alignright { float: right; margin: 6px 0 12px 24px; }

/* code: <pre class="wp-block-code"><code> — main.js adds the language bar + Copy button */
.prose pre { margin-bottom: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 14px; line-height: 1.65; color: var(--navy); background: #fbfcfe; border: 1px solid var(--line-strong); border-radius: var(--radius); tab-size: 2; }
.prose pre code { font: inherit; background: none; border: 0; padding: 0; white-space: pre; }
.prose .codeblock pre { border: 0; border-radius: 0; margin: 0; }
.prose .wp-block-preformatted { white-space: pre-wrap; }

/* embeds (YouTube etc.) — rounded 16:9 frame like the mockup's video block */
.prose .wp-block-embed { margin-left: 0; margin-right: 0; }
.prose .wp-block-embed__wrapper { position: relative; border-radius: var(--radius); overflow: hidden; background: #0f1b2d; }
.prose .wp-block-embed iframe { display: block; width: 100%; }
.prose .wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper { aspect-ratio: 16 / 9; }
.prose .wp-block-embed.wp-embed-aspect-16-9 iframe { position: absolute; inset: 0; height: 100%; }
.prose > iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }

/* quotes, tables, separators, buttons */
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--orange); color: var(--navy); font-size: 1.05em; }
.prose blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--muted); }
.prose hr, .prose .wp-block-separator { border: 0; border-top: 1px solid var(--line-strong); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose .wp-block-table { overflow-x: auto; margin-left: 0; margin-right: 0; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.prose th, .prose thead td { background: var(--bg-soft); font-weight: 600; }
.prose .wp-block-button__link { display: inline-flex; font: 600 15px/1 var(--sans); padding: 13px 18px; border-radius: 8px; background: var(--navy); color: #fff; text-decoration: none; }
.prose .wp-block-button__link:hover { background: #24406a; }
.prose .is-style-outline .wp-block-button__link { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.prose h4 { font-size: 17px; color: var(--navy); margin-top: 1.6em; }
.prose kbd { font: 500 .85em var(--mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: #fff; }

/* "Note" callout: any Group block with the class "callout" (or the is-style-callout block style) */
.prose .wp-block-group.callout, .prose .is-style-callout { display: block; }
.prose .wp-block-group.callout > * + *, .prose .is-style-callout > * + * { margin-top: .6em; }

/* ---------- Email-gated download box (GtmCamp Core plugin) ---------- */
.prose .download h3 { margin-top: 0; }
.prose .download p { margin-top: 0; }
.download-status { margin: 0 0 4px !important; font-weight: 600; font-size: 15px; color: var(--teal); }
.download form[hidden] { display: none; }

/* ---------- Comments ---------- */
.comments { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { font-size: 22px; letter-spacing: -0.015em; margin: 0 0 24px; }
.comments-title .mono-label { display: block; margin-bottom: 6px; font-weight: 400; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 28px; padding-left: 20px; border-left: 1px solid var(--line-strong); }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.comment-meta .avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); }
.comment-author a { color: inherit; }
.comment-date { color: var(--muted); font-size: 13px; }
.comment-date:hover { color: var(--blue); }
.comment-content.prose { font-size: 16px; line-height: 1.7; }
.comment-pending { font: 500 12px var(--mono); color: #b65a08; margin: 0 0 8px; }
.comment-reply { margin-top: 10px; }
.comment-reply a { font: 500 12px var(--mono); color: var(--navy-soft); border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px 9px; }
.comment-reply a:hover { border-color: var(--blue); color: var(--blue); }
.by-post-author > .comment-body { background: linear-gradient(90deg, color-mix(in srgb, var(--orange) 5%, white), transparent 60%); padding-left: 14px; margin-left: -14px; border-radius: 8px; }
.comment-respond { margin-top: 40px; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-soft); }
.comment-list .comment-respond { margin: 16px 0; }
.comment-reply-title small { margin-left: 12px; font: 500 13px var(--sans); }
.comment-reply-title small a { color: var(--blue); }
.comment-notes, .logged-in-as { margin: -12px 0 18px; font-size: 14px; color: var(--muted); }
.logged-in-as a { color: var(--blue); }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.comment-form p { margin: 0 0 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
  width: 100%; font: 400 15px var(--sans); color: var(--navy); padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
}
.comment-form textarea.field { resize: vertical; min-height: 140px; margin-bottom: 0; font-family: var(--sans); line-height: 1.6; }
.comment-form input:focus { outline: 2px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue); }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--navy-soft); }
.comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-form .form-submit { margin: 18px 0 0; }
.comments .nav-links { display: flex; justify-content: space-between; padding: 18px 0; font-weight: 600; font-size: 14px; }
@media (min-width: 641px) {
  .comment-form-author, .comment-form-email { display: inline-block; width: calc(50% - 8px); vertical-align: top; }
  .comment-form-author { margin-right: 12px !important; }
}
@media (max-width: 640px) {
  .comment-respond { padding: 20px 16px; }
  .comment-list .children { margin-left: 8px; padding-left: 12px; }
}

@media (max-width: 900px) {
  .prose .alignwide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 640px) {
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination .mono-label { display: none; }
  .not-found-card { padding: 32px 20px; }
  .prose .alignleft, .prose .alignright { float: none; margin: 0; }
}
