/**
 * Profile page nav
 */
@mixin profile-page-nav-layout-mobile {
	.profile-page-nav {
		&__tabs {
			display: flex;
		}

		&__tab {
			flex: 1;
		}

		&__link {
			min-width: 0;
			padding: 10px 15px;
		}
	}

	.container {
		width: auto;
	}
}

.profile-page-nav {
	@include font-primary-bold;
	background: $color-white;
	box-shadow: 0 4px 4px 0 rgba($color-black, .05);
	color: $color-charcoal2;
	font-size: 12px;
	line-height: 24px;
	text-transform: uppercase;

	&__tabs {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	&__tab {
		display: inline-block;
		margin: 0;
		padding: 0;
		position: relative;

		&::after {
			background: $color-blue5;
			border-radius: 4px 4px 0 0;
			bottom: 0;
			content: '';
			display: block;
			height: 4px;
			left: 0;
			opacity: 0;
			position: absolute;
			right: 0;
			transition: opacity $trans-func $trans-time;
		}

		&--active {
			color: $color-blue5;

			&::after {
				opacity: 1;
			}
		}
	}

	&__link {
		color: inherit;
		cursor: pointer;
		display: block;
		font: inherit;
		margin: 0;
		min-width: 140px;
		padding: 15px 25px;
		text-align: center;
		transition: color $trans-func $trans-time;

		&:hover {
			color: $color-blue5;
		}

		&::after {
			background: $color-blue5;
			border-radius: 4px 4px 0 0;
			bottom: 0;
			content: '';
			display: block;
			height: 4px;
			left: 0;
			opacity: 0;
			position: absolute;
			right: 0;
			transition: opacity $trans-func $trans-time;
		}

		&--active {
			color: $color-blue5;

			&::after {
				opacity: 1;
			}
		}
	}

	&--mobile {
		@include profile-page-nav-layout-mobile;
	}
}

@include breakpoint-phone {
	.profile-page-nav {
		@include profile-page-nav-layout-mobile;
	}
}

/**
 * Profile actions
 */
.profile-actions {
	background: $color-white;
	border: 1px solid $color-charcoal1;
	border-radius: 4px;
	box-shadow: 0 2px 4px 0 rgba($color-black, .1);
	margin: 0 0 30px;

	.btn {
		margin: 0;
	}

	&__headline {
		@include font-primary-bold;
		font-size: 16px;
		line-height: 21px;
		margin: 0 0 15px;
	}

	&__row {
		& + & {
			border-top: 1px solid $color-charcoal1;
		}

		&--text {
			padding: 15px;

			.appt-details,
			.contractor-more-block {
				margin-bottom: 0;
			}
		}
	}

	&__btn {
		@include font-primary-bold;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: 0;
		color: $color-charcoal5;
		cursor: pointer;
		display: block;
		flex: 1;
		font-size: 14px;
		line-height: 18px;
		min-width: 100%;
		overflow: hidden;
		padding: 15px 15px 15px 38px;
		position: relative;
		text-align: left;
		text-overflow: ellipsis;
		transition: color $trans-time $trans-func;
		white-space: nowrap;

		&:hover,
		&:focus,
		&:active {
			color: $color-blue6;
		}

		[class^='icon-'],
		[class*=' icon-'] {
			font-size: 18px;
			left: 15px;
			line-height: 18px;
			position: absolute;
			top: 15px;
		}
	}
}

/**
 * Open hours
 */
.open-hours {
	color: $color-charcoal5;
	font-size: 16px;
	line-height: 22px;

	dt {
		@include font-primary-bold;
		float: left;
		padding-right: 10px;
		width: 45px;
	}

	dd {
		margin: 0 0 0 55px;
		padding: 0;

		&.open-now {
			@include font-primary-bold;

			&::after {
				@include font-primary-regular;
				content: '(Open)';
			}
		}

		&.closed {
			color: $color-charcoal2;
			text-transform: uppercase;
		}
	}
}

/**
 * Promotion
 */
.promotion {
	color: $color-charcoal4;
	font-size: 16px;
	line-height: 26px;
	margin: 0 0 45px;

	&__header {
		font-size: 14px;
		line-height: 18px;
		margin-bottom: 15px;
		vertical-align: top;
	}

	&__badge {
		@include font-primary-bold;
		background: $color-green5;
		border-radius: 4px;
		color: $color-white;
		font-size: 10px;
		line-height: 13px;
		margin-right: 5px;
		padding: 3px 5px;
		text-transform: uppercase;
		transition: background-color $trans-time $trans-func;
		white-space: nowrap;
	}

	&__note {
		color: $color-charcoal2;
		vertical-align: middle;
		white-space: nowrap;
	}

	&__title {
		@include font-primary-bold;
		color: $color-green5;
		font-size: 18px;
		line-height: 25px;
	}

	&__trades {
		color: $color-charcoal2;
		font-size: 14px;
		line-height: 18px;
		margin: 0 0 15px;
	}

	&__subtitle {
		color: $color-charcoal5;
		font-size: 18px;
		line-height: 25px;
		margin: 0 0 15px;
	}

	&__details {
		margin: 0 0 25px;
	}

	&__terms-title {
		@include font-primary-bold;
		color: $color-charcoal5;
		font-size: 14px;
		letter-spacing: .69;
		line-height: 20px;
		margin: 0 0 15px;
		text-transform: uppercase;
	}

	&__terms {
		font-size: 14px;
		line-height: 22px;
		margin: 0 0 15px;
	}

	&__more-btn {
		border: 0;
		display: inline;
		font-size: 14px;
		letter-spacing: .8px;
		line-height: 18px;
		height: auto;
		margin: 0;
		padding: 0;
		width: auto;
	}
}

/**
 * Mobile bottom toolbar
 */
.mobile-bottom-toolbar {
	background: $color-white;
	bottom: 0;
	box-shadow: 0 -4px 4px 0 rgba($color-black, .05);
	left: 0;
	position: fixed;
	right: 0;
	z-index: 1000;

	&__content {
		background: $color-white;
		display: flex;
		padding: 10px 15px;
		position: relative;
		z-index: 2;

		.btn {
			margin: 0;
			padding-left: 0;
			padding-right: 0;

			&-primary {
				flex: 1;
			}

			&-secondary {
				background: $color-white;
				border: 1px solid $color-charcoal1;
				box-shadow: 0 2px 4px 0 rgba($color-black, .1);
				height: 37px;
				line-height: 37px;
				padding: 0;
				position: relative;
				text-align: center;
				text-indent: 1px;
				width: 37px;

				&:hover,
				&:focus,
				&:active {
					border-color: $color-charcoal2;
				}

				&::before {
					@include icon-basic;
					content: '\e90c';
					font-size: 18px;
					position: relative;
					top: 3px;
				}
			}

			& + .btn {
				margin-left: 15px;
			}
		}
	}

	&__menu {
		bottom: 0;
		left: 15px;
		opacity: 0;
		padding: 15px 0 0;
		position: absolute;
		right: 15px;
		transition: bottom $trans-func $trans-time * 2, opacity $trans-func $trans-time * 2;
		z-index: 1;

		.profile-actions {
			margin-bottom: 0;
		}
	}

	&-overlay {
		background: rgba($color-black, .5);
		bottom: 0;
		display: none;
		left: 0;
		position: fixed;
		right: 0;
		top: 0;
		z-index: 999;

		&--active {
			display: block;
		}
	}

	&--active {
		.mobile-bottom-toolbar {
			&__menu {
				bottom: 72px;
				opacity: 1;
			}

			&__content {
				.btn {
					&-secondary {
						color: $color-blue5;

						&::before {
							content: '\e909';
						}

						&:hover,
						&:focus,
						&:active {
							color: $color-blue6;
						}
					}
				}
			}
		}
	}
}
