/**
 * Fixed bottom bar for the blog, matching the main site's.
 *
 * The values here are taken from the main site's rendered stylesheet rather
 * than guessed, so the two bars are the same object on both installs:
 *
 *   wrapper background   #ffce00
 *   inner list           #f7cc37, max-width 768px, centred, 10px/5px padding
 *   icon                 24px, #000, 10px below it
 *   label                14px/17px, #000, letter-spacing .48px
 *   active / hover       #cb372b
 *
 * The main site shows the bar only on small screens. Its rule lives in an
 * inline style block rather than the bottom-menu plugin's stylesheet, which is
 * easy to miss:
 *
 *   .bnav_bottom_nav_wrapper { display: none !important; }
 *   @media only screen and (max-width: 768px) { ... display: block !important }
 *
 * Hidden by default, revealed at 768px and below. The same breakpoint is used
 * here so the two behave identically.
 */

.yg-bar {
	display: none;
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999;
	background: #ffce00;
}

@media only screen and (max-width: 768px) {
	.yg-bar {
		display: block;
	}
}

.yg-bar-list {
	display: flex;
	align-items: center;
	justify-content: space-around;
	max-width: 768px;
	margin: 0 auto;
	padding: 10px 5px;
	list-style: none;
	background: #f7cc37;
}

.yg-bar-item {
	display: flex;
	flex: 1;
	margin: 0;
	padding: 0;
	list-style: none;
}

.yg-bar-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2px 4px;
	color: #000;
	text-decoration: none;
	transition: color .15s ease;
}

.yg-bar-icon {
	width: 24px;
	height: 24px;
	margin-bottom: 10px;
	fill: currentColor;
}

.yg-bar-text {
	font-size: 14px;
	line-height: 17px;
	letter-spacing: .48px;
	text-align: center;
}

.yg-bar-link:hover,
.yg-bar-link:focus-visible {
	color: #cb372b;
}

.yg-bar-link:focus-visible {
	outline: 2px solid #cb372b;
	outline-offset: -2px;
}

/*
 * The bar floats over the page, so the foot of the document needs to clear it
 * or the last thing on the page sits underneath. Matched to the bar's own
 * height: 24px icon + 10px gap + 17px label + 20px padding.
 *
 * Inside the same breakpoint as the bar: reserving this above 768px would
 * leave a strip of empty page under the footer with nothing standing in it.
 */
@media only screen and (max-width: 768px) {
	body {
		padding-bottom: 71px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yg-bar-link {
		transition: none;
	}
}
