/* **************************************************
	VERSION: 1.0.0
	DESCRIPTION: Starlight Engine Spine Sheet
***************************************************/

/* 
**************************************************
	IMPORTANT: Spine Tokens
**************************************************
*/

/* ---------- Header Height ---------- */
:root {
	--header-height: 5rem;
	--header-padding-bottom: 0.5rem;
}

/* =================CANVAS TOKENS=================== */
/* ---------- Eclipse (Default) ---------- */
[dataTheme="eclipse"] {
	--spine-border: 0.1rem solid #C0C0C0;
}

/* ---------- Twilight ---------- */
[dataTheme="twilight"] {
	--spine-border: 0.1rem solid #D6D6D6;
}

/* ---------- Radiance ---------- */
[dataTheme="radiance"] {
	--spine-border: 0.1rem solid #4C4C4C;
}

/* 
**************************************************
	IMPORTANT: Spine
**************************************************
*/

/* ---------- Header ---------- */

header {
	padding: 0 1rem var(--header-padding-bottom) 1rem;
	height: var(--header-height);
	display: flex;
	flex-direction: column;
	background: var(--canvas-surface);
}

#moduleHomeLinkHeaderUpper {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}

#moduleHomeLinkHeaderUpperLeft {
	display: flex;
	flex-direction: row;
	align-items: center;
}

#moduleHomeLinkHeaderUpperRight {
	display: flex;
	flex-direction: row;
}

#moduleHomeLinkHeaderUpperRightContainer > button {
	margin-top: 0;
}

#moduleHomeLinkHeaderLower {
	padding: 1rem 0 0 0;
	display: none;
	flex-direction: row;
	justify-content: space-between;
}

#moduleHomeLinkUserContainer {
	display: flex;
	flex-direction: row;
	align-items: center;
}

#moduleHomeLinkUserContainer img {
	height: 72px;
	width: 72px;
}

#moduleHomeLinkUserActionsContainer {
	margin-top: -0.5rem;
}

#objectHomeLinkUsername {
	font-size: calc(var(--base-font-size) * 1.25);
	font-weight: bold;
	color: var(--canvas-surface-text);
}

#moduleHomeLinkUserActions {
	margin-top: -0.2rem;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.5rem;
	color: var(--canvas-surface-text-muted);
}

#moduleHomeLinkUserActions span {
	cursor: pointer;
}

#moduleHomeLinkNavigationBar {
}

nav > a {
	padding: 7px 7px 7px 15px;
	font-size: calc(var(--base-font-size) * 0.8);
	font-weight: bold;
	color: var(--canvas-surface-text);
	background: var(--canvas-main);
	border-radius: var(--radius-object);
	text-decoration: none;
	cursor: pointer;
}

nav > a[active] {
	pointer-events: none;
	cursor: not-allowed;
}

nav > a::before {
	content: "";
	position: relative;
	display: inline-block;
	left: -8px;
	transform: translateY(15%);
	width: 6px;
	height: 15px;
	background: var(--canvas-surface);
	border-radius: var(--radius-object);
}

nav > a[active]::before {
	content: "";
	position: relative;
	display: inline-block;
	left: -8px;
	transform: translateY(15%);
	width: 6px;
	height: 15px;
	background: #248BDD;
	border-radius: var(--radius-object);
}

nav > a:hover {
	background: var(--button-standard-fill);
	text-decoration: underline solid var(--canvas-surface-text) 1px;
}

nav > a:hover::before {
	content: "";
	position: relative;
	display: inline-block;
	left: -8px;
	transform: translateY(15%);
	width: 6px;
	height: 15px;
	background: rgba(36, 139, 221, 0.5);
	border-radius: var(--radius-object);
}

nav > a:active {
	background: var(--canvas-surface);
}

/* ---------- Header Sidebar Visibility ---------- */

#objectSidebarToggleButton {
	width: 32px;
	height: 32px;
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: transform 0.3s ease;
}

#objectSidebarToggleButton::before,
#objectSidebarToggleButton::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 2px;
	background-color: currentColor;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Top line */
#objectSidebarToggleButton::before {
	transform: translateY(-4px);
}

/* Bottom line */
#objectSidebarToggleButton::after {
	transform: translateY(4px);
}

/* When sidebar is open → show “X” */
body[open] #objectSidebarToggleButton::before {
	transform: rotate(-45deg);
}

body[open] #objectSidebarToggleButton::after {
	transform: rotate(45deg);
}

/* ---------- Header Sidebar Alignment ---------- */

#objectSidebarButton {
	height: 16px;
	width: 16px;
	padding: 16px;
	background-size: contain;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s;
}

@media (max-width: 767px) {
	#objectSidebarButton {
		display: none;
	}
}

#objectSidebarButton:hover {
	opacity: 1;
}

/* ---------- Header Settings Tab ---------- */

#objectSettingsButton {
	margin-top: 0;
	width: 100%;
	display: inline-flex;
	align-items: flex-end;
	gap: 0.25rem;
	transition: opacity 0.2s;
}

@media (max-width: 767px) {
	#objectSettingsButton {
		align-items: center;
	}
}

#objectSettingsButton:hover {
	opacity: 1;
}

#objectSettingsButton[active] {
	background-color: var(--button-subtle-fill-hover);
	border: var(--button-subtle-border);
	opacity: 1;
}

#objectAsideSettingsIcon {
	margin: 0 0.5rem;
	width: 20px;
	height: 20px;
	object-fit: contain;
}

[dataTheme="eclipse"] #objectAsideSettingsIcon,
[dataTheme="twilight"] #objectAsideSettingsIcon {
	content: url('../icons/iconSettingsDark.png');
}

[dataTheme="radiance"] #objectAsideSettingsIcon {
	content: url('../icons/iconSettingsLight.png');
}

#moduleBodyFramework[right] #objectSettingsButton {
	flex-direction: row-reverse;
}

/* ---------- HomeLink Icon ---------- */

#objectHomeLinkBranding {
	margin-top: 10px;
	padding: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	cursor: pointer;
	opacity: 0.5;
}

#objectHomeLinkBranding:hover {
	opacity: 1;
}

#objectHomeLinkBranding:active {
	opacity: 1;
}

#objectHomeLinkIntranetIcon {
	height: 32px;
	width: 32px;
	background-size: contain;
}

#objectHomeLinkTitle {
	padding: 0 0 5px 5px;
	color: var(--canvas-surface-text);
	font-size: calc(var(--base-font-size) * 1.25);
	font-weight: bold;
	font-variant: small-caps;
	text-decoration: none;
	border-radius: var(--radius-object);
}

#objectHomeLinkTitleSuperScript {
	font-size: calc(var(--base-font-size) * 0.8);
}

/* ---------- Body ---------- */

#moduleBodyFramework {
	height: calc(100vh - var(--header-height) - var(--header-padding-bottom));
	display: flex;
	flex-direction: row;
	align-items: flex-start;
}

#moduleBodyFramework[left] {
	flex-direction: row;
}

#moduleBodyFramework[right] {
	flex-direction: row-reverse;
}

/* ---------- Aside ---------- */

/* Desktop */

@media (min-width: 768px) {
	#moduleBodyFramework > aside {
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		flex: 0 0 400px;
		position: relative;
		overflow-y: auto;
		z-index: 10;
    }

	body[close] #moduleBodyFramework > aside {
		height: 0;
		flex: 0 0 0;
		opacity: 0;
		padding: 0;
		overflow: hidden;
		transition: flex 0.25s ease;
	}

	body[open] #moduleBodyFramework > aside {
		opacity: 1;
		transition: flex 0.25s ease, opacity 0.5s ease;
	}
}

/* Mobile */
@media (max-width: 767px) {
	#moduleBodyFramework > aside {
		top: 42px;
		bottom: 0;
		width: 100%;
		position: absolute;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		background: var(--canvas-surface);
		transform: translateX(-100%);
		transition: all 0.3s ease;
		z-index: 9;
	}

	body[open] #moduleBodyFramework > aside {
		left: 0;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		transform: translateX(0);
	}
}

#moduleSidebarContentContainer {
	height: 100%;
	padding: 0 0.5rem;
	overflow-y: auto;
}

#moduleSidebarSettingsContainer {
	padding: 0.25rem;
	position: relative;
	background-color: var(--canvas-main);
	border-top: 2px solid var(--canvas-surface-border);
	z-index: 1;
}

/* ---------- Main ---------- */

#moduleMainFooterContainer {
	width: 100%;
}

#moduleBodyFramework[right] main {
	border-left: none;
	border-right: 2px solid var(--canvas-surface-border);
	border-radius: var(--radius-surface-main-left);
}

#moduleBodyFramework[left] main {
	border-left: 2px solid var(--canvas-surface-border);
	border-right: none;
	border-radius: var(--radius-surface-main-right);
}

[datapagetype="streamshare"] main {
	border-radius: 0 !important;
}

main {
	height: calc(100vh - var(--header-height) - var(--header-padding-bottom) - 2px);
	background-color: var(--canvas-main);
	border: 2px solid var(--canvas-surface-border);
	border-bottom: none;
	border-radius: var(--radius-surface);
	overflow-y: auto;
}

.moduleMainContentContainer {
	padding: 0.5rem;
}

body[close] #moduleBodyFramework main {
	border-left: none;
	border-right: none;
	border-radius: 0;
}


/* Mobile */
@media (max-width: 767px) {
	main {
		height: calc(100vh - var(--header-height) - var(--header-padding-bottom) - 2px);
	}

	body[open] main {
		border-left: none;
		border-right: none;
		border-radius: 0;
	}
}

/* ---------- Footer ---------- */

footer {
	padding: 0.5rem 0.5rem 0 0.5rem;
	display: flex;
	flex-direction: column;
	color: var(--canvas-panel-text-muted);
    font-size: calc(var(--base-font-size) * 0.75);
	background: var(--canvas-surface);
	opacity: 0.5;
}