/* "Specific Courses" dropdown: Generic Courses pop-out and Tailormade Courses (see scripts/courses-menu.js) */

/* keep the nav (and this dropdown) above the floating "Ask Gary" button (z-index 100) */
header nav {
	z-index: 110;
}

/* "Specific Courses" label with its dropdown arrow */
.courses-menu-toggle {
	cursor: pointer;
	user-select: none;
}
.courses-menu-caret {
	font-size: 11px;
	margin-left: 6px;
	vertical-align: middle;
	transition: transform 0.2s ease;
}
.courses-menu-toggle.open .courses-menu-caret {
	transform: rotate(180deg);
}

#nav-menu-hidden {
	min-width: 230px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	border-radius: 0 0 10px 10px;
	z-index: 50;
}

header nav .holder #menuCollapse ul li.nav-item #nav-menu-hidden a.courses-menu-generic {
	gap: 8px;
}
.courses-menu-generic .fa-chevron-left {
	font-size: 11px;
	color: #ff5387;
	transition: transform 0.2s ease;
}
.courses-menu-generic[aria-expanded="true"] {
	color: #000;
	font-weight: 500;
}

header nav .holder #menuCollapse ul li.nav-item #nav-menu-hidden a.courses-menu-tailormade {
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
}
.courses-menu-note {
	display: block;
	font-size: 12px;
	line-height: 1.3;
	color: #6b7280;
	margin-top: 2px;
	white-space: normal;
}

/* the pop-out opens to the left of the dropdown */
.soft-skills-panel {
	display: none;
	position: absolute;
	top: 0;
	right: 100%;
	width: 380px;
	max-width: calc(100vw - 280px);
	max-height: min(75vh, 600px);
	overflow-y: auto;
	background: white;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	padding: 20px 20px 12px;
	/* no gap to the dropdown, so hovering across into the panel keeps it open */
	margin-right: 0;
	text-align: left;
	cursor: default;
}
.soft-skills-panel.open {
	display: block;
}
.soft-skills-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #1f2933;
}
.soft-skills-intro {
	font-size: 14px;
	color: #6b7280;
	margin-bottom: 12px;
}
.soft-skills-group {
	border-top: 1px solid #eef0f2;
}
.soft-skills-category {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 11px 4px;
	background: transparent;
	border: none;
	text-align: left;
	/* same type as the menu links (e.g. "POPI Act") */
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	color: #000;
	cursor: pointer;
}
.soft-skills-category-name {
	flex: 1;
}
.soft-skills-count {
	min-width: 24px;
	padding: 1px 7px;
	border-radius: 10px;
	/* orange from the hero section gradient (images/Hero-blob.svg) */
	background: rgba(255, 146, 74, 0.14);
	color: #ff924a;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0;
	text-align: center;
}
.soft-skills-chevron {
	font-size: 11px;
	color: #9aa5b1;
	transition: transform 0.2s ease;
}
.soft-skills-group.open .soft-skills-category {
	color: #ff5387;
}
.soft-skills-group.open .soft-skills-chevron {
	transform: rotate(180deg);
	color: #ff5387;
}
/* undo the nav's flex layout for these lists; hidden until the category is opened */
header nav .holder #menuCollapse .soft-skills-panel ul.soft-skills-list {
	display: none;
	padding: 0 4px 12px;
	margin: 0;
	list-style: none;
}
header nav .holder #menuCollapse .soft-skills-panel .soft-skills-group.open ul.soft-skills-list {
	display: block;
}
.soft-skills-list li {
	position: relative;
	font-size: 13px;
	line-height: 1.4;
	color: #374151;
	padding: 4px 0 4px 14px;
}
.soft-skills-list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 11px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #ff5387;
}
.soft-skills-footer {
	position: sticky;
	bottom: 0;
	background: white;
	padding: 12px 0 4px;
	border-top: 1px solid #eef0f2;
	text-align: center;
}
.soft-skills-footer .default-btn {
	font-size: 15px;
	padding: 8px 20px;
}

/* collapsed (hamburger) menu: the pop-out opens inline under the dropdown instead */
@media screen and (max-width: 996px) {
	.soft-skills-panel {
		position: static;
		width: auto;
		max-width: none;
		max-height: 50vh;
		margin: 0 0 8px;
		box-shadow: none;
		border: 1px solid #eef0f2;
		padding: 16px 16px 8px;
	}
	.courses-menu-generic .fa-chevron-left {
		transform: rotate(-90deg);
	}
	.courses-menu-generic[aria-expanded="true"] .fa-chevron-left {
		transform: rotate(90deg);
	}
}

/* hamburger menu: "Specific Courses" row with its arrow on the right, options indented below */
@media screen and (max-width: 996px) {
	header nav .holder #menuCollapse ul li.nav-item.courses-menu-toggle {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		align-content: flex-start;
		justify-content: space-between;
		/* same height as the other rows (56px) whether open or closed */
		padding: 15px 8px;
	}
	.courses-menu-caret {
		font-size: 13px;
		color: #6b7280;
	}
	#nav-menu-hidden {
		position: static;
		flex-basis: 100%;
		width: 100%;
		min-width: 0;
		box-shadow: none;
		border-radius: 0;
		margin-top: 10px;
		padding-bottom: 0;
	}
	header nav .holder #menuCollapse ul li.nav-item #nav-menu-hidden a {
		justify-content: flex-start;
		min-height: 46px;
		padding: 0 0 0 16px;
		font-size: 16px;
		font-weight: 400;
		color: #4b5160;
	}
	header nav .holder #menuCollapse ul li.nav-item #nav-menu-hidden a.courses-menu-tailormade {
		align-items: flex-start;
		text-align: left;
		padding-top: 6px;
		padding-bottom: 6px;
	}
	.soft-skills-panel {
		margin-left: 16px;
	}
	/* keep the course names regular weight inside the bolder menu rows */
	header nav .holder #menuCollapse .soft-skills-panel {
		font-size: 16px;
		font-weight: 400;
	}
	.soft-skills-footer .default-btn {
		font-size: 14px;
		padding: 8px 16px;
		/* the site caps buttons at 220px on phones, which wraps this label */
		max-width: 100%;
	}
}
