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

.module-permissions-dialog {
	max-width: 26em;
	text-align: center;
	width: 80vw;
	padding-bottom: 1em;

	.top-bar {
		text-align: left;
		position: relative;
		border-bottom: 1px solid rgba(0, 0, 0, 0.1);
		box-sizing: border-box;
		height: 3em;

		.repository--module-icon--image {
			width: 1.5em;
			height: 1.75em;
			display: inline-block;
			vertical-align: middle;
			position: absolute;
			left: 0.75em;
			top: 50%;
			transform: translate(0, -50%);
		}

		.module-title {
			display: inline-block;
			font-size: 0.625em;
			font-weight: bold;
			color: black;
			margin: 0;
			max-width: calc(100% - 8.5em);
			vertical-align: middle;
			position: absolute;
			left: 4.5em;
			top: 50%;
			transform: translate(0, -50%);
			max-height: 1.2em;
			overflow: hidden;
			word-break: break-word;
		}

		.close-button {
			position: absolute;
			right: 0.5em;
			top: 50%;
			transform: translate(0, -50%);
		}
	}

	.wrapper {
		padding-left: 1.25em;
		padding-right: 1.25em;

		p {
			font-size: 0.8em;
			margin: 0;
		}
	}

	.title {
		font-weight: 700;
		font-size: 1.3em;
		margin-bottom: 0.2em;
	}

	.sub-title {
		font-size: 0.7em;
		margin-bottom: 0.5em;
		text-align: left;
	}

	.access-level-descriptions {
		margin-bottom: 1em;

		span {
			display: flex;
			flex-direction: row;

			label,
			p {
				font-size: 0.7em;
				display: block;
			}

			label {
				width: 3em;
				margin-right: 1.25em;
				text-align: left;
				font-weight: bold;
			}
		}
	}

	.access-list-wrapper {
		margin: 1em 0;
		background-color: $color-banner-bg;
		padding: 0;
	}

	.access-list {
		$dimensions-avatar: 1.8em;
		$dimensions-close-button: 1.2em;

		// text-align: left;
		height: 11.5em;
		overflow-y: auto;
		list-style: none;
		font-size: 0.9em;
		padding: 0;
		margin: 0;

		li {
			max-width: 95%;

			&:first-child {
				margin-top: 0.5em;
			}

			&:last-child {
				margin-bottom: 0.5em;
			}
		}
	}

	.access-level-dropdown {
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 5px;
		font-size: 0.8em;
		flex: 2;

		select {
			font-family: 'Libre Franklin', Arial, sans-serif;
			border-radius: 0.25em;
			background-color: #ffffff;
			padding: 0.7em 3em 0.7em 0.5em;
			-webkit-appearance: none;
			-moz-appearance: none;
			appearance: none;

			/* prettier-ignore */
			background-image:
				linear-gradient(
					45deg,
					transparent 50%,
					gray 50%
				),
				linear-gradient(135deg, gray 50%, transparent 50%);

			/* prettier-ignore */
			background-position:
				calc(100% - 1.5em) 1.1em,
				calc(100% - 1.1em) 1.1em,
				calc(100% - 2.5em) 0.5em;

			// stylelint-disable unit-disallowed-list
			background-size: 0.4em 0.4em, 0.4em 0.4em, 0.1em 1.5em;
			background-repeat: no-repeat;
			cursor: pointer;
			position: relative;
			align-self: center;
			margin-left: 10px;
			font-size: 0.9em;

			&:disabled {
				cursor: not-allowed;
			}
		}
	}

	.button-label-group {
		display: grid;
		grid-template-columns: 8em auto;
		margin: 0.6em;
		align-items: center;
	}
}
