/*
 * TopListWP - Custom Theme Styles
 * Supplemental styles beyond Tailwind utilities
 */

/* =========================================================
   Typography & Base
   ========================================================= */

body {
	font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   Custom Logo
   ========================================================= */

.site-logo img,
.footer-logo img {
	max-height: 50px;
	width: auto;
	display: block;
}

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

/* Dropdown menu support */
.nav-menu .menu-item-has-children {
	position: relative;
}

.nav-menu .menu-item-has-children > .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 10px 25px -5px rgba(0,0,0,.1);
	padding: 6px 0;
	z-index: 100;
}

.nav-menu .menu-item-has-children:hover > .sub-menu {
	display: block;
}

.nav-menu .sub-menu li a {
	display: block;
	padding: 8px 16px;
	font-size: 13px;
	color: #374151;
	transition: background 0.15s, color 0.15s;
}

.nav-menu .sub-menu li a:hover {
	background: #f0fdf4;
	color: #16a34a;
}

/* Mobile nav menu */
.mobile-nav-menu li a {
	display: block;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu .current-menu-item > a {
	background: #f0fdf4;
	color: #16a34a;
}

/* =========================================================
   Sticky header
   ========================================================= */

.site-header {
	transition: box-shadow 0.2s;
}

.site-header.scrolled {
	box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* =========================================================
   Post content (entry-content) prose overrides
   ========================================================= */

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 1.75em;
	margin-bottom: 0.75em;
}

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

.entry-content ul li {
	list-style-type: disc;
	margin-bottom: 4px;
}

.entry-content ol li {
	list-style-type: decimal;
	margin-bottom: 4px;
}

.entry-content blockquote {
	border-left: 4px solid #22c55e;
	background: #f0fdf4;
	padding: 12px 20px;
	border-radius: 0 8px 8px 0;
	margin: 1.5em 0;
	font-style: italic;
	color: #374151;
}

.entry-content pre {
	background: #1f2937;
	color: #e5e7eb;
	border-radius: 8px;
	padding: 16px;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.6;
}

.entry-content code {
	background: #f3f4f6;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
	color: #be185d;
}

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

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 14px;
}

.entry-content table th,
.entry-content table td {
	border: 1px solid #e5e7eb;
	padding: 10px 14px;
	text-align: left;
}

.entry-content table th {
	background: #f9fafb;
	font-weight: 600;
}

.entry-content table tr:nth-child(even) td {
	background: #f9fafb;
}

/* =========================================================
   Widgets
   ========================================================= */

.widget select {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 13px;
	color: #374151;
	background: #fff;
	outline: none;
	transition: border-color 0.15s;
}

.widget select:focus {
	border-color: #22c55e;
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget ul li {
	padding: 6px 0;
	border-bottom: 1px solid #f3f4f6;
	font-size: 13px;
}

.widget ul li:last-child {
	border-bottom: none;
}

.widget ul li a {
	color: #374151;
	transition: color 0.15s;
}

.widget ul li a:hover {
	color: #22c55e;
}

/* Tag cloud */
.widget_tag_cloud .tagcloud a {
	display: inline-block;
	border: 1px solid #e5e7eb;
	color: #374151;
	font-size: 12px !important;
	padding: 3px 10px;
	border-radius: 20px;
	margin: 2px;
	transition: border-color 0.15s, color 0.15s;
}

.widget_tag_cloud .tagcloud a:hover {
	border-color: #22c55e;
	color: #22c55e;
}

/* Search widget */
.widget_search .search-form {
	display: flex;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.15s;
}

.widget_search .search-form:focus-within {
	border-color: #22c55e;
}

.widget_search .search-field {
	flex: 1;
	border: none;
	outline: none;
	padding: 8px 12px;
	font-size: 13px;
	color: #374151;
}

.widget_search .search-submit {
	background: #22c55e;
	border: none;
	padding: 8px 14px;
	cursor: pointer;
	color: #fff;
	transition: background 0.15s;
}

.widget_search .search-submit:hover {
	background: #16a34a;
}

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

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

.comment-list .comment {
	margin-bottom: 24px;
}

.comment-body {
	background: #f9fafb;
	border-radius: 10px;
	padding: 16px;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.comment-meta img.avatar {
	border-radius: 50%;
}

.comment-author .fn {
	font-weight: 600;
	font-size: 14px;
	color: #1f2937;
}

.comment-metadata {
	font-size: 12px;
	color: #9ca3af;
}

.comment-content p {
	font-size: 14px;
	color: #374151;
	line-height: 1.6;
	margin: 0;
}

.comment-reply-link {
	font-size: 12px;
	color: #22c55e;
	margin-top: 8px;
	display: inline-block;
}

.comment-reply-link:hover {
	color: #16a34a;
}

.children {
	margin-left: 40px;
	list-style: none;
	padding: 0;
}

/* Comment form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	color: #374151;
	outline: none;
	transition: border-color 0.15s;
	background: #fff;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: #22c55e;
}

.comment-form textarea {
	resize: vertical;
	min-height: 120px;
}

.comment-form .submit {
	background: #22c55e;
	color: #fff;
	border: none;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.comment-form .submit:hover {
	background: #16a34a;
}

/* =========================================================
   Utilities
   ========================================================= */

.line-clamp-1 {
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
}

.line-clamp-2 {
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* Sticky sidebar */
@media (min-width: 1024px) {
	.sticky-sidebar {
		position: sticky;
		top: 76px;
	}
}

/* Screen reader text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
