/*--------------------------------------------------------------
 Topcoat Academy — header & footer (handoff chrome)
--------------------------------------------------------------*/

/* Global display font for Academy chrome */
body.topcoat-academy .tc-brand__mark,
body.topcoat-academy .tc-footer__brand {
	font-family: var(--tc-font-display) !important;
}

body.topcoat-academy,
body.topcoat-academy button,
body.topcoat-academy input,
body.topcoat-academy select,
body.topcoat-academy textarea {
	font-family: var(--tc-font-body);
}

/* Header sits flush; no BuddyBoss side padding on chrome either */
body.topcoat-academy #masthead.tc-site-header,
body.topcoat-academy .site-header--topcoat {
	background: var(--tc-header) !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	position: relative;
	z-index: 100;
	margin: 0 !important;
}

/* Course page: transparent header over ambient stage */
body.topcoat-course #masthead.tc-site-header,
body.topcoat-course .site-header--topcoat {
	background: transparent !important;
	position: relative;
	z-index: 100;
}

body.topcoat-course .tc-header {
	background: transparent;
}

body.topcoat-academy.bb-buddypanel #masthead.tc-site-header,
body.topcoat-academy.bb-buddypanel .site-header--topcoat,
body.topcoat-academy.bb-buddypanel .site-content,
body.topcoat-academy.bb-buddypanel .bb-footer {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Hide BuddyBoss side panel chrome — handoff is a clean top bar */
body.topcoat-academy .buddypanel,
body.topcoat-academy .bb-toggle-panel,
body.topcoat-academy .bb-mobile-panel-wrapper,
body.topcoat-academy #bb-mobile-panel-overlay {
	display: none !important;
}

body.topcoat-academy.bb-buddypanel,
body.topcoat-academy.buddypanel-open {
	margin-left: 0 !important;
	padding-left: 0 !important;
}

body.topcoat-academy #page,
body.topcoat-academy .site {
	margin-left: 0 !important;
}

.tc-header {
	background: var(--tc-header);
	color: var(--tc-offwhite);
}

.tc-header__inner {
	max-width: var(--tc-max);
	margin: 0 auto;
	padding: 0 28px;
	height: 64px;
	display: flex;
	align-items: center;
	gap: 30px;
}

.tc-brand {
	display: flex;
	align-items: baseline;
	gap: 8px;
	line-height: 1;
	text-decoration: none;
	flex: none;
}

.tc-brand:hover {
	text-decoration: none;
}

.tc-brand__mark {
	font-family: var(--tc-font-display);
	font-weight: 700;
	font-size: 28px;
	letter-spacing: 3px;
	color: var(--tc-orange);
	text-shadow: 0 1px 8px rgba(242, 106, 27, 0.35);
}

.tc-brand__sub {
	font-size: 9px;
	letter-spacing: 5px;
	color: var(--tc-muted);
	font-weight: 600;
}

.tc-nav {
	display: flex;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	align-items: center;
	flex-wrap: wrap;
}

.tc-nav__link {
	color: #b9bdc1 !important;
	padding: 7px 12px;
	border-radius: 8px;
	text-decoration: none !important;
	font-weight: 500;
	line-height: 1.2;
	transition: background 0.15s ease, color 0.15s ease;
}

.tc-nav__link:hover {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.1);
}

.tc-nav__link.is-active {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.12);
	font-weight: 600;
}

.tc-header__aside {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 16px;
	flex: none;
}

.tc-header__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #b9bdc1;
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.15s ease, color 0.15s ease;
}

.tc-header__search:hover,
.tc-header__search[aria-expanded="true"] {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.tc-header__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #b9bdc1 !important;
	text-decoration: none !important;
	border-radius: 8px;
	transition: background 0.15s ease, color 0.15s ease;
}

.tc-header__cart:hover,
.tc-header__cart:focus {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.1);
}

.tc-header__cart-count {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--tc-orange);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.tc-header__cart-count[hidden] {
	display: none !important;
}

.tc-header__avatar {
	position: relative;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #33383d;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 12px;
	border: 2px solid var(--tc-orange);
	overflow: hidden;
	text-decoration: none !important;
	color: var(--tc-offwhite) !important;
	flex: none;
}

.tc-header__menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	padding: 8px;
	border: 0;
	background: transparent;
	cursor: pointer;
	margin-left: auto;
}

.tc-header__menu-toggle span:not(.screen-reader-text) {
	display: block;
	height: 2px;
	width: 100%;
	background: #b9bdc1;
	border-radius: 1px;
}

.tc-header__search-panel {
	border-top: 1px solid var(--tc-border);
	background: var(--tc-header);
	padding: 14px 28px 18px;
}

.tc-header__search-panel[hidden] {
	display: none !important;
}

.tc-header__search-form {
	max-width: var(--tc-max);
	margin: 0 auto;
	display: flex;
	gap: 10px;
}

.tc-header__search-form input[type="search"] {
	flex: 1;
	background: var(--tc-surface);
	border: 1px solid var(--tc-border-strong);
	border-radius: var(--tc-radius);
	color: var(--tc-cream);
	padding: 11px 14px;
	font-family: var(--tc-font-body);
	font-size: 14px;
}

.tc-header__search-form input[type="search"]:focus {
	outline: 1px solid var(--tc-orange);
	border-color: var(--tc-orange);
}

/* Shared button (header search submit) when course.css not loaded */
.tc-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--tc-font-body);
	font-weight: 700;
	border-radius: var(--tc-radius);
	cursor: pointer;
	text-decoration: none;
	border: none;
	line-height: 1.2;
}

.tc-btn--primary {
	font-size: 14px;
	padding: 11px 18px;
	background: var(--tc-orange);
	color: #fff !important;
}

.tc-btn--primary:hover,
.tc-btn--primary:focus,
.tc-btn--primary:visited {
	background: var(--tc-orange-hover);
	color: #fff !important;
}

/* Footer */
.tc-footer {
	background: var(--tc-header);
	color: var(--tc-muted);
	margin-top: auto;
	border-top: 1px solid #1c1f22;
}

.tc-footer__inner {
	max-width: var(--tc-max);
	margin: 0 auto;
	padding: 18px 28px;
	display: flex;
	gap: 22px;
	font-size: 12px;
	flex-wrap: wrap;
	align-items: baseline;
}

.tc-footer__brand {
	font-family: var(--tc-font-display);
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 2px;
	color: var(--tc-orange) !important;
	text-decoration: none !important;
}

.tc-footer__copy {
	color: var(--tc-muted);
}

.tc-footer__link {
	color: var(--tc-muted) !important;
	text-decoration: none !important;
}

.tc-footer__link:hover {
	color: var(--tc-orange-soft) !important;
}

.tc-footer__disclaimer {
	margin-left: auto;
	color: var(--tc-dim);
}

/* Kill stock BuddyBoss footer remnants if a plugin re-adds them */
body.topcoat-academy .footer-widget-area,
body.topcoat-academy .footer-bottom.bb-footer {
	display: none !important;
}

@media (max-width: 900px) {
	.tc-header__menu-toggle {
		display: inline-flex;
	}

	.tc-header__inner {
		gap: 16px;
		flex-wrap: wrap;
		height: auto;
		min-height: 64px;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.tc-header__aside {
		order: 2;
		margin-left: 0;
	}

	.tc-nav {
		display: none;
		width: 100%;
		order: 4;
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		padding-bottom: 8px;
	}

	.tc-header.is-nav-open .tc-nav {
		display: flex;
	}

	.tc-footer__disclaimer {
		margin-left: 0;
		width: 100%;
	}
}
