// Container tweaks
.container-fluid {
	padding-left: 1rem;
	padding-right: 1rem;
	max-width: 1920px;

	@include media-breakpoint-up(lg) {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}

	@include media-breakpoint-up(xl) {
		padding-left: 2.5rem;
		padding-right: 2.5rem;
	}
}

// Buttons overrides
.btn {
	display: inline-flex;
	text-transform: uppercase;
	letter-spacing: 1px;
	@include rfs(.875rem);
	justify-content: center;
	align-items: center;
	width: 100%;
	flex-flow: wrap;
	white-space: initial;
	cursor: pointer;

	@include media-breakpoint-up(md) {
		width: auto;
	}

	&-block {
		width: 100% !important;
	}

	&-light {
		color: $primary;
	}

	&-file {
		display: inline-flex;
		width: 2rem;
		height: 2rem;
		align-items: center;
		justify-content: center;
		padding: 0;
		font-size: .6875rem;

		color: white;
		background-color: $red;
	}

	&-action {
		display: inline-flex;
		align-items: center;
		@include rfs(.75rem);
		color: $gray;
		background: transparent;
		font-weight: normal;
		text-transform: none;
		letter-spacing: 0;
		padding: 0;

		svg {
			color: $primary;
			margin-right: .5rem;
			width: 1.5rem;
			height: 1.5rem;
		}
	}

	&-icon {
		align-items: center;
		padding: 1rem;

		svg {
			margin-right: 1rem;
			width: 1.25rem;
			height: 1.25rem;
		}
	}

	&-upload {
		position: relative;
		overflow: hidden;

		input[type=file] {
			position: absolute;
			top: 0;
			right: 0;
			min-width: 100%;
			min-height: 100%;
			font-size: 100px;
			text-align: right;
			filter: alpha(opacity=0);
			opacity: 0;
			outline: none;
			background: white;
			cursor: inherit;
			display: block;
		}
	}

	&-more {
		svg {
			width: .75rem;
			height: .75rem;
			margin-left: .5rem;
		}
	}

	&-user {
		background-color: transparent;
	}

	&-link {
		font-weight: 600;
		width: auto;
	}

	&-white {
		background-color: white;
		color: $primary;
		border-color: white;

		body.company & {
			color: $secondary;

			&:hover {
				color: white;
			}
		}

		&:hover {
			background-color: transparent;
			color: white;
		}
	}

	&-tooltip {
		text-align: inherit;
		display: inherit;
		font-weight: inherit;
		font-size: inherit;
		text-transform: inherit;
		padding: inherit;
		margin: inherit;
		color: $primary;
		letter-spacing: inherit;
	}

}

// Custom controls
.custom-control-label {
	cursor: pointer;
	font-size: 14px;
	font-weight: 300;

	&::after {
		border: 1px solid $input-border-color;
	}
}
.custom-radio {
	.custom-control-label::after {
		border-radius: 50%;
	}
}
.custom-checkbox {
	&--boxed {
		position: relative;
		padding: 1rem 1rem 1rem calc(#{$custom-control-gutter} + 1rem);

		align-items: center;
		height: 3rem;
		padding-left: 3.25rem;
		border-radius: $input-border-radius;
		overflow: hidden;
		line-height: 1.2;


		label {
			font-weight: normal;
			position: static;

			span {
				position: relative;
				z-index: 1;
			}

			&::before,
			&::after {
				left: 1rem;
				top: 50%;
				transform: translateY(-50%);
				z-index: 2;
				border-radius: $custom-checkbox-indicator-border-radius;
			}

			&::before {
				background-color: white;
				border-color: white;
			}

			em {
				position: absolute;
				left: 0;
				top: 0;
				width: 100%;
				height: 100%;
				cursor: pointer;
				z-index: 0;

				background-color: $gray-lightest;
			}
		}

		.custom-control-input:checked ~ .custom-control-label {
			color: white;

			&::before {
				background-color: white;
				border-color: white;
			}

			&::after {
				background-image: url("data:image/svg+xml;utf8,<svg width='13' height='10' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><use xlink:href='%23path0_fill' transform='translate(.95 .7)' fill='%238BC832'/><defs><path id='path0_fill' fill-rule='evenodd' d='M11.385.254a.8.8 0 0 1-.04 1.13l-7.5 7a.8.8 0 0 1-1.11-.018l-2.5-2.5a.8.8 0 1 1 1.13-1.132L3.32 6.688 10.254.215a.8.8 0 0 1 1.13.04z'/></defs></svg>");
			}

			em {
				background-color: $primary;
			}
		}
	}
}

.custom-control-input:checked ~ .custom-control-label::after {
	border-color: $primary;
}

.custom-select {
	padding-top: 0;
	padding-bottom: 0;
	font-weight: 300;
}

.custom-file {
	&-label {
		cursor: pointer;
		padding: 1.5rem 1rem;
		line-height: 1;

		&::after {
			display: none;
		}
	}

	button {
		width: 2rem;
		height: 2rem;
		padding: 0;
		color: white;

		display: flex;
		align-items: center;
		justify-content: center;

		position: absolute;

		top: 50%;
		transform: translateY(-50%);
		right: 1rem;
		z-index: 99;

		pointer-events: none;
	}
}

.w-30 {
	width: 30%;
}
.w-40 {
	width: 40%;
}

.form-control {
	font-weight: 300;
}

.form-group {
	&--switch {
		display: flex;
		justify-content: space-between;
		align-items: center;

		label {
			margin-bottom: 0;
			margin-right: 1rem;
		}
	}
}
textarea {
	min-height: 120px;
}
.text-muted {
	@include rfs(.75rem);
	font-weight: 300;
}


hr {
	&.hr-small {
		margin-top: 1rem;
		margin-bottom: 1rem;
	}
}

.collapse-md-none {
	ul {
		margin-bottom: 2rem;
	}

	@include media-breakpoint-up(md) {
		display: block !important;
		height: auto !important;
		visibility: visible !important;
		ul {
			margin-bottom: 0;
		}
	}
}


// Modals
.modal {
	&-title {
		@include rfs($h3-font-size);
	}
	&-header {
		.close {
			margin-top: -.25rem;
		}
	}
	&--user {
		.modal-dialog {
			width: 100%;
			// height: 100%;
			margin: $modal-dialog-margin-y-sm-up auto;
			align-items: center;
			max-width: $modal-md;
		}
		.modal-content {
			border-radius: $modal-content-border-radius;
			margin-bottom: 0;
		}
	}
}

.nav-steps {
	border-bottom: 1px solid $gray-border;
	margin-bottom: 1rem;

	li {
		a {
			&.active {
				font-weight: bold;
			}
		}
	}
}

.carousel-indicators {
	li {
		border-radius: 50%;

	}
}


// Tables
.table {
	margin-bottom: 2rem;

	tr {
		th {
			@include rfs(.75rem);
			font-weight: normal;
			color: #888;
			border-width: 0;
			vertical-align: bottom;
		}
		td {
			@include rfs(.875rem);
			color: #444;
			vertical-align: middle;
		}

		th,
		td {
			text-align: right;

			&:first-child {
				padding-left: 0;
				text-align: left;

				position: sticky;
				left: 0;
				max-width: 300px;
				min-width: 160px;
				background-color: white;
			}
			&:last-child {
				padding-right: 0;
			}

			select {
				min-width: 240px;
			}
		}

		.title {
			@include rfs(1rem);
			min-width: 12rem;

			span {
				display: inline-block;
				vertical-align: middle;
			}

			small {
				font-size: .75rem;
				font-weight: 300;
				color: #666;
			}
		}
	}

	tfoot {
		td {
			font-weight: bold;
			color: $black;
		}
	}
}

// Pagination
.pagination {
	margin-top: 2rem;
	justify-content: space-between;
	border-radius: 0;

	.page-item {
		.page-link {
			border-radius: $border-radius;
		}

		&.active {
			font-weight: 600;
		}
	}

	.page-items {
		display: flex;
	}

	.page-nav {
		background-color: $primary;
		color: white;
	}
}

// Lists
.list-unordered,
.list-ordered {
	padding-left: 1.5rem;
	list-style: none;

	li {
		position: relative;
	}
}
.list-unordered {
	li {
		&::before {
			content: '';
			display: inline-block;
			background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"><path d="M5.133 6L0 .867.867.001l5.99 5.99L6.848 6l.01.009-5.991 5.99L0 11.133 5.133 6z" fill="%23000" fill-rule="evenodd"/></svg>') no-repeat left top;
			width: .5rem;
			height: .75rem;
			position: absolute;
			left: -1.5rem;
			top: .375rem;
		}
	}
}
.list-ordered {
	counter-reset: item;

	li {
		counter-increment: item;
		&::before {
			content: counter(item)".";
			display: inline-block;
			width: 1rem;
			height: .75rem;
			position: absolute;
			left: -1.5rem;
			top: 0;
		}

	}
}
.list-files {
	@extend .list-unstyled;
	li {
		display: flex;
		justify-content: space-between;
		align-items: center;
		@include rfs(.875rem);

		.btn-link {
			padding: 0;
		}

		& + li {
			margin-top: .5rem;
		}
	}
}
