/* --- Pathway Library Page --- */

/* Custom Select & Label Font Updates - High Specificity */
#pathway-library-container .filters-container label,
.custom-dropdown,
.custom-dropdown .dropdown-premium-btn,
.custom-dropdown .dropdown-premium-menu .dropdown-item-label,
.custom-dropdown .btn-text,
.custom-dropdown span {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
}

.custom-dropdown .btn-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
	line-height: normal;
	margin-right: 8px;
	/* Gap for icon */
}

.custom-dropdown .dropdown-premium-btn {
	font-weight: 500;
	margin: 0;
	/* Fix alignment issue if button has default margins */
}

/* Base container for the whole page */

/* Custom Dropdown Overrides - Use high specificity instead of !important */
#pathway-library-container .filters-container .custom-dropdown {
	position: relative;
	display: block;
	width: fit-content;
	min-width: 200px;
	max-width: 100%;
	z-index: 1;
}

/* Elevate the active dropdown above siblings */
#pathway-library-container .filters-container .custom-dropdown:focus-within {
	z-index: 100;
}

/* Force hide the native select but allow JS access */
#pathway-library-container .filters-container select {
	display: none;
}

/* Premium Button Styling */
#pathway-library-container .filters-container .dropdown-premium-btn {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	min-height: 38px;
	height: auto;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 4px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.2s;
	text-align: left;
	/* Ensure text is left-aligned */
}

#pathway-library-container .filters-container .dropdown-premium-btn:hover {
	border-color: #772432;
}

/* Dropdown Menu - Ensure it overlays correctly */
#pathway-library-container .filters-container .dropdown-premium-menu {
	display: none;
	/* Hide by default, JS will show it */
	position: absolute;
	top: 100%;
	left: 0;
	right: auto;
	z-index: 1000;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
	margin: 0;
	max-height: 400px;
	overflow-y: auto;
	min-width: 100%;
	box-sizing: border-box;
}

/* Individual Item Styling */
#pathway-library-container .filters-container .dropdown-item-label {
	display: block;
	padding: 10px 15px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: background-color 0.1s;
	user-select: none;
	pointer-events: auto;
	font-weight: 400;
	/* Ensure normal weight */
	/* Ensure it's clickable */
}

#pathway-library-container .filters-container .dropdown-item-label:hover {
	background-color: #f5f5f5;
}

#pathway-library-container .filters-container .dropdown-item-label * {
	pointer-events: none;
	/* Let clicks pass to the label parent */
}

.filters-container label {
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
	color: #333;
}

.filters-container .form-group {
	flex: 1;
}


.project-details-container {
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.project-header .button-group {
	justify-content: flex-end;
}

/* Fix for aligned, consistent size icons */
.project-header .icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	font-size: 16px;
	/* Ensure uniform icon size */
	border-radius: 4px;
	/* Slight rounding */
	color: #888;
	background: transparent;
	/* Explicitly clear background */
	text-decoration: none;
	/* For the <a> tag */
	vertical-align: middle;
}

/* Safety rule to ensure inline hidden style works despite display: inline-flex */
.project-header .icon-btn[style*="display: none"] {
	display: none !important;
}

.project-header .icon-btn:hover {
	color: #333;
	background-color: #f0f0f0;
	/* Subtle hover state */
}

.project-header .icon-btn i {
	font-size: inherit;
	/* Inherit 16px from parent */
}

.project-section h3 {
	border-bottom: 2px solid #772432;
	padding-bottom: 5px;
	margin-bottom: 10px;
	color: #772432;
}

.markdown-content {
	font-family: 'Lora', serif;
	line-height: 1.6;
}

.markdown-content p {
	margin-top: 0;
	margin-bottom: 0.5em;
	/* Reduced margin */
}

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

.edit-textarea {
	width: 100%;
	min-height: 120px;
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 8px;
	font-family: sans-serif;
	font-size: 14px;
	resize: vertical;
}

/* --- Pathway Color Theme Boxes --- */
.path-codes {
	display: flex;
	justify-content: space-around;
	gap: 10px;
	margin-bottom: 20px;
}

.path-code-box {
	font-weight: bold;
	font-family: 'Montserrat', sans-serif;
	color: #fff;
	padding: 5px 15px;
	border-radius: 8px;
	text-align: center;
	flex: 1;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
}

.path-code-box i {
	margin-right: 4px;
}

.path-dl {
	background-color: #EF4444;
}

/* Red */

.path-eh {
	background-color: #F59E0B;
}

/* Orange */

.path-ms {
	background-color: #10B981;
}

/* Green */

.path-pi {
	background-color: #3B82F6;
}

/* Blue */

.path-pm {
	background-color: #8B5CF6;
}

/* Purple */

.path-vc {
	background-color: #EC4899;
}

/* --- Custom Dropdown Header Badges --- */
.dropdown-premium-menu .dropdown-header-premium {
	background-color: #e2e8f0;
	/* Light gray-blue */
	color: #475569;
	/* Slate 600 */
	font-weight: 700;
	text-transform: uppercase;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 12px;
	/* Pill shape */
	margin: 8px 12px 4px;
	width: fit-content;
	line-height: normal;
}

/* Pink */

/* Soft Purple */