/* ==============================================================
   PASTOR ZACH'S BLOG — CONSOLIDATED CUSTOM CSS
   Colors: slate blue #3F5F8F | charcoal #34383D
   ============================================================== */

/* ---------- Site colors ---------- */

.entry-title,
.entry-title a,
.entry-title a:link,
.entry-title a:visited,
.entry-title a:hover,
.entry-title a:focus,
.entry-title a:active {
  color: #3F5F8F !important;
}

.entry-content a,
.entry-summary a,
.comment-content a,
.widget a,
.site-info a {
  color: #3F5F8F;
}

.entry-content a:hover,
.entry-summary a:hover,
.comment-content a:hover,
.widget a:hover,
.site-info a:hover {
  color: #34383D;
}

.entry-content blockquote,
.entry-content .wp-block-quote {
  border-left-color: #34383D !important;
}

/* ---------- Post layout ---------- */

.site-main > article.hentry {
  background: #ffffff !important;
  border: 0 !important;
  border-bottom: 1px solid #cccccc !important;
  box-sizing: border-box;
  margin-bottom: 48px;
  padding: 0 !important;
}

.site-main > article.hentry > .entry-header {
  background: transparent !important;
  border-top: 3px solid #34383D !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 28px 0 24px !important;
  width: 100% !important;
}

.site-main > article.hentry > .entry-header .entry-title {
  color: #3F5F8F !important;
  margin: 0 !important;
  padding: 0 !important;
}

.site-main > article.hentry > .entry-content {
  box-sizing: border-box;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 0 24px !important;
  width: 100% !important;
}

.site-main > article.hentry > .entry-content > p,
.site-main > article.hentry > .entry-content > h2,
.site-main > article.hentry > .entry-content > h3,
.site-main > article.hentry > .entry-content > h4 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

/* Opening photograph uses the full post width. */
.site-main > article.hentry .entry-content > .wp-block-image:first-child,
.site-main > article.hentry .entry-content > .cs-rating + .wp-block-image {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.site-main > article.hentry .entry-content > .wp-block-image:first-child figure,
.site-main > article.hentry .entry-content > .wp-block-image:first-child img,
.site-main > article.hentry .entry-content > .cs-rating + .wp-block-image figure,
.site-main > article.hentry .entry-content > .cs-rating + .wp-block-image img {
  display: block;
  height: auto;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.site-main > article.hentry .wp-block-image + p {
  margin-top: 28px !important;
}

.site-main > article.hentry > .entry-footer {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media screen and (max-width: 600px) {
  .site-main > article.hentry > .entry-header {
    padding: 22px 0 20px !important;
  }
}

/* ---------- Sidebar: Search and Subscribe ---------- */

/* Prevent the empty CSS-only widget from drawing a divider. */
#secondary #block-5 {
  border: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Exactly one line above and below Search. */
#secondary .widget_search {
  border-top: 3px solid #34383D !important;
  border-bottom: 3px solid #34383D !important;
  margin: 0 0 24px !important;
  padding: 24px 0 !important;
}

#secondary .widget_search .wp-block-search {
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Keep the Search label available to screen readers. */
#secondary .widget_search .wp-block-search__label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#secondary .widget_search .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Matching input fields. */
#secondary #subscribe-field,
#secondary .widget_search .wp-block-search__input {
  box-sizing: border-box !important;
  flex: 1 1 100%;
  width: 100% !important;
  min-width: 0;
  height: 46px !important;
  padding: 10px 14px !important;
  border: 1px solid #3F5F8F !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: #34383D !important;
  font-family: "Lora", Georgia, serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

#secondary #subscribe-field::placeholder,
#secondary .widget_search .wp-block-search__input::placeholder {
  color: #777777 !important;
  opacity: 1 !important;
}

/* Matching buttons. */
#secondary #subscribe-submit,
#secondary .widget_search .wp-block-search__button {
  margin-left: auto !important;
  margin-right: auto !important;
}

#secondary #subscribe-blog button,
#secondary .widget_search .wp-block-search__button {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 140px !important;
  min-width: 140px !important;
  height: 48px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #34383D !important;
  color: #ffffff !important;
  cursor: pointer;
  font-family: "PT Sans", Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

#secondary #subscribe-blog button:hover,
#secondary #subscribe-blog button:focus,
#secondary .widget_search .wp-block-search__button:hover,
#secondary .widget_search .wp-block-search__button:focus {
  background: #3F5F8F !important;
  color: #ffffff !important;
}

/* ---------- Homepage ---------- */

.home .site-main > article.hentry .sharedaddy,
.home .site-main > article.hentry > .entry-footer {
  display: none !important;
}

.home .site-main > article.hentry {
  border-bottom: 0 !important;
  margin-bottom: 28px !important;
}

.home .site-main > article.hentry > .entry-content {
  padding-bottom: 16px !important;
}

/* ---------- Individual posts ---------- */

/* Retain only the publication date in the post footer. */
.single-post .entry-footer .byline,
.single-post .entry-footer .cat-links,
.single-post .entry-footer .tags-links {
  display: none !important;
}

.single-post .site-main > article.hentry {
  display: block !important;
  border-bottom: 0 !important;
  margin-bottom: 18px !important;
}

.single-post .site-main > article.hentry > .entry-content {
  padding-bottom: 0 !important;
}

/* Compact sharing and Like sections on individual posts */
.single-post .sharedaddy {
  clear: both;
  margin: 0 !important;
  padding: 0 !important;
}

/* Space between sharing buttons and Like section */
.single-post .sd-sharing {
  margin: 0 0 18px !important;
  padding: 0 !important;
}

/* Keep post Likes visible and compact */
.single-post .sd-like {
  display: block !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
}

/* Compact the “Like this” heading */
.single-post .sharedaddy h3.sd-title {
  margin: 0 0 8px !important;
  padding: 0 !important;
}

/* Remove Jetpack’s short decorative line */
.single-post .sharedaddy h3.sd-title::before {
  content: none !important;
  display: none !important;
  border: 0 !important;
  margin: 0 !important;
}

/* Remove unnecessary spacing inside both widgets */
.single-post .sharedaddy .sd-content,
.single-post .sd-like .likes-widget-placeholder {
  margin: 0 !important;
  padding: 0 !important;
}

/* Keep sharing buttons compact */
.single-post .hentry .sd-content ul {
  margin-bottom: 0 !important;
}

.single-post .hentry .sd-content ul li {
  margin-bottom: 8px !important;
}

/* Display the date directly after sharing, without another divider. */
.single-post .site-main > article.hentry > footer.entry-footer {
  display: block !important;
  min-height: 0 !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.single-post .entry-footer .date-author {
  display: block !important;
}

.single-post .entry-footer .posted-on {
  display: inline !important;
}

.single-post .entry-footer::before,
.single-post .entry-footer::after {
  content: none !important;
  display: none !important;
}

/* Completely remove dynamically loaded post ratings */
body .cs-rating.pd-rating,
body div[id^="pd_rating_holder_"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body div[id^="pd_rating_holder_"] iframe,
body div[id^="pd_rating_holder_"] img {
  display: none !important;
}

#secondary #subscribe-blog button,
#secondary .widget_search .wp-block-search__button {
  font-family: "Open Sans", Arial, sans-serif !important;
}

/* Match both versions of Older/Newer Posts to the site palette */
.site-main .posts-navigation a,
.site-main .posts-navigation a:link,
.site-main .posts-navigation a:visited,
#infinite-handle span button {
  color: #3F5F8F !important;
}

.site-main .posts-navigation a:hover,
.site-main .posts-navigation a:focus,
.site-main .posts-navigation a:active,
#infinite-handle span button:hover,
#infinite-handle span button:focus,
#infinite-handle span button:active {
  color: #34383D !important;
}

/* Match About Zach text to the post text */
#secondary #block-3 p {
  font-size: 16px !important;
  line-height: 24px !important;
}

@media screen and (max-width: 600px) {
  .entry-title {
    font-size: 28px !important;
    line-height: 34px !important;
  }
}

/* Completely remove dynamically loaded post ratings */
body .cs-rating.pd-rating,
body div[id^="pd_rating_holder_"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body div[id^="pd_rating_holder_"] iframe,
body div[id^="pd_rating_holder_"] img {
  display: none !important;
}

/* Match comment Reply links to the site palette */
.comment-list .reply a,
.comment-reply-link,
.comment-reply-link:link,
.comment-reply-link:visited,
.comment-reply-link::before {
  color: #3F5F8F !important;
}

.comment-list .reply a:hover,
.comment-list .reply a:focus,
.comment-reply-link:hover,
.comment-reply-link:focus,
.comment-reply-link:active {
  color: #34383D !important;
}

/* Match Jetpack comment Like text and star to the site blue */
body .sd-text-color,
body .sd-link-color {
  color: #3F5F8F !important;
}

/* Group Subscribe and Search into one sidebar section */
#secondary .widget_search {
  border-top: 0 !important;
  padding-top: 12px !important;
}

/* Remove Jetpack Likes from individual comments */
.jetpack-comment-likes-widget-wrapper {
  display: none !important;
}

/* Replace WordPress credit with copyright notice */
.site-info {
  color: #777777 !important;
  font-size: 0 !important;
  text-align: center;
}

.site-info a {
  display: none !important;
}

.site-info::after {
  content: "© 2026 Zach McIntosh";
  display: block;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 13px;
  line-height: 18px;
}

/* Final compact layout for sharing, Likes, and posted date */
body.single-post .entry-content .sharedaddy {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove the short decorative lines */
body.single-post .entry-content .sd-sharing::before,
body.single-post .entry-content .sd-like::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  margin: 0 !important;
}

/* Sharing-button spacing */
body.single-post .entry-content .sd-sharing {
  margin: 0 0 14px !important;
  padding: 0 !important;
}

/* Compact the Like section */
body.single-post .entry-content .sd-like {
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Compact the “Like this” label */
body.single-post .entry-content .sd-like h3.sd-title {
  margin: 0 0 6px !important;
  padding: 0 !important;
}

/* Reduce the height reserved for the Like button and avatars */
body.single-post .entry-content .sd-like .likes-widget-placeholder,
body.single-post .entry-content .sd-like iframe {
  height: 46px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==============================================================
   OVERRIDE: hide sharing/Like/footer meta on ALL listing pages,
   not just the front page — covers "Older Posts" / numbered pages
   ============================================================== */

body.blog article.hentry .sharedaddy,
body.blog article.hentry .entry-footer,
body.home article.hentry .sharedaddy,
body.home article.hentry .entry-footer,
body.archive article.hentry .sharedaddy,
body.archive article.hentry .entry-footer,
body.paged article.hentry .sharedaddy,
body.paged article.hentry .entry-footer {
  display: none !important;
}

body.blog article.hentry,
body.home article.hentry,
body.archive article.hentry,
body.paged article.hentry {
  border-bottom: 0 !important;
  margin-bottom: 28px !important;
}

body.blog article.hentry .entry-content,
body.home article.hentry .entry-content,
body.archive article.hentry .entry-content,
body.paged article.hentry .entry-content {
  padding-bottom: 16px !important;
}

/* Belt-and-suspenders: never show sharing/Like/meta on any page
   that still has a "Continue reading" link (i.e., an excerpt view) */
article.hentry:has(> .entry-content > a[href*="#more"]) .sharedaddy,
article.hentry:has(> .entry-content > a[href*="#more"]) .entry-footer {
  display: none !important;
}

/* Reinforce the charcoal separator line so it always appears,
   even if a post's markup nests entry-header differently */
.site-main article.hentry > .entry-header,
.site-main article.hentry .entry-header {
  border-top: 3px solid #34383D !important;
  padding: 28px 0 24px !important;
  margin: 0 !important;
  width: 100% !important;
  background: transparent !important;
  box-sizing: border-box;
}

/* Automatic dark mode based on the visitor’s device setting */
@media (prefers-color-scheme: dark) {

  html {
    color-scheme: dark;
  }

  /* Main backgrounds */
  body,
  .site,
  .site-content,
  .content-area,
  .site-main,
  article.hentry,
  #secondary,
  .site-footer {
    background-color: #181B20 !important;
  }

  /* Primary text */
  body,
  .entry-content,
  .entry-summary,
  .entry-content p,
  .entry-summary p,
  .entry-content li,
  .comment-content,
  #secondary p,
  #secondary li {
    color: #E8E5DF !important;
  }

  /* Headings and links */
  .entry-title,
  .entry-title a,
  .entry-title a:visited,
  .entry-content a,
  .entry-summary a,
  .comment-content a,
  .widget a,
  .site-info a,
  #secondary h1,
  #secondary h2,
  #secondary h3 {
    color: #9BB5DC !important;
  }

  /* Hover and keyboard-focus color */
  .entry-title a:hover,
  .entry-title a:focus,
  .entry-content a:hover,
  .entry-content a:focus,
  .entry-summary a:hover,
  .entry-summary a:focus,
  .comment-content a:hover,
  .comment-content a:focus,
  .widget a:hover,
  .widget a:focus {
    color: #C1D2EA !important;
  }

  /* Muted text and post information */
  .entry-meta,
  .entry-footer,
  .entry-footer a,
  .posted-on,
  .comment-metadata,
  .site-info,
  .sd-title {
    color: #B9B5AE !important;
  }

  /* Dividers and structural lines */
  .site-main > article.hentry,
  .site-main > article.hentry > .entry-header,
  #secondary .widget,
  .post-navigation,
  .comments-area {
    border-color: #747A83 !important;
  }

  /* Quotations */
  .entry-content blockquote,
  .entry-content .wp-block-quote {
    color: #D3CFC8 !important;
    border-left-color: #9BB5DC !important;
  }

  /* Form fields */
  input[type="text"],
  input[type="email"],
  input[type="search"],
  input[type="url"],
  textarea,
  #secondary #subscribe-field,
  #secondary .widget_search .wp-block-search__input {
    background-color: #24282E !important;
    border-color: #68717C !important;
    color: #F2EFE9 !important;
  }

  input::placeholder,
  textarea::placeholder {
    color: #AAA69F !important;
    opacity: 1 !important;
  }

  /* Subscribe and Search buttons */
  #secondary #subscribe-blog button,
  #secondary #subscribe-submit,
  #secondary .widget_search .wp-block-search__button {
    background-color: #3F5F8F !important;
    color: #FFFFFF !important;
  }

  #secondary #subscribe-blog button:hover,
  #secondary #subscribe-submit:hover,
  #secondary .widget_search .wp-block-search__button:hover {
    background-color: #5879A8 !important;
  }

  /* Sharing buttons where WordPress permits styling */
  .sd-content ul li a.sd-button {
    background: #25292F !important;
    border-color: #555D68 !important;
    color: #E8E5DF !important;
  }

  /* Previous/next navigation */
  .post-navigation a {
    color: #E8E5DF !important;
  }
}

/* Correct white post panels in automatic dark mode */
@media (prefers-color-scheme: dark) {

  body,
  body #page,
  body .site,
  body .site-content,
  body .content-area,
  body .site-main {
    background-color: #181B20 !important;
  }

  /* Override the existing white post-container rules */
  body .site-main > article.hentry,
  body .site-main > article.hentry > .entry-header,
  body .site-main > article.hentry > .entry-content,
  body .site-main > article.hentry > .entry-footer {
    background: #181B20 !important;
    background-color: #181B20 !important;
  }

  /* Ensure ordinary post elements do not retain white backgrounds */
  body .entry-content > p,
  body .entry-content > h2,
  body .entry-content > h3,
  body .entry-content > h4,
  body .entry-content > ul,
  body .entry-content > ol,
  body .entry-summary {
    background-color: transparent !important;
  }

  /* Sidebar and widgets */
  body #secondary,
  body #secondary .widget,
  body .widget-area {
    background-color: #181B20 !important;
  }
}

/* Dark-mode corrections for the bottom of individual posts */
@media (prefers-color-scheme: dark) {

  /* Make sharing buttons clearly visible */
  body.single-post .sd-content ul li a.sd-button {
    background: #292E35 !important;
    border-color: #59616C !important;
    color: #E8E5DF !important;
    box-shadow: none !important;
  }

  body.single-post .sd-content ul li a.sd-button span,
  body.single-post .sd-content ul li a.sd-button::before {
    color: #E8E5DF !important;
  }

  body.single-post .sd-content ul li a.sd-button:hover,
  body.single-post .sd-content ul li a.sd-button:focus {
    background: #3F5F8F !important;
    border-color: #9BB5DC !important;
    color: #FFFFFF !important;
  }

  /* Make the uneditable WordPress Like widget look intentional */
  body.single-post .entry-content .sd-like {
    box-sizing: border-box !important;
    background: #F5F5F5 !important;
    border: 1px solid #666E78 !important;
    border-radius: 7px !important;
    margin: 14px 0 12px !important;
    padding: 9px 12px 5px !important;
    overflow: hidden !important;
  }

  body.single-post .entry-content .sd-like h3.sd-title {
    color: #555555 !important;
    margin: 0 0 5px !important;
  }

  body.single-post .entry-content .sd-like iframe,
  body.single-post .entry-content .sd-like .likes-widget-placeholder {
    background: #F5F5F5 !important;
  }

  /* Use the dark-mode slate blue for post navigation */
  body.single-post .post-navigation a,
  body.single-post .post-navigation .post-title,
  body.single-post .nav-previous a,
  body.single-post .nav-next a {
    color: #9BB5DC !important;
  }

  body.single-post .post-navigation a:hover,
  body.single-post .post-navigation a:focus {
    color: #C1D2EA !important;
  }
}

/* Match individual-post titles to the dark-mode blue */
@media (prefers-color-scheme: dark) {

  body.single-post .site-main > article.hentry > .entry-header .entry-title,
  body.single-post .site-main > article.hentry > .entry-header .entry-title a,
  body.single-post .site-main > article.hentry > .entry-header .entry-title a:visited {
    color: #9BB5DC !important;
  }
}

/* Make the black X icon visible in dark mode */
@media (prefers-color-scheme: dark) {

  #secondary img[alt="X"] {
    filter: invert(1) brightness(0.9) !important;
  }
}

/* Dark-mode corrections for comments and reply form */
@media (prefers-color-scheme: dark) {

  /* Comment author and date */
  body.single-post .comment-author,
  body.single-post .comment-author .fn,
  body.single-post .comment-author .fn a {
    color: #E8E5DF !important;
  }

  body.single-post .comment-metadata,
  body.single-post .comment-metadata a {
    color: #B9B5AE !important;
  }

  /* Comment Reply link */
  body.single-post .comment-list .reply a,
  body.single-post .comment-reply-link {
    color: #9BB5DC !important;
  }

  body.single-post .comment-list .reply a:hover,
  body.single-post .comment-reply-link:hover {
    color: #C1D2EA !important;
  }

  /* Convert WordPress’s embedded comment form to dark mode */
  body.single-post #respond iframe,
  body.single-post iframe#jetpack_remote_comment,
  body.single-post iframe.jetpack-remote-comment,
  body.single-post .comment-respond iframe {
    background: #181B20 !important;
    border: 1px solid #59616C !important;
    border-radius: 6px !important;
    filter: invert(0.88) hue-rotate(180deg) !important;
  }
}

/* DARK MODE — clean Subscribe button */
@media (prefers-color-scheme: dark) {

	/* Outer container: never look like a button */
	#secondary #subscribe-blog #subscribe-submit {
		display: flex !important;
		justify-content: center !important;
		width: 100% !important;
		margin: 1rem 0 0 !important;
		padding: 0 !important;
		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	/* The actual Subscribe button */
	#secondary #subscribe-blog #subscribe-submit button.wp-block-button__link {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: auto !important;
		min-width: 160px !important;
		margin: 0 !important;
		padding: 12px 28px !important;
		background: #3f5f8f !important;
		color: #ffffff !important;
		border: 0 !important;
		border-radius: 999px !important;
		box-shadow: none !important;
		appearance: none !important;
		-webkit-appearance: none !important;
	}

	/* Prevent Safari from creating a second-colored state */
	#secondary #subscribe-blog #subscribe-submit button.wp-block-button__link:hover,
	#secondary #subscribe-blog #subscribe-submit button.wp-block-button__link:focus,
	#secondary #subscribe-blog #subscribe-submit button.wp-block-button__link:active {
		background: #3f5f8f !important;
		color: #ffffff !important;
		box-shadow: none !important;
	}

	#secondary #subscribe-blog #subscribe-submit button.wp-block-button__link:focus-visible {
		outline: 2px solid #9bb5dc !important;
		outline-offset: 3px !important;
	}
}