/*
Theme Name: greatcomm-childtheme
Theme URI: https://lifeproduction.org/greatcomm/childtheme
Description: greatcomm-childtheme is a powerful WordPress theme built on the Greatcomm-Theme parent theme, designed for news websites, online magazines, and christian ministries and church content-driven blogs. It adds a suite of presentation-layer features — all individually toggled from the WordPress Customizer — without modifying the parent theme: Breaking News Ticker — Display the latest headlines from any category in an eye-catching animated ticker strip at the top of every page. Customize the label, accent color, and number of posts. Reading Progress Bar — Keep readers engaged with a sleek progress bar that tracks scroll position on single posts. Adjustable color and height. Related Posts — Automatically surface relevant content below each post using category matching. Increase time-on-site and reduce bounce rate. Author Bio Box — Build trust and authority by displaying the post author's avatar, display name, and biography after each article. Dark Mode Toggle — Give readers a comfortable reading experience in low-light environments. The chosen mode persists across sessions via localStorage — no cookies, no server requests. Customer Support Chat — Let visitors message staff through a standalone chat with dashboard replies, email notifications, and a configurable support avatar. Custom 404 Page — Replace the default error page with a branded 404 template that includes a search form and a grid of recent posts, keeping lost visitors on your site. All features are independently enable/disable-able under Appearance → Customize → greatcomm-childtheme Options.
Author: Evangelist Aladesanmi
Author URI: https://lifeproduction.org/greatcomm/
Version: 1.1.0
Requires at least: 5.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, left-sidebar, right-sidebar, grid-layout, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, flexible-header, full-width-template, microformats, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, wide-blocks, blog, news
Text Domain: greatcomm-childtheme
Template: greatcomm-theme
*/


/* ==========================================================================
   greatcomm-childtheme — Main Stylesheet
   All child theme feature styles live here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
	--greatcomm-childtheme-accent:        #e03131;
	--greatcomm-childtheme-accent-dark:   #b91c1c;
	--greatcomm-childtheme-text:          #1a1a2e;
	--greatcomm-childtheme-text-muted:    #6b7280;
	--greatcomm-childtheme-bg:            #ffffff;
	--greatcomm-childtheme-bg-alt:        #f8f9fa;
	--greatcomm-childtheme-border:        #e5e7eb;
	--greatcomm-childtheme-card-shadow:   0 2px 12px rgba(0, 0, 0, 0.08);
	--greatcomm-childtheme-radius:        6px;
	--greatcomm-childtheme-font:          'Raleway', sans-serif;
	--greatcomm-childtheme-transition:    0.25s ease;
}

/* --------------------------------------------------------------------------
   1. Breaking News Ticker
   -------------------------------------------------------------------------- */
.greatcomm-childtheme-ticker-wrap {
	display:         flex;
	align-items:     center;
	background:      #1a1a2e;
	color:           #ffffff;
	overflow:        hidden;
	height:          38px;
	font-family:     var(--greatcomm-childtheme-font);
	font-size:       13px;
	position:        relative;
	z-index:         1000;
}

.greatcomm-childtheme-ticker-label {
	flex-shrink:     0;
	background:      var(--greatcomm-childtheme-accent);
	color:           #fff;
	padding:         0 18px;
	height:          100%;
	display:         flex;
	align-items:     center;
	gap:             7px;
	font-weight:     700;
	font-size:       12px;
	text-transform:  uppercase;
	letter-spacing:  0.08em;
	white-space:     nowrap;
}

.greatcomm-childtheme-ticker-track-outer {
	flex:            1;
	overflow:        hidden;
	height:          100%;
	display:         flex;
	align-items:     center;
	-webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
	mask-image:         linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.greatcomm-childtheme-ticker-track {
	display:         flex;
	align-items:     center;
	list-style:      none;
	margin:          0;
	padding:         0;
	white-space:     nowrap;
	animation:       greatcomm-childtheme-ticker-scroll 30s linear infinite;
}

.greatcomm-childtheme-ticker-track:hover {
	animation-play-state: paused;
}

.greatcomm-childtheme-ticker-item {
	padding:         0 40px 0 0;
}

.greatcomm-childtheme-ticker-item a {
	color:           #e2e8f0;
	text-decoration: none;
	font-weight:     500;
	transition:      color var(--greatcomm-childtheme-transition);
}

.greatcomm-childtheme-ticker-item a::before {
	content:         '●';
	color:           var(--greatcomm-childtheme-accent);
	margin-right:    10px;
	font-size:       8px;
}

.greatcomm-childtheme-ticker-item a:hover {
	color:           #ffffff;
}

@keyframes greatcomm-childtheme-ticker-scroll {
	0%   { transform: translateX(100vw); }
	100% { transform: translateX(-100%); }
}

/* --------------------------------------------------------------------------
   2. Reading Progress Bar
   (dynamic height/color set via inline CSS from PHP)
   -------------------------------------------------------------------------- */
#greatcomm-childtheme-reading-progress {
	position:        fixed;
	top:             0;
	left:            0;
	width:           0%;
	z-index:         99999;
	transition:      width 0.1s linear;
}

/* --------------------------------------------------------------------------
   3. Related Posts
   -------------------------------------------------------------------------- */
.greatcomm-childtheme-related-posts {
	margin:          48px 0 32px;
	padding-top:     32px;
	border-top:      2px solid var(--greatcomm-childtheme-border);
	clear:           both;
}

.greatcomm-childtheme-related-posts__title {
	font-size:       18px;
	font-weight:     700;
	margin-bottom:   24px;
	display:         flex;
	align-items:     center;
	gap:             12px;
	color:           var(--greatcomm-childtheme-text);
}

.greatcomm-childtheme-related-posts__title::before,
.greatcomm-childtheme-related-posts__title::after {
	content:         '';
	flex:            1;
	height:          1px;
	background:      var(--greatcomm-childtheme-border);
}

.greatcomm-childtheme-related-posts__title::before {
	max-width:       40px;
}

.greatcomm-childtheme-related-posts__grid {
	display:         grid;
	grid-template-columns: repeat(3, 1fr);
	gap:             20px;
}

@media (max-width: 767px) {
	.greatcomm-childtheme-related-posts__grid {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 768px) and (max-width: 991px) {
	.greatcomm-childtheme-related-posts__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.greatcomm-childtheme-related-posts__item {
	background:      var(--greatcomm-childtheme-bg);
	border:          1px solid var(--greatcomm-childtheme-border);
	border-radius:   var(--greatcomm-childtheme-radius);
	overflow:        hidden;
	box-shadow:      var(--greatcomm-childtheme-card-shadow);
	transition:      transform var(--greatcomm-childtheme-transition), box-shadow var(--greatcomm-childtheme-transition);
}

.greatcomm-childtheme-related-posts__item:hover {
	transform:       translateY(-4px);
	box-shadow:      0 8px 24px rgba(0, 0, 0, 0.12);
}

.greatcomm-childtheme-related-posts__thumb {
	display:         block;
	overflow:        hidden;
	aspect-ratio:    16 / 9;
}

.greatcomm-childtheme-related-posts__thumb img {
	width:           100%;
	height:          100%;
	object-fit:      cover;
	transition:      transform 0.4s ease;
}

.greatcomm-childtheme-related-posts__item:hover .greatcomm-childtheme-related-posts__thumb img {
	transform:       scale(1.05);
}

.greatcomm-childtheme-related-posts__body {
	padding:         14px 16px 16px;
}

.greatcomm-childtheme-related-posts__item-title {
	font-size:       14px;
	font-weight:     700;
	line-height:     1.45;
	margin:          8px 0 6px;
}

.greatcomm-childtheme-related-posts__item-title a {
	color:           var(--greatcomm-childtheme-text);
	text-decoration: none;
}

.greatcomm-childtheme-related-posts__item-title a:hover {
	color:           var(--greatcomm-childtheme-accent);
}

.greatcomm-childtheme-related-posts__meta {
	font-size:       12px;
	color:           var(--greatcomm-childtheme-text-muted);
	margin:          0;
}

.greatcomm-childtheme-related-posts__meta .fa {
	margin-right:    4px;
}

/* --------------------------------------------------------------------------
   4. Author Bio Box
   -------------------------------------------------------------------------- */
.greatcomm-childtheme-author-box {
	display:         flex;
	align-items:     flex-start;
	gap:             24px;
	margin:          36px 0 32px;
	padding:         28px;
	background:      var(--greatcomm-childtheme-bg-alt);
	border:          1px solid var(--greatcomm-childtheme-border);
	border-left:     4px solid var(--greatcomm-childtheme-accent);
	border-radius:   var(--greatcomm-childtheme-radius);
	clear:           both;
}

@media (max-width: 575px) {
	.greatcomm-childtheme-author-box {
		flex-direction:  column;
		align-items:     center;
		text-align:      center;
	}
}

.greatcomm-childtheme-author-box__avatar {
	flex-shrink:     0;
}

.greatcomm-childtheme-author-box__avatar img {
	width:           90px;
	height:          90px;
	border-radius:   50%;
	object-fit:      cover;
	border:          3px solid var(--greatcomm-childtheme-accent);
}

.greatcomm-childtheme-author-box__label {
	font-size:       11px;
	font-weight:     600;
	text-transform:  uppercase;
	letter-spacing:  0.1em;
	color:           var(--greatcomm-childtheme-accent);
	margin-bottom:   4px;
}

.greatcomm-childtheme-author-box__name {
	font-size:       18px;
	font-weight:     700;
	margin:          0 0 10px;
}

.greatcomm-childtheme-author-box__name a {
	color:           var(--greatcomm-childtheme-text);
	text-decoration: none;
}

.greatcomm-childtheme-author-box__name a:hover {
	color:           var(--greatcomm-childtheme-accent);
}

.greatcomm-childtheme-author-box__bio {
	font-size:       14px;
	color:           var(--greatcomm-childtheme-text-muted);
	line-height:     1.65;
	margin-bottom:   14px;
}

.greatcomm-childtheme-author-box__links {
	display:         flex;
	gap:             12px;
	flex-wrap:       wrap;
}

.greatcomm-childtheme-author-box__more,
.greatcomm-childtheme-author-box__website {
	display:         inline-flex;
	align-items:     center;
	gap:             6px;
	font-size:       13px;
	font-weight:     600;
	padding:         6px 14px;
	border-radius:   4px;
	text-decoration: none;
	transition:      background var(--greatcomm-childtheme-transition), color var(--greatcomm-childtheme-transition);
}

.greatcomm-childtheme-author-box__more {
	background:      var(--greatcomm-childtheme-accent);
	color:           #fff;
}

.greatcomm-childtheme-author-box__more:hover {
	background:      var(--greatcomm-childtheme-accent-dark);
	color:           #fff;
}

.greatcomm-childtheme-author-box__website {
	background:      transparent;
	color:           var(--greatcomm-childtheme-text-muted);
	border:          1px solid var(--greatcomm-childtheme-border);
}

.greatcomm-childtheme-author-box__website:hover {
	background:      var(--greatcomm-childtheme-bg);
	color:           var(--greatcomm-childtheme-text);
}


/* --------------------------------------------------------------------------
   5. Dark Mode Toggle Button
   -------------------------------------------------------------------------- */
.greatcomm-childtheme-dark-toggle {
	position:        fixed;
	bottom:          80px;
	right:           20px;
	width:           44px;
	height:          44px;
	border-radius:   50%;
	background:      #1a1a2e;
	color:           #fff;
	border:          none;
	cursor:          pointer;
	display:         flex;
	align-items:     center;
	justify-content: center;
	font-size:       20px;
	z-index:         9999;
	box-shadow:      0 4px 14px rgba(0, 0, 0, 0.25);
	transition:      background var(--greatcomm-childtheme-transition), transform var(--greatcomm-childtheme-transition);
}

.greatcomm-childtheme-dark-toggle:hover {
	background:      var(--greatcomm-childtheme-accent);
	transform:       scale(1.1);
}

.greatcomm-childtheme-dark-icon {
	line-height:     1;
}

/* Show sun in dark mode, moon in light mode */
html:not(.greatcomm-childtheme-dark-mode) .greatcomm-childtheme-icon-sun   { display: none; }
html.greatcomm-childtheme-dark-mode      .greatcomm-childtheme-icon-moon    { display: none; }

/* --------------------------------------------------------------------------
   6. Dark Mode — Full Palette Overrides
   -------------------------------------------------------------------------- */
html.greatcomm-childtheme-dark-mode {
	--greatcomm-childtheme-text:        #e2e8f0;
	--greatcomm-childtheme-text-muted:  #94a3b8;
	--greatcomm-childtheme-bg:          #0f172a;
	--greatcomm-childtheme-bg-alt:      #1e293b;
	--greatcomm-childtheme-border:      #334155;
}

html.greatcomm-childtheme-dark-mode body {
	background-color: #0f172a !important;
	color:            #e2e8f0 !important;
}

/* Header */
html.greatcomm-childtheme-dark-mode .headermain,
html.greatcomm-childtheme-dark-mode .container-fluid.headermain {
	background-color: #1e293b !important;
}

/* Top bar */
html.greatcomm-childtheme-dark-mode .bgtoph,
html.greatcomm-childtheme-dark-mode .container-fluid.bgtoph {
	background-color: #0f172a !important;
	border-bottom:    1px solid #334155 !important;
}

/* Navigation */
html.greatcomm-childtheme-dark-mode .navbar,
html.greatcomm-childtheme-dark-mode .masthead-nav,
html.greatcomm-childtheme-dark-mode #main-nav {
	background-color: #1e293b !important;
}

html.greatcomm-childtheme-dark-mode .navbar .nav-link,
html.greatcomm-childtheme-dark-mode #main-nav .nav-link {
	color:            #e2e8f0 !important;
}

html.greatcomm-childtheme-dark-mode .dropdown-menu {
	background-color: #1e293b !important;
	border-color:     #334155 !important;
}

html.greatcomm-childtheme-dark-mode .dropdown-item {
	color:            #e2e8f0 !important;
}

html.greatcomm-childtheme-dark-mode .dropdown-item:hover {
	background-color: #334155 !important;
}

/* Front Page Blocks */
html.greatcomm-childtheme-dark-mode .front-page-top-otr {
	background-color: #0f172a !important;
}

/* Content area */
html.greatcomm-childtheme-dark-mode .left-content,
html.greatcomm-childtheme-dark-mode .left-content p,
html.greatcomm-childtheme-dark-mode .left-content li,
html.greatcomm-childtheme-dark-mode .left-content span,
html.greatcomm-childtheme-dark-mode .dflt-anews-pst,
html.greatcomm-childtheme-dark-mode .entry-content,
html.greatcomm-childtheme-dark-mode .entry-content p,
html.greatcomm-childtheme-dark-mode .entry-content li,
html.greatcomm-childtheme-dark-mode .entry-content span,
html.greatcomm-childtheme-dark-mode article,
html.greatcomm-childtheme-dark-mode article p,
html.greatcomm-childtheme-dark-mode article li,
html.greatcomm-childtheme-dark-mode article span {
	color:            #e2e8f0 !important;
}

html.greatcomm-childtheme-dark-mode h1, html.greatcomm-childtheme-dark-mode h2,
html.greatcomm-childtheme-dark-mode h3, html.greatcomm-childtheme-dark-mode h4,
html.greatcomm-childtheme-dark-mode h5, html.greatcomm-childtheme-dark-mode h6 {
	color:            #f1f5f9 !important;
}

html.greatcomm-childtheme-dark-mode .content-first .content-second h1.the-title {
	color:      #f1f5f9 !important;
	box-shadow: none !important;
}

/* Disable light box-shadows that look out of place on dark backgrounds */
html.greatcomm-childtheme-dark-mode .content-third {
	box-shadow: none !important;
}

html.greatcomm-childtheme-dark-mode a {
	color:            #93c5fd !important;
}

/* Preserve original owl-carousel category badge colours in dark mode */
html.greatcomm-childtheme-dark-mode .owl-carousel.dim-owl-top .item .diowl-overlay .diowl-cat a,
html.greatcomm-childtheme-dark-mode .dim-front-left .diowl-overlay .diowl-cat a {
	color:            #ffffff !important;
	background-color: #00cc66 !important;
}

/* Preserve original front-categories headline link colours in dark mode */
html.greatcomm-childtheme-dark-mode .maincontainer .front-categories .front-single-category .front-single-category-headline h1 a,
html.greatcomm-childtheme-dark-mode .maincontainer .front-categories .front-single-category .front-single-category-headline p a {
	color:            #ffffff !important;
}

/* Keep single-post tag links white in dark mode. */
html.greatcomm-childtheme-dark-mode .singletags a,
html.greatcomm-childtheme-dark-mode .tagcloud a,
html.greatcomm-childtheme-dark-mode .post-navigation .nav-next a,
html.greatcomm-childtheme-dark-mode .post-navigation .nav-previous a {
	color: #ffffff !important;
}

html.greatcomm-childtheme-dark-mode a:hover {
	color:            #bfdbfe !important;
}

/* Sidebar & Layout Blocks */
html.greatcomm-childtheme-dark-mode .single-posst,
html.greatcomm-childtheme-dark-mode .postsloop,
html.greatcomm-childtheme-dark-mode .widget_sidebar_main,
html.greatcomm-childtheme-dark-mode aside .widget {
	background-color: #1e293b !important;
	border-color:     #334155 !important;
	color:            #e2e8f0 !important;
}

html.greatcomm-childtheme-dark-mode .right-widget-title {
	color:            #f1f5f9 !important;
	border-color:     var(--greatcomm-childtheme-accent) !important;
}

/* Footer */
html.greatcomm-childtheme-dark-mode .footer,
html.greatcomm-childtheme-dark-mode .container-fluid.footer {
	background-color: #0f172a !important;
	border-top:       1px solid #334155 !important;
}

html.greatcomm-childtheme-dark-mode .footer-copyright,
html.greatcomm-childtheme-dark-mode .container-fluid.footer-copyright {
	background-color: #020617 !important;
}

/* Cards */
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-related-posts__item,
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-author-box,
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-404-post-card {
	background-color: #1e293b !important;
	border-color:     #334155 !important;
}

html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-related-posts__item-title a,
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-author-box__name a {
	color:            #f1f5f9 !important;
}

/* Preserve the "All Posts" button — it is a solid-color button, not a text link.
   The global dark-mode 'a' rule (#93c5fd) would otherwise turn its text blue. */
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-author-box__more,
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-author-box__more:hover {
	color:            #ffffff !important;
}

/* Forms */
html.greatcomm-childtheme-dark-mode input,
html.greatcomm-childtheme-dark-mode textarea,
html.greatcomm-childtheme-dark-mode select {
	background-color: #1e293b !important;
	color:            #e2e8f0 !important;
	border-color:     #334155 !important;
}

/* --------------------------------------------------------------------------
   7. Customer Support Widget
   -------------------------------------------------------------------------- */
.greatcomm-childtheme-support {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	font-family: var(--greatcomm-childtheme-font);
}

.greatcomm-childtheme-support__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--greatcomm-childtheme-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: background var(--greatcomm-childtheme-transition), transform var(--greatcomm-childtheme-transition);
}

.greatcomm-childtheme-support__toggle:hover {
	background: var(--greatcomm-childtheme-accent-dark);
	transform: translateY(-2px);
}

.greatcomm-childtheme-support__toggle:focus-visible,
.greatcomm-childtheme-support__links a:focus-visible,
.greatcomm-childtheme-support__close:focus-visible,
.greatcomm-childtheme-chat button:focus-visible,
.greatcomm-childtheme-chat input:focus-visible,
.greatcomm-childtheme-chat textarea:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 3px;
}

.greatcomm-childtheme-support__avatar-image,
.greatcomm-childtheme-support__avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}

.greatcomm-childtheme-support__panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 12px);
	width: min(360px, calc(100vw - 28px));
	max-height: min(640px, calc(100vh - 100px));
	overflow-y: auto;
	border: 1px solid var(--greatcomm-childtheme-border);
	border-radius: 10px;
	background: var(--greatcomm-childtheme-bg);
	color: var(--greatcomm-childtheme-text);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.greatcomm-childtheme-support__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px;
	font-size: 17px;
	font-weight: 700;
	border-bottom: 1px solid var(--greatcomm-childtheme-border);
}

.greatcomm-childtheme-support__heading .greatcomm-childtheme-support__avatar-image,
.greatcomm-childtheme-support__heading .greatcomm-childtheme-support__avatar-fallback {
	flex-basis: 42px;
	width: 42px;
	height: 42px;
	background-color: var(--greatcomm-childtheme-accent);
}

.greatcomm-childtheme-support__close {
	margin-left: auto;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.greatcomm-childtheme-chat {
	padding: 14px;
}

.greatcomm-childtheme-chat__messages {
	display: flex;
	flex-direction: column;
	gap: 9px;
	max-height: 260px;
	overflow-y: auto;
	margin-bottom: 12px;
}

.greatcomm-childtheme-chat__status {
	margin: 0;
	color: var(--greatcomm-childtheme-text-muted);
	font-size: 13px;
}

.greatcomm-childtheme-chat__message {
	max-width: 88%;
	padding: 9px 11px;
	border-radius: 10px;
	background: var(--greatcomm-childtheme-bg-alt);
	overflow-wrap: anywhere;
}

.greatcomm-childtheme-chat__message.is-visitor {
	align-self: flex-end;
	background: #e8f0fe;
}

.greatcomm-childtheme-chat__message.is-staff {
	align-self: flex-start;
	border: 1px solid var(--greatcomm-childtheme-border);
}

.greatcomm-childtheme-chat__message p {
	margin: 0;
	white-space: pre-wrap;
}

.greatcomm-childtheme-chat__message time {
	display: block;
	margin-top: 5px;
	color: var(--greatcomm-childtheme-text-muted);
	font-size: 11px;
}

.greatcomm-childtheme-chat form label {
	display: block;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
}

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

.greatcomm-childtheme-chat input,
.greatcomm-childtheme-chat textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 9px 10px;
	border: 1px solid var(--greatcomm-childtheme-border);
	border-radius: 6px;
	background: #fff;
	color: var(--greatcomm-childtheme-text);
	font: inherit;
	font-size: 14px;
	box-sizing: border-box;
}

.greatcomm-childtheme-chat textarea {
	resize: vertical;
}

.greatcomm-childtheme-chat__reply {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.greatcomm-childtheme-chat__reply textarea {
	flex: 1;
}

.greatcomm-childtheme-chat button[type="submit"] {
	padding: 10px 14px;
	border: 0;
	border-radius: 6px;
	background: var(--greatcomm-childtheme-accent);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.greatcomm-childtheme-chat button[type="submit"]:disabled {
	opacity: 0.65;
	cursor: wait;
}

.greatcomm-childtheme-chat__error {
	margin: 10px 0 0;
	color: #b91c1c;
	font-size: 13px;
}

.greatcomm-childtheme-support__links {
	margin: 0;
	padding: 0 14px 14px;
	list-style: none;
}

.greatcomm-childtheme-support__links li + li {
	margin-top: 6px;
}

.greatcomm-childtheme-support__links a {
	display: block;
	padding: 9px 10px;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
}

.greatcomm-childtheme-support__links a:hover {
	background: var(--greatcomm-childtheme-bg-alt);
	color: var(--greatcomm-childtheme-accent-dark);
}

html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-support__panel {
	border-color: #334155;
	background: #1e293b;
	color: #e2e8f0;
}

html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-support__heading {
	border-color: #334155;
}

html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-chat__message.is-visitor {
	background: #1e3a5f;
}

html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-chat input,
html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-chat textarea {
	background-color: #0f172a !important;
	color: #e2e8f0 !important;
	border-color: #475569 !important;
}

html.greatcomm-childtheme-dark-mode .greatcomm-childtheme-support__links a:hover {
	background: #334155;
	color: #ffffff;
}

@media (max-width: 480px) {
	.greatcomm-childtheme-support {
		right: 14px;
		bottom: 14px;
	}

	.greatcomm-childtheme-support__toggle {
		min-height: 48px;
		padding: 4px 12px 4px 6px;
	}

	.greatcomm-childtheme-support__toggle .greatcomm-childtheme-support__avatar-image,
	.greatcomm-childtheme-support__toggle .greatcomm-childtheme-support__avatar-fallback {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
	}
}


/* Now lives inside content-third (col-md-8 column), not a standalone full-width page.
   Reduced padding and centering to suit the narrower context. */
.greatcomm-childtheme-404-wrap {
	padding:         32px 0 24px;
	text-align:      center;
}

.greatcomm-childtheme-404-number {
	font-size:       clamp(60px, 12vw, 100px);
	font-weight:     900;
	line-height:     1;
	color:           var(--greatcomm-childtheme-accent);
	background:      linear-gradient(135deg, var(--greatcomm-childtheme-accent), #f97316);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom:   8px;
	user-select:     none;
}

.greatcomm-childtheme-404-heading {
	font-size:       clamp(24px, 5vw, 38px);
	font-weight:     800;
	margin-bottom:   14px;
	color:           var(--greatcomm-childtheme-text);
}

.greatcomm-childtheme-404-sub {
	font-size:       16px;
	color:           var(--greatcomm-childtheme-text-muted);
	margin-bottom:   32px;
}

.greatcomm-childtheme-404-search {
	max-width:       480px;
	margin:          0 auto 28px;
}

.greatcomm-childtheme-404-home-btn {
	display:         inline-flex;
	align-items:     center;
	gap:             8px;
	background:      var(--greatcomm-childtheme-accent);
	color:           #fff;
	padding:         12px 28px;
	border-radius:   6px;
	font-size:       15px;
	font-weight:     700;
	text-decoration: none;
	transition:      background var(--greatcomm-childtheme-transition);
	margin-bottom:   32px;
}

.greatcomm-childtheme-404-home-btn:hover {
	background:      var(--greatcomm-childtheme-accent-dark);
	color:           #fff;
}

.greatcomm-childtheme-404-posts-section {
	text-align:      left;
}

.greatcomm-childtheme-404-posts-heading {
	font-size:       20px;
	font-weight:     700;
	margin-bottom:   24px;
	padding-bottom:  12px;
	border-bottom:   2px solid var(--greatcomm-childtheme-accent);
	display:         inline-block;
}

.greatcomm-childtheme-404-post-card {
	background:      var(--greatcomm-childtheme-bg);
	border:          1px solid var(--greatcomm-childtheme-border);
	border-radius:   var(--greatcomm-childtheme-radius);
	overflow:        hidden;
	box-shadow:      var(--greatcomm-childtheme-card-shadow);
	margin-bottom:   24px;
	transition:      transform var(--greatcomm-childtheme-transition), box-shadow var(--greatcomm-childtheme-transition);
}

.greatcomm-childtheme-404-post-card:hover {
	transform:       translateY(-4px);
	box-shadow:      0 8px 24px rgba(0,0,0,0.12);
}

.greatcomm-childtheme-404-post-thumb img {
	width:           100%;
	aspect-ratio:    16 / 9;
	object-fit:      cover;
	display:         block;
	transition:      transform 0.4s ease;
}

.greatcomm-childtheme-404-post-card:hover .greatcomm-childtheme-404-post-thumb img {
	transform:       scale(1.05);
}

.greatcomm-childtheme-404-post-body {
	padding:         14px 16px 18px;
}

.greatcomm-childtheme-404-post-title {
	font-size:       15px;
	font-weight:     700;
	margin:          8px 0 6px;
	line-height:     1.4;
}

.greatcomm-childtheme-404-post-title a {
	color:           var(--greatcomm-childtheme-text);
	text-decoration: none;
}

.greatcomm-childtheme-404-post-title a:hover {
	color:           var(--greatcomm-childtheme-accent);
}

.greatcomm-childtheme-404-post-meta {
	font-size:       12px;
	color:           var(--greatcomm-childtheme-text-muted);
	margin:          0;
}

.gallery-caption {
	color:          var(--greatcomm-childtheme-text-muted);
	font-size:      0.875rem;
	line-height:    1.5;
	margin:         0.5rem 0 1rem;
}

.bypostauthor {
	border-left:    3px solid var(--greatcomm-childtheme-accent);
	padding-left:   1rem;
}

/* --------------------------------------------------------------------------
   8. Sticky Sidebar
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
	.right-content.dflt-sidebar {
		position:        sticky;
		top:             calc( var(--wp-admin--admin-bar--height, 0px) + 8px );
	}
}

/* --------------------------------------------------------------------------
   9. General Utility / Refinements
   -------------------------------------------------------------------------- */

/* Smooth scroll */
html {
	scroll-behavior: smooth;
}
