@import '../../../client/css/defaults';

.layout--wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.layout--content {
	flex-grow: 1;
}

.layout--footer {
	flex-grow: 0;
}

.repository--item-list--collection {
	&:last-child {
		border-top: 0;
	}
}

.repository--item-list--collection--item-wrapper {
	// add some margin so that the
	// icons line up visually with the left
	// the padding/bg around them makes them look off otherwise
	margin-left: -0.5em;
	margin-right: -0.5em;
}

.repository--item-list--row {
	// overflow: auto;
	font-size: 0.8em;
	font-family: $font-text;
	width: 100%;

	.avatar,
	> .repository--module-icon {
		float: left;
	}

	> a {
		text-decoration: none;
		color: black;
		font-weight: 600;
	}

	> em {
		font-style: normal;
		font-weight: 700;
	}

	@include with-bottom-border();
}

.repository--item-list--collection--item--multi-wrapper {
	display: flex;
	flex-wrap: wrap;
	box-sizing: border-box;
	justify-content: flex-start;

	@include with-bottom-border();

	@include mq($from: zero, $until: mobileL) {
		justify-content: space-around;
	}

	&.fade {
		animation: fade-out 1s;
		animation-fill-mode: forwards;
	}

	@keyframes fade-out {
		from {
			opacity: 1;
		}

		to {
			opacity: 0.5;
		}
	}
}

.repository--main-content {
	box-sizing: border-box;
	max-width: $dimension-width;
	margin: 0 auto;
	padding-left: $dimension-padding;
	padding-right: $dimension-padding;

	code {
		background-color: #eeeeee;
		padding: 2px;
	}

	img {
		max-width: 100%;
	}
}

.repository--main-content--title {
	font-family: $font-default;
	text-align: left;
	font-size: 1.2em;
	display: flex;
	white-space: nowrap;
	margin-bottom: 0.8em;
	width: 100%;
	position: relative;
	justify-content: space-between;

	> span {
		background: $color-bg;
		position: relative;
		padding-right: 1em;
		padding-top: 0.05em;
	}

	@include mq($from: zero, $until: mobileL) {
		flex-direction: column;
		align-items: center;

		> span {
			padding-right: 0;
		}
	}

	&::before {
		border-top: 1px solid $border-color;
		content: '';
		display: table-cell;
		position: absolute;
		top: 0.7em;
		left: 0;
		right: 7.5em;

		@include mq($from: zero, $until: mobileL) {
			display: none;
		}
	}

	&.stretch-width::before {
		right: 0;
	}

	.repository--main-content--sort {
		display: flex;
		align-items: center;

		@include mq($from: zero, $until: mobileL) {
			margin-top: 0.8em;
		}

		> span {
			margin-right: 0.7em;
			font-size: 0.7em;
		}

		select {
			@include select-input();

			position: relative;
			align-self: center;
			font-size: 0.5em;
		}
	}
}
