/* Layout Wrapper */
.posts_management_wrapper
{
	display: block;
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px;
}

.page_header
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.page_title
{
	color: var(--primary-orange);
	font-size: 2rem;
	margin: 0;
	text-transform: uppercase;
}

.add_post_btn
{
	background: var(--primary-orange);
	color: white;
	border: none;
	padding: 12px 24px;
	font-size: 1rem;
	font-weight: bold;
	border-radius: var(--std-border-radius);
	cursor: pointer;
	transition: all 0.2s;
}

.add_post_btn:hover
{
	background: #ff7700;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

/* Filter Controls */
.filter_controls
{
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
	padding: 20px;
	background: var(--element-bg-primary);
	border-radius: var(--std-border-radius);
	box-shadow: var(--primary-shadow);
	flex-wrap: wrap;
}

.filter_group
{
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 200px;
}

.filter_group label
{
	color: #ccc;
	font-weight: bold;
	font-size: 0.9rem;
}

.filter_select,
.search_input
{
	background: #0a0a0a;
	border: 1px solid #333;
	color: white;
	padding: 10px;
	border-radius: var(--std-border-radius);
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s;
}

.filter_select:focus,
.search_input:focus
{
	outline: none;
	border-color: var(--primary-orange);
}

/* Posts Table */
.posts_loader
{
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 60px 0;
}

.posts_table_wrapper
{
	background: var(--element-bg-primary);
	border-radius: var(--std-border-radius);
	box-shadow: var(--primary-shadow);
	overflow-x: auto;
}

.posts_table
{
	width: 100%;
	border-collapse: collapse;
}

.posts_table thead
{
	background: #1a1a1a;
}

.posts_table th
{
	padding: 15px;
	text-align: left;
	color: var(--primary-orange);
	font-weight: bold;
	font-size: 0.9rem;
	text-transform: uppercase;
	border-bottom: 2px solid #333;
}

.posts_table td
{
	padding: 15px;
	border-bottom: 1px solid #333;
	color: #ddd;
}

.posts_table tbody tr:hover
{
	background: #1a1a1a;
}

.post_draft_row
{
	opacity: 0.6;
}

.post_link_title
{
	color: var(--primary-orange);
	text-decoration: none;
	font-weight: bold;
	transition: color 0.2s;
}

.post_link_title:hover
{
	color: #ff7700;
	text-decoration: underline;
}

.draft_badge
{
	display: inline-block;
	background: #ffaa00;
	color: #000;
	font-size: 0.7rem;
	font-weight: bold;
	padding: 3px 8px;
	border-radius: 4px;
	margin-left: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.status_published
{
	color: #4caf50;
	font-weight: bold;
}

.status_draft
{
	color: #ffaa00;
	font-weight: bold;
}

.actions_cell
{
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.action_btn
{
	padding: 6px 12px;
	border: none;
	border-radius: var(--std-border-radius);
	font-size: 0.85rem;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	display: inline-block;
}

.view_btn
{
	background: #333;
	color: white;
}

.view_btn:hover
{
	background: #444;
}

.publish_btn
{
	background: #4caf50;
	color: white;
}

.publish_btn:hover
{
	background: #45a049;
}

.unpublish_btn
{
	background: #ff9800;
	color: white;
}

.unpublish_btn:hover
{
	background: #f57c00;
}

.delete_btn
{
	background: #f44336;
	color: white;
}

.delete_btn:hover
{
	background: #da190b;
}

.no_posts
{
	text-align: center;
	padding: 60px 20px;
	color: #888;
	font-size: 1.2rem;
	background: var(--element-bg-primary);
	border-radius: var(--std-border-radius);
	box-shadow: var(--primary-shadow);
}

/* Modal Styles */
.modal_overlay
{
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(4px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	padding: 20px;
}

.modal_content
{
	background: #1a1a1a;
	border: 2px solid var(--primary-orange);
	border-radius: var(--std-border-radius);
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 30px;
	position: relative;
}

.modal_header
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
}

.modal_header h2
{
	color: var(--primary-orange);
	margin: 0;
	font-size: 1.8rem;
}

.modal_close
{
	background: none;
	border: none;
	color: #888;
	font-size: 2rem;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.modal_close:hover
{
	color: white;
}

.post_form
{
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.form_group
{
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form_group label
{
	color: #ccc;
	font-weight: bold;
	font-size: 0.95rem;
}

.form_group input,
.form_group textarea
{
	background: #0a0a0a;
	border: 1px solid #333;
	color: white;
	padding: 12px;
	border-radius: var(--std-border-radius);
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s;
}

.form_group input:focus,
.form_group textarea:focus
{
	outline: none;
	border-color: var(--primary-orange);
}

.form_group input.readonly_input
{
	background: #0f0f0f;
	border-color: #444;
	color: #aaa;
	cursor: not-allowed;
}

.form_group input.readonly_input:focus
{
	border-color: #444;
}

.form_group textarea
{
	resize: vertical;
	min-height: 200px;
}

.form_group small
{
	color: #888;
	font-size: 0.85rem;
	margin-top: -4px;
}

.checkbox_label
{
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: normal;
}

.checkbox_label input[type="checkbox"]
{
	width: auto;
	margin: 0;
	cursor: pointer;
	background: #1a1a1a;
	border: 1px solid #333;
	padding: 0;
	width: 18px;
	height: 18px;
}

.checkbox_label input[type="checkbox"]:checked
{
	background: var(--primary-orange);
	border-color: var(--primary-orange);
}

.checkbox_label span
{
	color: #ccc;
	font-size: 0.95rem;
}

.form_actions
{
	display: flex;
	gap: 15px;
	justify-content: flex-end;
	margin-top: 10px;
}

.btn_cancel,
.btn_submit
{
	padding: 12px 24px;
	border: none;
	border-radius: var(--std-border-radius);
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s;
}

.btn_cancel
{
	background: #333;
	color: white;
}

.btn_cancel:hover
{
	background: #444;
}

.btn_submit
{
	background: var(--primary-orange);
	color: white;
}

.btn_submit:hover:not(:disabled)
{
	background: #ff7700;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

.btn_submit:disabled
{
	opacity: 0.6;
	cursor: not-allowed;
}

.error_msg
{
	background: #1a1a1a;
	border: 2px solid #ff3333;
	border-radius: var(--std-border-radius);
	padding: 40px;
	text-align: center;
	color: white;
	margin: 40px;
}

.error_msg h1
{
	color: #ff3333;
	margin-bottom: 10px;
}

@media (max-width: 768px)
{
	.posts_management_wrapper
	{
		padding: 20px;
	}

	.page_header
	{
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.filter_controls
	{
		flex-direction: column;
	}

	.posts_table_wrapper
	{
		overflow-x: scroll;
	}

	.posts_table
	{
		min-width: 800px;
	}

	.actions_cell
	{
		flex-direction: column;
	}

	.action_btn
	{
		width: 100%;
	}
}
