@use "../../scss/mixins/breakpoints";
@use "../../scss/variables/colors";
@use "sass:color";

$color__border: #dcdcde;
$color__back-link: #787c82;

.jetpack-about__main,
.jetpack-about__plugin {
	background-color: colors.$white;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
	border-radius: 4px;
}

.jetpack-about__main,
.jetpack-about__colophon {
	font-size: 14px;

	p {
		font-size: 14px;
	}
}

.jetpack-about__link-back {
	padding: 24px 0;
	border-bottom: none;

	a {
		color: #3c434a;

		&:hover,
		&:active {
			color: color.adjust($color__back-link, $lightness: -30%);
		}

		svg {
			fill: #000;
			height: 16px;
			margin-right: 4px;
			margin-top: -3px;
			vertical-align: middle;
			width: 16px;
		}
	}
}

.jetpack-about__main {
	padding: 32px;
}

.jetpack-about__logo {
	width: 265px;

	@media screen and (max-width: 400px) {
		width: 100%;
	}
}

.jetpack-about__content {
	display: flex;

	@media screen and (max-width: 782px) {
		flex-wrap: wrap;
	}
}

.jetpack-about__text,
.meet-the-team,
.details-link {
	order: 1;

	p {
		font-size: 14px;
		font-weight: 400;
		line-height: 24px;
		color: var(--jp-gray-80);
		margin: 24px 0;

		&:last-child {
			margin-bottom: 0;
		}
	}

	a {
		color: #000;
		font-weight: 400;
		text-decoration: underline;
		transition-duration: 0.05s;
		transition-property: border, background, color;
		transition-timing-function: ease-in-out;

		&:hover {
			text-decoration-thickness: 3px;
		}

		&:focus {
			text-decoration-line: none;
			border-radius: 2px;
			box-shadow: 0 0 0 var(--wp-admin-border-width-focus) #000;
			outline: 3px solid transparent;
		}
	}
}

.gridicons-external {
	vertical-align: top;
	width: 1rem;
}

.jetpack-about__images {
	text-align: center;
	margin-left: 48px;
	order: 2;

	@media screen and (max-width: 782px) {
		margin-left: 0;
		order: 0;
		text-align: left;
		width: 100%;
	}

	.meet-the-team {
		margin-bottom: 0;
		text-align: center;
	}
}

.jetpack-about__gravatars {
	display: flex;
	flex-wrap: wrap;
	width: 320px;

	@media screen and (max-width: 450px) {
		max-width: 320px;
		width: 100%;
	}

	li {
		margin-bottom: 0;
		width: 25%;

		img {
			max-width: 80px;
			vertical-align: top;
			width: 100%;
			height: 100%;
		}
	}
}

.jetpack-about__colophon {
	margin-bottom: 3rem;

	h3 {
		margin-top: 32px;
		font-size: 24px;
		color: #000;
		font-weight: 500;
		line-height: 24px;

		a {
			color: #000;
		}
	}

	.button {
		background: colors.$white;
		border: none;
		border-radius: var(--jp-border-radius);
		outline: solid 1.5px var(--jp-black);
		color: #000;
		font-weight: 500;

		&:hover {
			background: var(--jp-gray-0);
			outline: solid 1px var(--jp-black);
			color: #000;
		}

		&:focus {
			outline: solid 2px var(--jp-black);
			border-color: transparent;
			background: var(--jp-gray-0);
			color: #000;
		}
	}

	.star-rating .star {
		color: #000;
	}
}

.jetpack-about__services-more {
	margin: 24px 0 48px;
	text-align: center;

	a {
		color: #000;
		text-decoration: underline;
	}

	:hover {
		text-decoration-thickness: 3px;
	}
}


.jetpack-about__services {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-gap: 24px;

	@include breakpoints.breakpoint( "<960px" ) {
		display: block;
	}
}

.jetpack-about__plugin {
	margin-bottom: 0;

	.plugin-card-top {
		padding: 24px;
		position: relative;
		min-height: 128px;

		.name,
		.desc,
		.details-link {
			margin-left: 152px;
		}

		.name h3 {
			margin-top: 0;
			font-size: 20px;
		}

		.details-link {
			font-weight: 500;
		}

		.plugin-icon {
			top: 24px;
			left: 24px;
		}
	}

	.plugin-card-bottom {
		align-items: center;
		background-color: colors.$white;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding: 16px;

		.meta {
			margin-right: 1em;
		}

		.num-ratings {
			display: inline-block;
		}

		.action-buttons {
			clear: none;
			float: none;
			margin: 0.5em 0;

			li:last-child {
				margin-bottom: 0;
			}
		}
	}

	@include breakpoints.breakpoint( "<960px" ) {
		margin-bottom: 24px;
	}
}
