/**
 * WARNING: rules below are directly copied from
 * https://opengrok.a8c.com/source/xref/a8c/jetpackme-new/scss/jetpack-footer.css
 *
 * Some overwrites are necessary to make both this and Jetpack.com footers look
 * similar.
 */

// ============================================================================
// Overwrites
// ============================================================================

.jetpack-footer {
	line-height: 1.4;
	padding: 4rem 7.5% 4.5rem;
	background-color: #f0f2eb;

	-webkit-font-smoothing: initial;

	ul {
		margin-inline-start: 0;
	}
}

.social-properties {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	> li > a {
		padding: 12px !important;
		display: block;
		transition: opacity 0.1s;
	}

	svg {
		fill: var(--studio-gray-80);
	}
}

.social-properties__accessible-name {
	@include hide-content-accessibly();
}

// ============================================================================
// Jetpack.com styles
// ============================================================================

.jetpack-footer__content,
.a8c-footer__link-list {
	max-width: 1148px;
	margin: 0 auto;
}

@media (min-width: 531px) {
	.jetpack-footer__head,
	.sitemap__list,
	.a8c-footer__link-list {
		display: grid;
		column-gap: 3rem;
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 901px) {
	.jetpack-footer__head,
	.sitemap__list,
	.a8c-footer__link-list {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (min-width: 1101px) {
	.jetpack-footer__head,
	.sitemap__list,
	.a8c-footer__link-list {
		grid-template-columns: repeat(4, 1fr);
	}
}
@media (min-width: 1301px) {
	.jetpack-footer__head,
	.sitemap__list,
	.a8c-footer__link-list {
		grid-template-columns: repeat(5, 1fr);
	}
}

@media (max-width: 600px) {
	.jetpack-footer {
		padding-block-start: 3rem;
	}
}

.jetpack-footer__head {
	margin-block-end: 2.5rem;
}
@media (max-width: 530px) {
	.jetpack-footer__head {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
}

@media (min-width: 531px) {
	.jetpack-footer__language {
		grid-column-start: -2;
	}
}

@media (min-width: 531px) {
	.jetpack-footer__language-toggle {
		margin-inline-start: -1rem;
	}
}

.sitemap__list {
	margin-block-start: 0;
	margin-block-end: 0;
	padding-inline-start: 0;
	padding-inline-end: 0;
	list-style-type: none;
}
.sitemap__list :any-link {
	color: #007117;
}
.sitemap__list :any-link:hover {
	color: #007117;
	text-decoration: underline;
}

.sitemap__category {
	margin: 5rem 0;
}
@media (min-width: 531px) {
	.sitemap__category {
		margin: 2.5rem 0;
	}
}
.sitemap__category:last-child {
	margin-block-end: 0;
}

.sitemap__category-label {
	display: block;
	margin-block-end: 1rem;
	color: #2c3338;
	font-weight: 600;
}
@media (max-width: 600px) {
	.sitemap__category-label {
		margin-block-end: 0.75rem;
		font-size: 0.8125rem; /* stylelint-disable-line scales/font-sizes */
	}
}

.sitemap__link-list {
	margin-block-start: 0;
	margin-block-end: 0;
	padding-inline-start: 0;
	padding-inline-end: 0;
	list-style-type: none;
	line-height: 1.2;
}
@media (max-width: 600px) {
	.sitemap__link-list {
		font-size: 0.8125rem; /* stylelint-disable-line scales/font-sizes */
	}
}
.sitemap__link-list > li {
	margin: 0.75rem 0;
}
@media (max-width: 600px) {
	.sitemap__link-list > li {
		margin: 1rem 0;
	}
}

.sitemap .store-buttons {
	margin-block-start: 1rem;
}
.sitemap .store-buttons ul {
	margin-block-start: 0;
	margin-block-end: 0;
	padding-inline-start: 0;
	padding-inline-end: 0;
	list-style-type: none;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}
.sitemap .store-buttons ul > li {
	margin: 0.25rem 1.5rem 0.25rem 0;
}
.sitemap .store-buttons ul > li:last-child {
	margin-inline-end: 0;
}
.sitemap .store-buttons ul > li > a {
	display: block;
}

@media (min-width: 531px) {
	.sitemap__category-social,
	.sitemap__category-mobile {
		grid-column: 1 / -1;
	}
}

@media (min-width: 901px) {
	.sitemap__category-social {
		grid-column-end: auto;
	}
}

@media (min-width: 901px) {
	.sitemap__category-mobile {
		grid-column-start: 2;
	}
}

.a8c-footer {
	padding: 1.5rem 7.5%;
	background-color: #101517;
}
@media (max-width: 600px) {
	.a8c-footer {
		padding-block-start: 1rem;
		padding-block-end: 1rem;
	}
}

.a8c-footer__link-list {
	margin-block-start: 0;
	margin-block-end: 0;
	padding-inline-start: 0;
	padding-inline-end: 0;
	list-style-type: none;
}
@media (min-width: 531px) {
	.a8c-footer__link-list {
		display: flex;
		justify-content: space-between;
	}
}
@media (min-width: 901px) {
	.a8c-footer__link-list {
		display: grid;
	}
}
.a8c-footer__link-list > li {
	margin: 1rem 0;
}
@media (max-width: 600px) {
	.a8c-footer__link-list > li {
		font-size: 0.8125rem; /* stylelint-disable-line scales/font-sizes */
	}
}
.a8c-footer__link-list :any-link {
	color: var(--color-text-inverted);
	text-decoration: underline;
}
.a8c-footer__link-list :any-link:hover {
	color: var(--color-text-inverted);
	text-decoration: none;
}
.a8c-footer__link-list .a8c-footer__home-link {
	text-decoration: none;
}
@media (max-width: 600px) {
	.a8c-footer__link-list .a8c-footer__home-link {
		font-size: 0.6875rem; /* stylelint-disable-line scales/font-sizes */
	}
}

@media (min-width: 901px) {
	.a8c-footer__home {
		grid-column: 1 / 3;
	}
}

.a8c-footer__home-link {
	display: inline-flex;
	align-items: baseline;
}

.a8c-footer__a8c-logo {
	position: relative;
	top: 1px;
	height: 0.75rem;
	margin: 0 0.5rem;
}
@media (max-width: 600px) {
	.a8c-footer__a8c-logo {
		top: 0;
		height: 0.5rem;
		margin: 0 0.25rem;
	}
}

@media (min-width: 901px) {
	.a8c-footer__work {
		grid-column-start: -2;
	}
}

.social-properties > li {
	margin: 0 2px 0 0;
}
.social-properties > li:first-child {
	margin-inline-start: -14px;
}

.social-properties > li > a:hover {
	opacity: 0.75;
}
.jetpack-footer__language-toggle {
	margin-inline-start: -1rem;
}
.language-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 0.5rem 1rem;
	background-color: transparent;
	border: none;
	border-radius: 3px;
	appearance: none;
	font-size: 0.875rem;
	line-height: 1;
	text-transform: uppercase;
	transition: color 0.1s, background-color 0.1s;
	cursor: pointer;
}
.language-toggle:focus,
.language-toggle:hover {
	outline: 0;
	color: var(--color-text-inverted);
	background-color: var(--studio-black);
}
.language-toggle:active {
	color: var(--color-text-inverted);
	background-color: #2c3338;
}
.language-toggle .gridicon {
	width: 1.125rem;
	height: 1.125rem;
	margin-inline-start: 0.25rem;
}
