/**
 * Mobile content gutters and readable bbPress surfaces.
 * Loaded after the inherited reference/polish layers. Important declarations
 * resolve their legacy overrides and the late generated Customizer styles.
 */

/* Pair forum foregrounds with their own surfaces, including saved dark palettes. */
#bbpress-forums {
	--customify-heading: #103b5f;
	--customify-body-text: #1e293b;
	--customify-text-muted: #475569;
	--customify-link: #164e91;
	--customify-link-hover: #075985;
	--spek-ink: #1e293b;
	--spek-muted: #475569;
	--spek-surface: #ffffff;
	--spek-surface-soft: #f1f5f9;
	--spek-border: #cbd5e1;
	color: var(--spek-ink);
	background-color: #ffffff;
	font-family: var(--customify-typo-body-font-family, "Play"), sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results {
	color: var(--spek-ink);
	background: var(--spek-surface);
	border-color: var(--spek-border);
	font: inherit;
}

#bbpress-forums li.bbp-body,
#bbpress-forums li.bbp-body div.hentry,
#bbpress-forums div.bbp-topic-content,
#bbpress-forums div.bbp-reply-content {
	color: var(--spek-ink);
	background-color: var(--spek-surface);
	font-weight: 400;
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
	color: var(--spek-ink);
	background: #ffffff;
}

#bbpress-forums li.bbp-body ul.forum:nth-child(even),
#bbpress-forums li.bbp-body ul.topic:nth-child(even) {
	background: #f8fafc;
}

#bbpress-forums li.bbp-body ul.forum:hover,
#bbpress-forums li.bbp-body ul.topic:hover,
#bbpress-forums li.bbp-body ul.forum:focus-within,
#bbpress-forums li.bbp-body ul.topic:focus-within,
#bbpress-forums li.bbp-body ul.topic.sticky,
#bbpress-forums li.bbp-body ul.topic.super-sticky {
	background: #edf5ff !important;
}

#bbpress-forums li.bbp-body .status-spam,
#bbpress-forums li.bbp-body .status-trash {
	color: #7f1d1d;
	background-color: #fff1f2 !important;
}

#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-topic-tags,
#bbpress-forums .bbp-pagination-count,
#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-forum-content,
#bbpress-forums .bbp-author-role {
	color: var(--spek-muted);
	font-size: 0.875em;
	line-height: 1.5;
}

#bbpress-forums a:not(.button):not(.spek-social-action):not(.page-numbers) {
	color: #164e91;
}

#bbpress-forums a:not(.button):not(.spek-social-action):not(.page-numbers):hover {
	color: #075985;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink {
	font-family: inherit;
	font-size: 1.0625em;
	line-height: 1.4;
}

#bbpress-forums .bbp-author-ip {
	color: #475569;
	font-size: 12px;
}

#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a {
	color: #ffffff;
	background: #103b5f;
	opacity: 1;
	border-radius: 5px;
}

#bbpress-forums #favorite-toggle a,
#bbpress-forums #subscription-toggle a {
	color: #164e91;
}

#bbpress-forums li.bbp-body div.bbp-reply-author,
#bbpress-forums li.bbp-body div.bbp-topic-author {
	color: var(--spek-ink);
	background: #f1f5f9;
	font-family: inherit;
}

/* The reference layer gives administrative links an important dark-blue color. */
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer,
#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header {
	color: #ffffff !important;
	font-family: inherit;
	font-size: 0.875em;
	line-height: 1.5;
	text-shadow: none;
}

#bbpress-forums li.bbp-header *,
#bbpress-forums li.bbp-footer *,
#bbpress-forums div.bbp-forum-header *,
#bbpress-forums div.bbp-topic-header *,
#bbpress-forums div.bbp-reply-header * {
	color: inherit !important;
}

#bbpress-forums .bbp-meta {
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	text-transform: none;
}

#bbpress-forums .bbp-admin-links {
	color: inherit;
	line-height: 1.8;
}

#bbpress-forums li.bbp-header .bbp-reply-author,
#bbpress-forums li.bbp-footer .bbp-reply-author,
#bbpress-forums li.bbp-header .bbp-topic-author,
#bbpress-forums li.bbp-footer .bbp-topic-author,
#bbpress-forums li.bbp-header .bbp-reply-content,
#bbpress-forums li.bbp-footer .bbp-reply-content,
#bbpress-forums li.bbp-header .bbp-topic-content,
#bbpress-forums li.bbp-footer .bbp-topic-content {
	font: inherit;
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span.current,
#bbpress-forums .bbp-topic-pagination a {
	color: #ffffff !important;
	background: #164e91;
}

#bbpress-forums .bbp-pagination-links a:hover,
#bbpress-forums .bbp-topic-pagination a:hover {
	color: #ffffff !important;
	background: #103b5f;
}

#bbpress-forums div.bbp-template-notice,
#bbpress-forums div.indicator-hint {
	color: #173f68;
	background: #e9f5ff;
	border: 1px solid #93c5fd;
	border-radius: 6px;
	padding: 10px 12px;
	text-shadow: none;
}

#bbpress-forums div.bbp-template-notice.info {
	color: #134e4a;
	background: #ecfdf5;
	border-color: #6ee7b7;
	box-shadow: inset 4px 0 #10b981;
}

#bbpress-forums div.bbp-template-notice.error,
#bbpress-forums div.bbp-template-notice.warning {
	color: #7f1d1d;
	background: #fff1f2;
	border-color: #fda4af;
	box-shadow: inset 4px 0 #e11d48;
}

#bbpress-forums div.bbp-template-notice p,
#bbpress-forums div.bbp-template-notice li,
#bbpress-forums div.indicator-hint p {
	color: inherit;
	font: inherit;
}

#bbpress-forums fieldset.bbp-form,
#bbpress-forums #bbp-search-form {
	color: var(--spek-ink);
	background: #ffffff !important;
}

#bbpress-forums fieldset.bbp-form label,
#bbpress-forums #bbp-your-profile label {
	color: var(--spek-ink);
}

#bbpress-forums input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#bbpress-forums textarea,
#bbpress-forums select {
	box-sizing: border-box;
	max-width: 100%;
	color: #1e293b !important;
	background: #ffffff !important;
	border: 1px solid #94a3b8;
	border-radius: 5px;
	font-size: 16px !important;
	line-height: 1.5;
	color-scheme: light;
}

#bbpress-forums input::placeholder,
#bbpress-forums textarea::placeholder {
	color: #64748b !important;
	opacity: 1;
}

#bbpress-forums a:focus-visible,
#bbpress-forums button:focus-visible,
#bbpress-forums input:focus-visible,
#bbpress-forums textarea:focus-visible,
#bbpress-forums select:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

#bbpress-forums .bbp-the-content-wrapper .quicktags-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	background: #f1f5f9;
}

#bbpress-forums .quicktags-toolbar input.ed_button {
	min-height: 36px;
	margin: 0;
	color: #1e293b !important;
	background: #ffffff !important;
	text-shadow: none;
}

#bbpress-forums .bbp-topic-content img,
#bbpress-forums .bbp-reply-content img,
#bbpress-forums .bbp-topic-content video,
#bbpress-forums .bbp-reply-content video,
#bbpress-forums .bbp-topic-content iframe,
#bbpress-forums .bbp-reply-content iframe {
	max-width: 100%;
}

#bbpress-forums .bbp-topic-content img,
#bbpress-forums .bbp-reply-content img {
	height: auto;
}

#bbpress-forums pre,
#bbpress-forums code {
	max-width: 100%;
	color: #e2e8f0;
	background: #0f172a;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

#bbpress-forums .spek-regg-allowed-tags code {
	background: #103b5f;
}

#bbpress-forums .table-wrapper {
	max-width: 100%;
	overflow-x: auto;
}

/* Phones: one outer gutter, with no second inset around the cards or forum. */
@media screen and (max-width: 767px) {
	#page.site {
		width: 100%;
		max-width: none;
		margin-right: 0;
		margin-left: 0;
	}

	#site-content > .customify-container {
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		padding-right: 6px !important;
		padding-left: 6px !important;
	}

	#site-content > .customify-container > .customify-grid {
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	#site-content #main {
		min-width: 0;
		padding-right: 0 !important;
		padding-left: 0 !important;
	}

	#site-content .content-inner {
		min-width: 0;
		padding-right: 0 !important;
		padding-left: 0 !important;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	#blog-posts .entry-inner {
		padding: 8px !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
		box-shadow: 0 3px 12px rgba(15, 35, 65, 0.06);
	}

	#blog-posts .entry-media {
		margin-right: 0 !important;
	}

	#site-content article.entry-single,
	#site-content .page-title,
	#site-content .comments-area,
	#site-content .entry-content:not(article.entry-single .entry-content) {
		padding-right: 8px;
		padding-left: 8px;
	}

	#site-content article.entry-single .entry-content {
		padding-right: 0;
		padding-left: 0;
	}

	.bbpress #site-content .entry-content {
		padding-right: 0 !important;
		padding-left: 0 !important;
	}

	#bbpress-forums {
		font-size: 16px;
	}

	#bbpress-forums .bbp-breadcrumb,
	#bbpress-forums .bbp-topic-tags,
	#bbpress-forums .bbp-pagination-count {
		float: none;
		width: auto;
		margin: 8px 0;
	}

	#bbpress-forums li.bbp-header {
		padding: 0;
	}

	#bbpress-forums ul.forum-titles,
	#bbpress-forums li.bbp-body ul.forum,
	#bbpress-forums li.bbp-body ul.topic {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) !important;
		width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
		align-items: stretch !important;
	}

	#bbpress-forums ul.forum-titles > li,
	#bbpress-forums li.bbp-body ul.forum > li,
	#bbpress-forums li.bbp-body ul.topic > li {
		float: none !important;
		box-sizing: border-box;
		width: auto !important;
		min-width: 0;
		min-height: 44px !important;
		padding: 8px 6px !important;
		border-left: 0 !important;
		line-height: 1.5 !important;
		overflow-wrap: anywhere !important;
	}

	#bbpress-forums ul.forum-titles > .bbp-forum-info,
	#bbpress-forums ul.forum-titles > .bbp-topic-title,
	#bbpress-forums li.bbp-body ul.forum > .bbp-forum-info,
	#bbpress-forums li.bbp-body ul.topic > .bbp-topic-title {
		display: block !important;
		grid-row: 1 !important;
		grid-column: 1 / -1 !important;
		padding: 10px !important;
		border-right: 0 !important;
		border-bottom: 1px solid #cbd5e1 !important;
		text-align: left !important;
	}

	#bbpress-forums .bbp-forum-topic-count,
	#bbpress-forums .bbp-topic-voice-count {
		grid-row: 2 !important;
		grid-column: 1 !important;
	}

	#bbpress-forums .bbp-forum-reply-count,
	#bbpress-forums .bbp-topic-reply-count {
		grid-row: 2 !important;
		grid-column: 2 !important;
	}

	#bbpress-forums .bbp-forum-freshness,
	#bbpress-forums .bbp-topic-freshness {
		grid-row: 2 !important;
		grid-column: 3 !important;
		flex-direction: column;
	}

	#bbpress-forums .bbp-forum-topic-count,
	#bbpress-forums .bbp-forum-reply-count,
	#bbpress-forums .bbp-forum-freshness,
	#bbpress-forums .bbp-topic-voice-count,
	#bbpress-forums .bbp-topic-reply-count,
	#bbpress-forums .bbp-topic-freshness {
		display: flex !important;
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	#bbpress-forums li.bbp-footer {
		display: none;
	}

	#bbpress-forums li.bbp-body div.hentry {
		grid-template-columns: minmax(0, 1fr);
	}

	#bbpress-forums li.bbp-body div.bbp-reply-author,
	#bbpress-forums li.bbp-body div.bbp-topic-author {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 10px;
		min-height: 0;
		padding: 10px;
		border-right: 0;
		border-bottom: 1px solid #cbd5e1;
		text-align: left;
	}

	#bbpress-forums li.bbp-body div.bbp-reply-author img.avatar,
	#bbpress-forums li.bbp-body div.bbp-topic-author img.avatar {
		position: static;
		width: 40px;
		height: 40px;
		margin: 0;
	}

	#bbpress-forums li.bbp-body .bbp-author-link {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		max-width: 100%;
		min-width: 0;
	}

	#bbpress-forums li.bbp-body .bbp-author-avatar {
		display: flex;
		flex: 0 0 auto;
	}

	#bbpress-forums li.bbp-body div.bbp-reply-author .bbp-author-name,
	#bbpress-forums li.bbp-body div.bbp-topic-author .bbp-author-name,
	#bbpress-forums li.bbp-body .bbp-author-role,
	#bbpress-forums li.bbp-body .bbp-reply-ip {
		margin: 0;
	}

	#bbpress-forums li.bbp-body div.bbp-reply-content,
	#bbpress-forums li.bbp-body div.bbp-topic-content {
		padding: 12px 10px;
		font-size: 16px;
	}

	#bbpress-forums div.bbp-meta {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 10px;
	}

	#bbpress-forums span.bbp-admin-links {
		float: none;
		flex-basis: 100%;
		font-size: 14px;
	}

	#bbpress-forums .bbp-pagination,
	#bbpress-forums .bbp-pagination-links {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 5px;
		float: none;
	}

	#bbpress-forums .bbp-pagination {
		justify-content: space-between;
	}

	#bbpress-forums .bbp-pagination-links a,
	#bbpress-forums .bbp-pagination-links span {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
		margin: 0;
	}

	#bbpress-forums .bbp-reply-form {
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	#bbpress-forums fieldset.bbp-form {
		min-width: 0;
		padding: 12px 10px !important;
		margin: 20px 0;
		box-shadow: none;
	}

	#bbpress-forums fieldset.bbp-form input:not([type="checkbox"]):not([type="radio"]),
	#bbpress-forums fieldset.bbp-form select,
	#bbpress-forums fieldset.bbp-form textarea {
		min-height: 44px;
	}

	#bbpress-forums #bbp-user-wrapper {
		margin-top: 12px;
	}

	#bbpress-forums #bbp-single-user-details {
		float: none;
		width: 100%;
		margin-bottom: 16px;
	}

	#bbpress-forums #bbp-user-body {
		margin-left: 0;
		min-width: 0;
	}

	#bbpress-forums #bbp-single-user-details #bbp-user-avatar {
		width: 72px;
		margin-bottom: 12px;
	}

	#bbpress-forums #bbp-single-user-details #bbp-user-avatar img.avatar {
		width: 72px;
		height: 72px;
	}

	#bbpress-forums #bbp-single-user-details #bbp-user-navigation ul {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
	}

	#bbpress-forums #bbp-single-user-details #bbp-user-navigation a {
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 6px 10px;
		border: 1px solid #cbd5e1;
		border-radius: 5px;
	}

	#bbpress-forums #bbp-your-profile fieldset label[for] {
		float: none;
		display: block;
		width: 100%;
		padding: 0;
		margin-bottom: 6px;
		text-align: left;
	}

	#bbpress-forums #bbp-your-profile fieldset p.description,
	#bbpress-forums #bbp-your-profile fieldset fieldset.password {
		float: none;
		box-sizing: border-box;
		width: 100%;
		margin-left: 0;
	}

	#bbpress-forums #bbp-your-profile fieldset input,
	#bbpress-forums #bbp-your-profile fieldset select,
	#bbpress-forums #bbp-your-profile fieldset textarea {
		width: 100%;
	}

	#bbpress-forums .bbp-reply-content table,
	#bbpress-forums .bbp-topic-content table {
		width: 100%;
		table-layout: fixed;
	}

	#bbpress-forums .bbp-reply-content td,
	#bbpress-forums .bbp-reply-content th,
	#bbpress-forums .bbp-topic-content td,
	#bbpress-forums .bbp-topic-content th {
		overflow-wrap: anywhere;
	}
}
