@use "../teydea-admin" as *;

/**
 * Content with a side card
 */
.tsc-side-card-layout {
	// The columns follow the room the layout has, not the window: the frame's admin menu and a
	// section menu beside the layout take part of the window.
	container-type: inline-size;

	&__columns {
		align-items: flex-start;
		display: flex;
		gap: $tsc-space-6;
	}

	&__content {
		flex: 1;
		min-width: 0;
	}

	@container (max-width: 999px) {
		&__columns {
			align-items: stretch;
			flex-direction: column;
		}
	}
}

/**
 * Side card
 */
.tsc-side-card {
	background: $tsc-surface;
	border: 1px solid $tsc-border;
	border-radius: $tsc-radius-lg;
	box-sizing: border-box;
	display: flex;
	flex: none;
	flex-direction: column;
	max-height: 100cqh;
	overflow: hidden;
	position: sticky;
	top: 0;
	width: $tsc-side-card-width;

	&__header {
		border-bottom: 1px solid $tsc-hairline;
		padding: $tsc-space-3 $tsc-space-4;
	}

	&__title {
		font-size: 14px;
		font-weight: 600;
		line-height: 20px;
		margin: 0;
	}

	&__description {
		color: $tsc-ink-muted;
		margin: 2px 0 0;
	}

	&__body {
		background: $tsc-surface-sunken;
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		padding: $tsc-space-4;
	}

	@container (max-width: 999px) {
		max-height: none;
		position: static;
		width: 100%;
	}
}
