/**
 * Custom Styles for robpurdie.com
 * Version controlled custom CSS
 */

/* ============================================
	Navigation Styling
	============================================ */

/* Bold and darken the current page in navigation */
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
	font-weight: bold;
	color: #000; /* Pure black for contrast */
}

/* Bold and darken navigation links on hover */
.main-navigation a:hover {
	font-weight: bold;
	color: #000;
	text-decoration: underline !important;
}

/* Mobile navigation fixes */
@media (max-width: 1024px) {
	/* Make mobile menu narrower with equal padding on both sides */
	.drawer-inner {
		max-width: 225px !important;
		width: 225px !important;
	}

	/* Make current page visible in mobile menu (white text on black background) */
	.mobile-navigation .current-menu-item a,
	.mobile-navigation .current_page_item a {
		color: #ffffff !important;
		font-weight: bold;
	}
}

/* ============================================
	Form Styling
	============================================ */

/* More specific selector for WPForms textarea */
.wpforms-container .wpforms-field-textarea textarea {
	max-width: 745px !important;
}

/* ============================================
	Post List Styling
	============================================ */

/* Add border between posts */
.entry-list-item {
	border-bottom: 1px solid #ddd !important;
	padding-bottom: 30px !important;
	margin-bottom: 0px !important;
}

/* Remove border from last post */
.entry-list-item:last-child {
	border-bottom: none !important;
}

/* Reduce space between post title and meta (author/date) */
.entry-list-item .entry-title h2,
.entry-list-item .entry-header .entry-title h2,
.single-post .entry-title h2,
.single-post .entry-header .entry-title h2 {
	margin-bottom: 0.25em !important;
}

/* Reduce space above entry meta (author/date) */
.entry-list-item .entry-meta.entry-meta-divider-dot,
.single-post .entry-meta.entry-meta-divider-dot {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* ============================================
	Comments Section Styling
	============================================ */

/* Reduce space between post navigation and comments */
.post-navigation {
	margin-bottom: 15px !important;
}

/* Reduce size of "Leave a comment" heading and space below it */
#reply-title.comment-reply-title {
	font-size: 1.5em !important;
	margin-bottom: 0.25em !important;
}

/* Reduce size of "Logged in as..." text and padding around it */
.comment-form p.logged-in-as {
	font-size: 13px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* Reduce space above comment field */
.comment-form-comment {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.comment-form p.comment-form-float-label {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* ============================================
	Footnotes Styling
	============================================ */

/* Add "Notes" heading before footnotes */
.easy-footnotes-wrapper::before {
	content: "Notes";
	display: block;
	font-size: 1.5em;
	font-weight: bold;
	margin-top: 30px;
	margin-bottom: 30px;
	border-top: 1px solid #ddd;
	padding-top: 30px;
}

/* Make footnote text smaller and remove list indentation */
.easy-footnotes-wrapper {
	font-size: 0.85em;
	line-height: 1.6;
	margin-left: 0 !important;
	padding-left: 0 !important;
	list-style-position: inside;
}

/* Add some breathing room between footnotes */
.easy-footnote-single {
	margin-bottom: 0.75em;
}

/* ============================================
	Button Styling - Grey color scheme
	============================================ */

/* Pagination - Active/Current Page */
.page-numbers.current {
	background-color: #6b7280 !important;
	border-color: #6b7280 !important;
	color: #ffffff !important;
}

/* Pagination - Other Page Links */
a.page-numbers {
	background-color: transparent !important;
	border: 2px solid #d1d5db !important;
	color: #4b5563 !important;
}

a.page-numbers:hover,
a.page-numbers:focus {
	background-color: #e5e7eb !important;
	border-color: #6b7280 !important;
	color: #1f2937 !important;
}

/* Next/Previous arrows */
a.next.page-numbers,
a.prev.page-numbers {
	background-color: transparent !important;
	border: 2px solid #d1d5db !important;
	color: #4b5563 !important;
}

a.next.page-numbers:hover,
a.prev.page-numbers:hover {
	background-color: #e5e7eb !important;
	border-color: #6b7280 !important;
}

/* Paginated post links (for multi-page posts) */
.post-page-numbers {
	background-color: transparent !important;
	border: 2px solid #d1d5db !important;
	color: #4b5563 !important;
	text-decoration: none !important;
	display: inline-block !important;
	border-radius: 3px !important;
}

.post-page-numbers.current {
	background-color: #6b7280 !important;
	border-color: #6b7280 !important;
	color: #ffffff !important;
}

a.post-page-numbers:hover {
	background-color: #e5e7eb !important;
	border-color: #6b7280 !important;
	color: #1f2937 !important;
}

/* Replace arrow symbols with simple > and < */
a.next.page-numbers svg,
a.prev.page-numbers svg,
a.next.page-numbers .kadence-svg-iconset,
a.prev.page-numbers .kadence-svg-iconset {
	display: none !important;
}

a.next.page-numbers::after {
	content: ">" !important;
	font-size: 1em !important;
}

a.prev.page-numbers::before {
	content: "<" !important;
	font-size: 1em !important;
}

/* Submit buttons and general buttons - match pagination button size */
button[type="submit"],
.wpforms-submit,
input[type="submit"],
.wp-block-button__link,
.comment-form input[type="submit"] {
	background-color: #6b7280 !important;
	border: 2px solid #6b7280 !important;
	color: #ffffff !important;
	padding: 10px 20px !important;
	font-size: 0.95em !important;
	cursor: pointer !important;
	border-radius: 3px !important;
}

button[type="submit"]:hover,
.wpforms-submit:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
	background-color: #4b5563 !important;
	border-color: #4b5563 !important;
}

/* READ MORE buttons on blog posts */
.entry-content-wrap .entry-read-more,
.more-link {
	background-color: transparent !important;
	border: 2px solid #d1d5db !important;
	color: #4b5563 !important;
	padding: 10px 20px !important;
	text-decoration: none !important;
	display: inline-block !important;
}

.entry-content-wrap .entry-read-more:hover,
.more-link:hover {
	background-color: #e5e7eb !important;
	border-color: #6b7280 !important;
	color: #1f2937 !important;
}

/* Hide SVG arrow and replace with > */
.post-more-link .kadence-svg-iconset,
.post-more-link svg {
	display: none !important;
}

.post-more-link::after {
	content: " >" !important;
}

/* Replace arrows in post navigation (previous/next) */
.post-navigation-sub svg {
	display: none !important;
}

.nav-next .post-navigation-sub .kadence-svg-iconset {
	font-size: 0 !important;
}

.nav-next .post-navigation-sub .kadence-svg-iconset::after {
	content: ">" !important;
	font-size: 1rem !important;
	display: inline-block !important;
	padding-left: 0.25em !important;
}

.nav-previous .post-navigation-sub .kadence-svg-iconset {
	font-size: 0 !important;
}

.nav-previous .post-navigation-sub .kadence-svg-iconset::before {
	content: "<" !important;
	font-size: 1rem !important;
	display: inline-block !important;
	padding-right: 0.25em !important;
}

/* ============================================
	Page-Specific Styling
	============================================ */

/* Reduce space below headings on About page */
.page .entry-content h2,
.page .entry-content h3 {
	margin-bottom: 0.25em !important;
}

/* Reduce space below paragraph headings (strong tags used as headings) */
.page .entry-content p:has(strong:only-child) {
	margin-bottom: 0.5em !important;
}

/* Standardize horizontal rule styling on pages */
.page .entry-content hr {
	border: 0 !important;
	border-top: 1px solid #ddd !important;
	margin: 2em 0 !important;
}

/* ============================================
	Bibliography Styling
	============================================ */

/* Remove Kadence's default top margin from entry-content on bibliography page */
.entry-content.single-content {
	margin-top: 0 !important;
}

/* Bibliography container */
.rp-bibliography {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
	margin: 0 0 40px 0;
}

/* Individual book */
.rp-book {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 30px;
	padding: 0 0 30px 0;
	margin-bottom: 0;
	border-bottom: 1px solid #ddd;
}

.rp-book:last-child {
	border-bottom: none;
}

/* Book cover */
.rp-book-cover {
	width: 200px;
}

.rp-book-cover img {
	width: 100%;
	height: auto;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	border-radius: 2px;
	transition: transform 0.2s ease;
}

.rp-book-cover img:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Placeholder for books without covers */
.rp-book-cover-placeholder {
	width: 200px;
	height: 300px;
	background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	border-radius: 2px;
}

.rp-book-title-short {
	color: #1f2937;
	font-weight: bold;
	text-align: center;
	font-size: 0.9em;
	line-height: 1.4;
}

/* Book details */
.rp-book-details {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.rp-book-title {
	margin: 0 !important;
	font-size: 1.2em;
	font-weight: bold;
	line-height: 1.3;
}

.rp-book-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.rp-book-title a:hover {
	color: #6b7280;
}

.rp-book-author {
	margin: 4px 0 0 0 !important;
	font-size: 0.95em;
	color: #6b7280;
	font-style: italic;
}

.rp-book-meta {
	margin: 4px 0 0 0 !important;
	font-size: 0.85em;
	color: #6b7280;
}

.rp-book-isbn {
	margin: 4px 0 0 0 !important;
	font-size: 0.85em;
	color: #6b7280;
	font-family: monospace;
}

.rp-book-description {
	margin: 16px 0 0 0 !important;
	font-size: 0.95em;
	line-height: 1.6;
	color: #374151;
}

.rp-book-link {
	margin: 8px 0 0 0;
}

.rp-book-link a {
	color: #6b7280;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.rp-book-link a:hover {
	color: #4b5563;
	text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
	.rp-book {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.rp-book-cover {
		width: 150px;
		margin: 0;
	}

	.rp-book-cover-placeholder {
		width: 150px;
		height: 225px;
	}

	.rp-book-details {
		text-align: left;
	}
}
