/* Path: Frontend/src/components/dashboard/shared/dashboard-sidebar.module.scss */

.sidebar {
	display: grid;
	gap: 1rem;
	padding: 1rem;
	background: var(--surface-panel);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-3xl);
	box-shadow: var(--shadow-soft);
	min-width: 0;
	overflow-x: clip;

	@include respond(mobile) {
		padding: 1.15rem;
	}

	@include respond(tablet) {
		gap: 1.25rem;
		padding: 1.3rem;
		position: sticky;
		top: 1rem;
	}
}

.brand {
	display: grid;
	gap: 0.45rem;
	min-width: 0;
}

.brandLogo {
	width: min(100%, 8.5rem);
	height: auto;
	display: block;
}

.brandMeta {
	color: var(--text-muted);
	font-size: 0.9rem;
}

.navigation {
	display: grid;
	gap: 0.35rem;

	@include respond-max(mobile-narrow) {
		grid-template-columns: minmax(0, 1fr);
	}

	@media (min-width: #{$mobile-narrow + 1px}) and (max-width: #{$tablet - 1px}) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.link {
	display: flex;
	align-items: flex-start;
	gap: 0.8rem;
	padding: 0.78rem 0.85rem;
	border-radius: var(--radius-md);
	color: var(--text-muted);
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;

	&:hover {
		text-decoration: none;
		background: var(--surface-soft);
		color: var(--text);
		transform: translateX(2px);
	}
}

@include respond-max(mobile-narrow) {
	.link {
		width: 100%;
		align-items: flex-start;
		gap: 0.6rem;
		padding: 0.7rem 0.82rem;
		border: 1px solid var(--border-soft);
		background: var(--surface-panel-strong);
	}
}

.linkCopy {
	display: grid;
	gap: 0.08rem;
	min-width: 0;

	strong {
		color: var(--text);
		font-size: 0.94rem;
		font-weight: 500;
		line-height: 1.15;
	}

	small {
		color: var(--text-muted);
		font-size: 0.8rem;
		line-height: 1.2;
	}
}

@include respond-max(mobile-narrow) {
	.linkCopy {
		gap: 0.08rem;

		strong {
			font-size: 0.9rem;
		}

		small {
			display: block;
		}
	}
}

.active {
	background: var(--surface-info);
	color: var(--info);

	.iconSlot {
		background: var(--blue-100);
		border-color: color-mix(in srgb, var(--info) 18%, var(--border-divider));
		color: var(--info);
	}

	.linkCopy {
		strong,
		small {
			color: var(--info);
		}
	}
}

.iconSlot {
	width: 1.9rem;
	height: 1.9rem;
	display: grid;
	place-items: center;
	border-radius: 0.65rem;
	background: var(--surface-panel-strong);
	border: 1px solid var(--border-divider);
	font-size: 0.8rem;
	font-weight: 600;
	flex-shrink: 0;
}

.supportCard {
	display: grid;
	gap: 0.8rem;
	margin-top: 0.25rem;
	padding: 1rem;
	background: linear-gradient(180deg, var(--surface-panel-strong), var(--surface-soft));
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-xl);
	min-width: 0;
}

@include respond-max(mobile-narrow) {
	.supportCard {
		gap: 0.7rem;
		padding: 0.9rem;

		p {
			font-size: 0.86rem;
		}
	}
}

.avatarRow {
	display: flex;
	align-items: center;

	span {
		width: 2rem;
		height: 2rem;
		display: grid;
		place-items: center;
		border-radius: var(--radius-full);
		border: 2px solid var(--surface-panel);
		background: var(--surface-accent-soft);
		color: var(--primary);
		font-size: 0.85rem;
		font-weight: 600;

		&:not(:first-child) {
			margin-left: -0.4rem;
		}
	}
}

.supportCard h2 {
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.15;
}

.supportCard p {
	color: var(--text-muted);
	font-size: 0.92rem;
}

.supportButton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 0.8rem 1rem;
	border: none;
	border-radius: var(--radius-full);
	background: linear-gradient(135deg, var(--action-primary-start), var(--action-primary-end));
	color: var(--action-primary-text);
	box-shadow: var(--action-primary-shadow);
	cursor: pointer;
	font-weight: 600;
	white-space: normal;
	text-align: center;
	line-height: 1.2;

	&:hover {
		text-decoration: none;
	}
}
