/**
 * Single Post Page Styles
 * Styles for single blog post page
 *
 * @package Errand
 */

/* ==========================================================================
   Single Post Layout
   ========================================================================== */

.single-post-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
	align-items: start;
}

.single-post-main {
	min-width: 0;
}

/* ==========================================================================
   Entry Header
   ========================================================================== */

.entry-header {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 2px solid var(--post-border-color);
}

.entry-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--post-text-primary);
	margin-bottom: 1.5rem;
	line-height: 1.2;
}

/* Entry Meta */
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	font-size: 0.9375rem;
	color: var(--post-text-secondary);
	margin-top: 1.5rem;
}

.entry-meta span,
.entry-meta time {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.entry-meta i {
	font-size: 0.8125rem;
	opacity: 0.7;
}

.entry-date,
.entry-author,
.entry-categories,
.entry-tags {
	color: var(--post-text-secondary);
}

.entry-author a,
.entry-categories a,
.entry-tags a {
	color: var(--post-text-secondary) !important;
	text-decoration: none;
	transition: var(--post-transition-fast);
}

.entry-author a:hover,
.entry-categories a:hover,
.entry-tags a:hover {
	color: var(--post-primary-color) !important;
}

/* ==========================================================================
   Entry Content
   ========================================================================== */

.entry-content {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 2rem;
	margin-bottom: 2rem;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--post-text-primary);
	font-weight: 600;
	margin-top: 2rem;
	margin-bottom: 1rem;
	line-height: 1.3;
}

.entry-content h2 {
	font-size: 1.875rem;
}

.entry-content h3 {
	font-size: 1.5rem;
}

.entry-content h4 {
	font-size: 1.25rem;
}

.entry-content p {
	font-size: 1.0625rem;
	line-height: 1.8;
	color: var(--post-text-primary);
	margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
	margin-bottom: 1.5rem;
	padding-left: 2rem;
}

.entry-content li {
	font-size: 1.0625rem;
	line-height: 1.8;
	color: var(--post-text-primary);
	margin-bottom: 0.75rem;
}

.entry-content a {
	color: var(--post-primary-color);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: var(--post-transition-fast);
}

.entry-content a:hover {
	border-bottom-color: var(--post-primary-color);
}

.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--post-border-radius);
	margin: 1.5rem 0;
}

.entry-content blockquote {
	border-left: 4px solid var(--post-primary-color);
	padding-left: 1.5rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: var(--post-text-secondary);
}

.entry-content code {
	background: var(--post-bg-tertiary);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.9375rem;
	color: var(--post-text-primary);
}

.entry-content pre {
	background: var(--post-bg-tertiary);
	padding: 1.5rem;
	border-radius: var(--post-border-radius);
	overflow-x: auto;
	margin: 1.5rem 0;
}

.entry-content pre code {
	background: transparent;
	padding: 0;
}

.page-links {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--post-border-color);
	font-size: 0.9375rem;
	color: var(--post-text-secondary);
}

.page-links a {
	color: var(--post-primary-color);
	text-decoration: none;
	margin: 0 0.25rem;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	background: var(--post-bg-secondary);
	transition: var(--post-transition-fast);
}

.page-links a:hover {
	background: var(--post-primary-color);
	color: white;
}

/* ==========================================================================
   Entry Footer
   ========================================================================== */

.entry-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--post-border-color);
}

/* Post Navigation */
.post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	margin-top: 2rem !important;
}

.nav-previous,
.nav-next {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 1.5rem;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
	transition: var(--post-transition);
}

.nav-previous:hover,
.nav-next:hover {
	box-shadow: var(--post-shadow-md);
	transform: translateY(-2px);
	border-color: var(--post-primary-color);
}

.nav-previous a,
.nav-next a {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--post-text-primary) !important;
}

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

.nav-next a {
	align-items: flex-end;
}

.nav-subtitle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--post-text-secondary);
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.nav-previous .nav-subtitle {
	flex-direction: row;
}

.nav-next .nav-subtitle {
	flex-direction: row-reverse;
}

.nav-title {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--post-text-primary);
	line-height: 1.4;
	transition: var(--post-transition-fast);
}

.nav-previous:hover .nav-title,
.nav-next:hover .nav-title {
	color: var(--post-primary-color);
}

/* ==========================================================================
   Related Posts
   ========================================================================== */

.related-posts {
	margin-top: 4rem;
	padding-top: 3rem;
	border-top: 2px solid var(--post-border-color);
}

.related-posts-title {
	font-size: 1.875rem;
	font-weight: 600;
	color: var(--post-text-primary);
	margin-bottom: 2rem;
	text-align: center;
}

.related-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.related-post-card {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	overflow: hidden;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
	transition: var(--post-transition);
}

.related-post-card:hover {
	box-shadow: var(--post-shadow-md);
	transform: translateY(-2px);
	border-color: var(--post-border-hover);
}

.related-post-thumbnail {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background: var(--post-bg-tertiary);
}

.related-post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--post-transition);
}

.related-post-card:hover .related-post-thumbnail img {
	transform: scale(1.05);
}

.related-post-content {
	padding: 1.5rem;
}

.related-post-title {
	font-size: 1.0625rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	line-height: 1.4;
}

.related-post-title a {
	color: var(--post-text-primary) !important;
	text-decoration: none;
	transition: var(--post-transition-fast);
}

.related-post-title a:hover {
	color: var(--post-primary-color) !important;
}

.related-post-meta {
	margin-bottom: 0.75rem;
}

.related-post-date {
	font-size: 0.875rem;
	color: var(--post-text-secondary);
}

.related-post-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--post-text-secondary);
	margin-top: 0.75rem;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
	margin-top: 4rem;
	padding-top: 3rem;
	border-top: 2px solid var(--post-border-color);
}

.comments-title {
	font-size: 1.875rem;
	font-weight: 600;
	color: var(--post-text-primary);
	margin-bottom: 2rem;
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem 0;
}

.comment {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.comment-author .avatar {
	border-radius: 50%;
	width: 48px;
	height: 48px;
}

.comment-author .fn {
	font-weight: 600;
	color: var(--post-text-primary);
	font-size: 1.0625rem;
}

.comment-author .fn a {
    color: var(--post-text-primary) !important;
    text-decoration: none;
    transition: var(--post-transition-fast);
}

.comment-author .fn a:hover {
    color: var(--post-primary-color) !important;
}
.comment-meta {
	font-size: 0.875rem;
	color: var(--post-text-secondary);
	margin-top: 0.5rem;
}

.comment-meta a {
    color: var(--post-text-secondary) !important;
    text-decoration: none;
    transition: var(--post-transition-fast);
}

.comment-meta a:hover {
    color: var(--post-primary-color) !important;
}
.comment-content {
	font-size: 1.0625rem;
	line-height: 1.8;
	color: var(--post-text-primary);
	margin-top: 1rem;
}

.comment-content p {
	margin-bottom: 1rem;
}

.comment-reply-link {
	color: var(--post-primary-color) !important;
	text-decoration: none !important;
	font-size: 0.9375rem;
	font-weight: 500;
	transition: var(--post-transition-fast) !important;
}

.comment-reply-link:hover {
	color: var(--post-primary-hover) !important;
}

/* Comment Form */
.comment-respond {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 2rem;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
}

.comment-reply-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--post-text-primary);
	margin-bottom: 1.5rem;
}

.comment-form {
	display: grid;
	gap: 1.5rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
	font-weight: 500;
	color: var(--post-text-primary);
	font-size: 0.9375rem;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input,
.comment-form-comment textarea {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid var(--post-border-color);
	border-radius: var(--post-border-radius);
	font-size: 1rem;
	transition: var(--post-transition-fast);
	background: var(--post-bg-secondary);
	color: var(--post-text-primary);
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus,
.comment-form-comment textarea:focus {
	outline: none;
	border-color: var(--post-primary-color);
	background: white;
}

.comment-form-comment textarea {
	min-height: 150px;
	resize: vertical;
	font-family: inherit;
}

.form-submit {
	margin-top: 1rem;
}

.comment-form .submit {
	background: var(--post-primary-color);
	color: white;
	border: none;
	border-radius: var(--post-border-radius);
	padding: 0.875rem 2rem;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: var(--post-transition-fast);
}

.comment-form .submit:hover {
	background: var(--post-primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--post-shadow-md);
}

/* Hide profile edit and logout links for logged-in users */
.comment-form-cookies-consent label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	color: var(--post-text-secondary);
	cursor: pointer;
}

.comment-form-cookies-consent input[type="checkbox"] {
	width: auto;
	margin: 0;
}

/* Comment login notice */
.comment-login-notice {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 2rem;
	text-align: center;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
	margin-top: 2rem;
}

.comment-login-notice p {
	font-size: 1.0625rem;
	color: var(--post-text-secondary);
	margin-bottom: 1.5rem;
}

.comment-login-notice .btn {
	display: inline-block;
}

.comment-login-notice a {
	color: white !important;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.single-post-sidebar {
	position: sticky;
	top: 2rem;
}

/* Same styles as post-list sidebar */
.single-post-sidebar .sidebar-widget {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 1.5rem;
	margin-bottom: 2rem;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
}

.single-post-sidebar .widget-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--post-text-primary);
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--post-border-color);
}

.single-post-sidebar .recent-posts-list,
.single-post-sidebar .categories-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.single-post-sidebar .recent-posts-list li,
.single-post-sidebar .categories-list li {
	margin-bottom: 0.75rem;
}

.single-post-sidebar .recent-posts-list li:last-child,
.single-post-sidebar .categories-list li:last-child {
	margin-bottom: 0;
}

.single-post-sidebar .recent-posts-list a,
.single-post-sidebar .categories-list a {
	color: var(--post-text-secondary);
	text-decoration: none;
	font-size: 0.9375rem;
	line-height: 1.6;
	transition: var(--post-transition-fast);
	display: block;
}

.single-post-sidebar .recent-posts-list a:hover,
.single-post-sidebar .categories-list a:hover {
	color: var(--post-primary-color);
	padding-left: 0.5rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 968px) {
	.single-post-layout {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	
	.single-post-sidebar {
		position: static;
	}
	
	.entry-title {
		font-size: 2rem;
	}
	
	.entry-content {
		padding: 1.5rem;
	}
	
	.post-navigation {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	
	.related-posts-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

@media screen and (max-width: 640px) {
	.entry-title {
		font-size: 1.75rem;
	}
	
	.entry-meta {
		font-size: 0.875rem;
		gap: 1rem;
	}
	
	.entry-content {
		padding: 1.25rem;
	}
	
	.entry-content h2 {
		font-size: 1.5rem;
	}
	
	.entry-content h3 {
		font-size: 1.25rem;
	}
	
	.entry-content h4 {
		font-size: 1.125rem;
	}
	
	.related-posts-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	
	.comment-respond {
		padding: 1.5rem;
	}
	
	.comment-form {
		gap: 1rem;
	}
}
