/*
 * MuaThemeWP - Tài Liệu Public Styles
 * Professional documentation layout with sidebar navigation
 */

/* Reset & Base Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.mtw-tailieu-page {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #333;
	background: #f5f7fa;
}

/* Main Wrapper */
.mtw-tailieu-wrapper {
	display: flex;
	min-height: 100vh;
	background: #fff;
}

/* ========================
   SIDEBAR STYLES
   ======================== */
.mtw-sidebar {
	width: 280px;
	background: #f8f9fa;
	border-right: 1px solid #e5e7eb;
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 1000;
	transition: transform 0.3s ease;
}

.mtw-sidebar::-webkit-scrollbar {
	width: 6px;
}

.mtw-sidebar::-webkit-scrollbar-track {
	background: transparent;
}

.mtw-sidebar::-webkit-scrollbar-thumb {
	background: #cbd5e0;
	border-radius: 3px;
}

.mtw-sidebar::-webkit-scrollbar-thumb:hover {
	background: #a0aec0;
}

.mtw-sidebar-inner {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding-bottom: 20px;
}

/* Sidebar Header */
.mtw-sidebar-header {
	padding: 20px;
	border-bottom: 1px solid #e5e7eb;
	background: #fff;
}

.mtw-logo {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: #1a202c;
	font-weight: 600;
	font-size: 18px;
	transition: color 0.2s;
}

.mtw-logo:hover {
	color: #3182ce;
}

.mtw-logo-icon {
	font-size: 24px;
	margin-right: 10px;
}

.mtw-logo-text {
	color: #2d3748;
}

/* Sidebar Navigation */
.mtw-sidebar-nav {
	flex: 1;
	padding: 20px 0;
}

.mtw-nav-section {
	margin-bottom: 30px;
}

.mtw-nav-title {
	padding: 8px 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: #718096;
	letter-spacing: 0.5px;
}

.mtw-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mtw-nav-item {
	margin: 0;
}

.mtw-nav-item > a {
	display: block;
	padding: 10px 20px;
	color: #4a5568;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s;
	position: relative;
}

.mtw-nav-item > a:hover {
	background: #e6f2ff;
	color: #2b6cb0;
}

.mtw-nav-item.active > a {
	background: #e6f2ff;
	color: #2b6cb0;
	font-weight: 600;
}

/* Submenu */
.mtw-nav-submenu {
	list-style: none;
	padding: 0;
	margin: 0;
	background: #fff;
}

.mtw-nav-submenu > li {
	margin: 0;
}

.mtw-nav-submenu > li > a {
	display: block;
	padding: 8px 20px 8px 40px;
	color: #4a5568;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.2s;
}

.mtw-nav-submenu > li > a:hover {
	background: #f0f4f8;
	color: #2d3748;
}

.mtw-nav-submenu > li.active > a {
	color: #2b6cb0;
	font-weight: 600;
}

/* Post List */
.mtw-nav-posts {
	list-style: none;
	padding: 5px 0;
	margin: 0;
}

.mtw-nav-posts li {
	margin: 0;
}

.mtw-nav-posts li a {
	display: block;
	padding: 6px 20px 6px 60px;
	color: #718096;
	text-decoration: none;
	font-size: 13px;
	transition: all 0.2s;
}

.mtw-nav-posts li a:hover {
	background: #f7fafc;
	color: #4a5568;
}

.mtw-nav-posts li.active a {
	color: #3182ce;
	font-weight: 600;
	background: #ebf8ff;
	border-left: 3px solid #3182ce;
	padding-left: 57px;
}

/* Sidebar Footer */
.mtw-sidebar-footer {
	padding: 20px;
	border-top: 1px solid #e5e7eb;
	font-size: 12px;
	color: #a0aec0;
	text-align: center;
}

.mtw-sidebar-footer a {
	color: #3182ce;
	text-decoration: none;
}

.mtw-sidebar-footer a:hover {
	text-decoration: underline;
}

/* ========================
   MAIN CONTENT STYLES
   ======================== */
.mtw-main-content {
	flex: 1;
	margin-left: 280px;
	background: #fff;
}

.mtw-content-wrapper {
	max-width: 900px;
	margin: 0 auto;
	padding: 40px 60px;
}

/* Notification */
.mtw-notification {
	display: flex;
	gap: 15px;
	padding: 16px 20px;
	margin-bottom: 30px;
	border-radius: 8px;
	border-left: 4px solid;
	font-size: 14px;
}

.mtw-notification-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.mtw-notification-content {
	flex: 1;
}

.mtw-notification-content p:last-child {
	margin-bottom: 0;
}

.mtw-notification-info {
	background: #ebf8ff;
	border-left-color: #3182ce;
	color: #2c5282;
}

.mtw-notification-warning {
	background: #fffbeb;
	border-left-color: #f59e0b;
	color: #92400e;
}

.mtw-notification-success {
	background: #f0fdf4;
	border-left-color: #10b981;
	color: #065f46;
}

.mtw-notification-error {
	background: #fef2f2;
	border-left-color: #ef4444;
	color: #991b1b;
}

/* Article */
.mtw-article {
	margin-bottom: 40px;
}

.mtw-article-header {
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e5e7eb;
}

.mtw-article-title {
	font-size: 36px;
	font-weight: 700;
	color: #1a202c;
	line-height: 1.3;
	margin-bottom: 15px;
}

.mtw-article-excerpt {
	font-size: 18px;
	color: #718096;
	line-height: 1.6;
}

.mtw-article-content {
	font-size: 16px;
	line-height: 1.8;
	color: #2d3748;
}

.mtw-article-content h2 {
	font-size: 28px;
	font-weight: 700;
	margin: 40px 0 20px;
	color: #1a202c;
	padding-top: 20px;
	border-top: 1px solid #e5e7eb;
}

.mtw-article-content h2:first-child {
	border-top: none;
	padding-top: 0;
}

.mtw-article-content h3 {
	font-size: 22px;
	font-weight: 600;
	margin: 30px 0 15px;
	color: #2d3748;
}

.mtw-article-content h4 {
	font-size: 18px;
	font-weight: 600;
	margin: 25px 0 12px;
	color: #4a5568;
}

.mtw-article-content p {
	margin-bottom: 20px;
}

.mtw-article-content ul,
.mtw-article-content ol {
	margin: 20px 0;
	padding-left: 30px;
}

.mtw-article-content li {
	margin-bottom: 10px;
}

.mtw-article-content a {
	color: #3182ce;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s;
}

.mtw-article-content a:hover {
	border-bottom-color: #3182ce;
}

.mtw-article-content code {
	background: #f7fafc;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
	color: #e53e3e;
	font-family: 'Courier New', monospace;
}

.mtw-article-content pre {
	background: #2d3748;
	color: #f7fafc;
	padding: 20px;
	border-radius: 8px;
	overflow-x: auto;
	margin: 20px 0;
}

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

.mtw-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 20px 0;
}

.mtw-article-content blockquote {
	border-left: 4px solid #cbd5e0;
	padding: 15px 20px;
	margin: 20px 0;
	background: #f7fafc;
	font-style: italic;
	color: #4a5568;
}

.mtw-article-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
}

.mtw-article-content table th,
.mtw-article-content table td {
	padding: 12px;
	border: 1px solid #e5e7eb;
	text-align: left;
}

.mtw-article-content table th {
	background: #f7fafc;
	font-weight: 600;
}

/* Article Footer */
.mtw-article-footer {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 2px solid #e5e7eb;
}

/* Voting */
.mtw-voting {
	text-align: center;
	padding: 30px;
	background: #f7fafc;
	border-radius: 8px;
	margin-bottom: 40px;
}

.mtw-voting-question {
	font-size: 18px;
	font-weight: 600;
	color: #2d3748;
	margin-bottom: 20px;
}

.mtw-voting-buttons {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-bottom: 15px;
}

.mtw-vote-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: 2px solid #e5e7eb;
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.2s;
}

.mtw-vote-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mtw-vote-up:hover {
	border-color: #48bb78;
	color: #48bb78;
}

.mtw-vote-down:hover {
	border-color: #f56565;
	color: #f56565;
}

.mtw-vote-btn.voted {
	border-width: 3px;
}

.mtw-vote-up.voted {
	border-color: #48bb78;
	background: #f0fff4;
	color: #48bb78;
}

.mtw-vote-down.voted {
	border-color: #f56565;
	background: #fff5f5;
	color: #f56565;
}

.mtw-vote-icon {
	font-size: 20px;
}

.mtw-vote-count {
	min-width: 24px;
	font-weight: 700;
}

.mtw-voting-stats {
	font-size: 14px;
	color: #718096;
}

/* Post Navigation */
.mtw-post-navigation {
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
}

.mtw-nav-prev,
.mtw-nav-next {
	flex: 1;
	padding: 20px;
	background: #f7fafc;
	border-radius: 8px;
	transition: background 0.2s;
}

.mtw-nav-prev:hover,
.mtw-nav-next:hover {
	background: #edf2f7;
}

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

.mtw-nav-label {
	display: block;
	font-size: 12px;
	color: #718096;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

.mtw-nav-link {
	display: block;
	color: #3182ce;
	text-decoration: none;
	font-weight: 600;
	font-size: 16px;
	transition: color 0.2s;
}

.mtw-nav-link:hover {
	color: #2c5282;
}

/* Last Updated */
.mtw-last-updated {
	text-align: center;
	color: #a0aec0;
	font-size: 14px;
	font-style: italic;
}

/* ========================
   RESPONSIVE STYLES
   ======================== */
@media (max-width: 1024px) {
	.mtw-content-wrapper {
		padding: 30px 40px;
	}
}

@media (max-width: 768px) {
	.mtw-sidebar {
		transform: translateX(-100%);
		width: 280px;
	}

	.mtw-sidebar.active {
		transform: translateX(0);
	}

	.mtw-main-content {
		margin-left: 0;
	}

	.mtw-content-wrapper {
		padding: 20px;
	}

	.mtw-article-title {
		font-size: 28px;
	}



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

/* Mobile Menu Toggle */
.mtw-mobile-toggle {
	display: none;
	position: fixed;
	top: 20px;
	left: 20px;
	z-index: 1001;
	background: #3182ce;
	color: #fff;
	border: none;
	padding: 10px 15px;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
	.mtw-mobile-toggle {
		display: block;
	}
}

/* Loading State */
.mtw-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Success Message */
.mtw-success-message {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #48bb78;
	color: #fff;
	padding: 15px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 10000;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}
