/* Advanced Lexicon Stylesheet */

#advancedlexicon {
	width: 100%;
	display: flex;
	gap: 20px;
	justify-content: space-between;
	align-items: flex-start;
}

#advlex_navigation {
	width: 20%;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 7px;
}

.advlex_nav_head {
	min-height: 50px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: bold;
	text-transform: uppercase;
	background: #0066a2;
	color: #ffffff;
	border-top-left-radius: 6px;
	border-top-right-radius: 6px;
}

.advlex_category_wrapper {
	border-bottom: 1px solid #ddd;
}

.advlex_nav_category_header {
	min-height: 35px;
	padding: 8px 15px;
	background: #0066a2;
	color: #ffffff;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background 0.2s;
}

.advlex_nav_category_header:hover {
	background: #004d7a;
}

.advlex_category_title {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-grow: 1;
}

.advlex_nav_category_header a {
	color: #ffffff;
	text-decoration: none;
}

.advlex_category_icons {
	display: flex;
	gap: 8px;
	align-items: center;
}

.advlex_category_icons a {
	color: #ffffff;
	text-decoration: none;
	opacity: 0.8;
	transition: opacity 0.2s;
}

.advlex_category_icons a:hover {
	opacity: 1;
}

.advlex_accordion_icon {
	display: inline-block;
	transition: transform 0.2s;
	font-size: 12px;
	width: 15px;
}

.advlex_category_wrapper.collapsed .advlex_accordion_icon {
	transform: rotate(0deg);
}

.advlex_category_wrapper:not(.collapsed) .advlex_accordion_icon {
	transform: rotate(90deg);
}

.advlex_nav_category_entries {
	background: #f9f9f9;
	min-height: 40px; /* Allow drop into empty categories */
}

.advlex_nav_entry {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 25px;
	padding: 8px 15px 8px 30px;
	border-bottom: 1px solid #e5e5e5;
	background: #f5f5f5;
	transition: background 0.2s;
}

.advlex_nav_entry:hover {
	background: #ececec;
}

.advlex_nav_entry a {
	color: #333;
	text-decoration: none;
}

.advlex_nav_subentry {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 25px;
	padding: 8px 15px 8px 50px;
	border-bottom: 1px solid #e5e5e5;
	background: #fafafa;
	transition: background 0.2s;
}

.advlex_nav_subentry:hover {
	background: #f0f0f0;
}

.advlex_nav_subentry a {
	color: #555;
	text-decoration: none;
	font-size: 13px;
}

.advlex_entry_icons {
	display: flex;
	gap: 8px;
	align-items: center;
}

.advlex_entry_icons a {
	text-decoration: none;
	font-size: 16px;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.advlex_entry_icons a:hover {
	opacity: 1;
}

.advlex-drop-hover {
	background: #e0f0ff !important;
	border: 2px dashed #0066a2 !important;
}

.advlex-drop-zone {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
}

#advlex_content {
	width: 78%;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 7px;
	padding: 20px;
}

.advlex_content_header h1 {
	margin: 0 0 10px 0;
	font-size: 24px;
}

.advlex_content_text {
	margin-top: 20px;
	line-height: 1.6;
}

/* ModCP Styles */
.advlex_modcp_entry {
	background: #f5f5f5;
	border: 1px solid #ddd;
	padding: 15px;
	margin-bottom: 10px;
	border-radius: 5px;
}

.advlex_modcp_entry_title {
	font-weight: bold;
	font-size: 16px;
	margin-bottom: 5px;
}

.advlex_modcp_entry_actions {
	margin-top: 10px;
}

.advlex_modcp_entry_actions a {
	margin-right: 15px;
	padding: 5px 10px;
	background: #0066a2;
	color: #fff;
	text-decoration: none;
	border-radius: 3px;
}

/* Entry Items */
.advlex_entry_item {
	padding: 10px;
	border-bottom: 1px solid #e5e5e5;
	transition: background 0.2s;
}

.advlex_entry_item:hover {
	background: #f9f9f9;
}

.advlex_entry_item a {
	font-size: 14px;
	text-decoration: none;
}

/* Management Links in Navigation */
.advlex_nav_manage {
	padding: 15px;
	background: #fafafa;
	border-top: 2px solid #0066a2;
	font-size: 12px;
}

.advlex_nav_manage strong {
	display: block;
	margin-bottom: 8px;
	color: #0066a2;
}

.advlex_nav_manage a {
	display: block;
	margin-bottom: 5px;
	color: #333;
	text-decoration: none;
}

.advlex_nav_manage a:hover {
	color: #0066a2;
}

/* Category Description */
.advlex_cat_desc {
	margin: 10px 0;
	padding: 15px;
	background: #f9f9f9;
	border-left: 3px solid #0066a2;
	line-height: 1.6;
}

/* Admin Buttons */
.advlex_category_admin,
.advlex_entry_buttons {
	margin: 15px 0;
}

.advlex_category_admin a,
.advlex_entry_buttons a {
	display: inline-block;
	margin-right: 10px;
	padding: 8px 15px;
	background: #0066a2;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
}

.advlex_category_admin a:hover,
.advlex_entry_buttons a:hover {
	background: #004d7a;
}

/* Add Entry Button */
.advlex_add_button {
	margin: 15px 0;
}

.advlex_add_button a {
	display: inline-block;
	padding: 10px 20px;
	background: #28a745;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: bold;
}

.advlex_add_button a:hover {
	background: #218838;
}

/* Sub-articles */
.advlex_subarticles {
	margin-top: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 5px;
}

.advlex_subarticles h3 {
	margin: 0 0 15px 0;
	color: #0066a2;
	font-size: 18px;
}

.advlex_subarticles ul {
	margin: 0;
	padding-left: 20px;
}

.advlex_subarticles li {
	margin-bottom: 8px;
}

/* No Entries Message */
.advlex_no_entries {
	padding: 30px;
	text-align: center;
	color: #666;
	font-style: italic;
}

/* Home/Welcome Page */
.advlex_home {
	padding: 20px;
}

.advlex_home h1 {
	margin-bottom: 15px;
	color: #0066a2;
}

.advlex_home p {
	line-height: 1.6;
	color: #666;
}

/* Pending Approval Alert */
.advlex_pending_alert {
	padding: 15px;
	margin-bottom: 20px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
}

/* Search Box */
.advlex_search {
	padding: 15px;
	margin-bottom: 20px;
	background: #f9f9f9;
	border-radius: 5px;
}

.advlex_search input[type="text"] {
	width: 70%;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 3px;
}

.advlex_search input[type="submit"] {
	padding: 8px 15px;
	margin-left: 10px;
}

/* List Display */
.advlex_list_content table {
	width: 100%;
	margin-top: 20px;
}

.advlex_list_content td,
.advlex_list_content th {
	padding: 10px;
}

/* Drag and Drop Sortable */
.sortable-placeholder {
	border: 2px dashed #ccc;
	background: #f9f9f9;
}

.ui-sortable-helper {
	opacity: 0.8;
	cursor: move;
}

/* Responsive Design */
@media (max-width: 768px) {
	#advancedlexicon {
		flex-direction: column;
	}

	#advlex_navigation,
	#advlex_content {
		width: 100%;
	}
}