/* ============================================================================
   TSJ — Single joke post additions
   Loaded by tsj-hashtags-helpers.php on single posts only.
   ============================================================================

   The two colour values below are eyeballed from your header. Adjust them to
   your exact brand hexes and everything else follows automatically.
   ========================================================================= */

:root {
	--tsj-teal:  #2e7d6d;   /* header green — adjust to exact value */
	--tsj-brown: #8b3e1a;   /* joke title brown — adjust to exact value */
	--tsj-card:  #ffffff;
	--tsj-line:  #e6e0d6;
	--tsj-muted: #6b6b6b;
}

/* ---------------------------------------------------------------------------
   Category context line — sits directly under the joke
   Deliberately quiet: it's for Google and for orientation, not a feature.
   ------------------------------------------------------------------------ */

.tsj-cat-context {
	margin: 1.5em 0 0;
	padding-top: 1em;
	border-top: 1px solid var(--tsj-line);
	font-size: 15px;
	line-height: 1.6;
	color: var(--tsj-muted);
}

.tsj-cat-context a {
	color: var(--tsj-teal);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tsj-cat-context a:hover,
.tsj-cat-context a:focus {
	color: var(--tsj-brown);
}

/* ---------------------------------------------------------------------------
   Previous / next joke navigation
   ------------------------------------------------------------------------ */

.tsj-joke-nav {
	display: flex;
	gap: 12px;
	margin: 24px 0;
}

.tsj-nav-link {
	flex: 1 1 50%;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	background: var(--tsj-card);
	border: 1px solid var(--tsj-line);
	border-radius: 8px;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.tsj-nav-link:hover,
.tsj-nav-link:focus {
	border-color: var(--tsj-teal);
	transform: translateY(-1px);
}

.tsj-nav-next {
	text-align: right;
}

.tsj-nav-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tsj-teal);
}

.tsj-nav-title {
	font-size: 15px;
	line-height: 1.4;
	color: #333;
}

/* If only one link exists, don't let it stretch full width awkwardly */
.tsj-joke-nav .tsj-nav-link:only-child {
	flex: 0 1 50%;
}

.tsj-joke-nav .tsj-nav-next:only-child {
	margin-left: auto;
}

/* ---------------------------------------------------------------------------
   Related jokes block
   ------------------------------------------------------------------------ */

.tsj-related {
	margin: 32px 0;
	padding: 24px;
	background: var(--tsj-card);
	border: 1px solid var(--tsj-line);
	border-radius: 10px;
}

.tsj-related-title {
	margin: 0 0 16px;
	font-size: 22px;
	line-height: 1.2;
	color: var(--tsj-brown);
	text-transform: capitalize;
}

.tsj-related-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tsj-related-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--tsj-line);
}

.tsj-related-item:last-child {
	border-bottom: 0;
}

.tsj-related-item a {
	display: block;
	padding: 12px 0;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
	text-decoration: none;
	transition: color 0.15s ease, padding-left 0.15s ease;
}

.tsj-related-item a:hover,
.tsj-related-item a:focus {
	color: var(--tsj-teal);
	padding-left: 6px;
}

.tsj-related-more {
	margin: 16px 0 0;
	font-size: 15px;
	font-weight: 700;
}

.tsj-related-more a {
	color: var(--tsj-teal);
	text-decoration: none;
	text-transform: capitalize;
}

.tsj-related-more a:hover,
.tsj-related-more a:focus {
	color: var(--tsj-brown);
	text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------------ */

@media only screen and (max-width: 600px) {

	.tsj-joke-nav {
		flex-direction: column;
		gap: 8px;
	}

	.tsj-nav-next {
		text-align: left;
	}

	.tsj-joke-nav .tsj-nav-link:only-child,
	.tsj-joke-nav .tsj-nav-next:only-child {
		flex: 1 1 auto;
		margin-left: 0;
	}

	.tsj-related {
		padding: 18px 16px;
	}

	.tsj-related-title {
		font-size: 20px;
	}
}

/* ---------------------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------------------ */

.tsj-nav-link:focus-visible,
.tsj-related-item a:focus-visible {
	outline: 2px solid var(--tsj-teal);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

	.tsj-nav-link,
	.tsj-related-item a {
		transition: none;
	}

	.tsj-nav-link:hover,
	.tsj-nav-link:focus {
		transform: none;
	}
}
/* ---------------------------------------------------------------------------
   Random joke link, beneath the related jokes block
   ------------------------------------------------------------------------ */

.tsj-random-link {
	margin: 0 0 24px;
	text-align: center;
	font-weight: 700;
}

.tsj-random-link a {
	color: var(--tsj-teal);
}
