/*
 * Bottom tab bar on phones (includes/mobile-tabbar.php).
 */

.gg-tabbar {
	display: none;
}

@media (max-width: 760px) {
	body.gg-has-tabbar {
		padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
	}

	body:not(#gg) .gg-tabbar {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 990;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
		align-items: stretch;
		margin: 0;
		padding: 0 0 env(safe-area-inset-bottom, 0px);
		background: #fbf9f5;
		box-shadow: 0 -1px 0 #eae4dc, 0 -8px 24px rgba(18, 18, 18, 0.05);
		font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;

		& .gg-tabbar__item {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			gap: 6px;
			width: 100%;
			min-height: 68px;
			margin: 0;
			padding: 10px 4px 12px;
			border: 0;
			border-radius: 0;
			background: transparent;
			box-shadow: none;
			color: #6e6a64;
			font: inherit;
			text-decoration: none;
			cursor: pointer;
			appearance: none;
			-webkit-tap-highlight-color: transparent;
			transition: color 0.15s ease;

			&:hover,
			&:focus-visible {
				color: #121212;
			}

			&:focus-visible {
				outline: 2px solid #d4af37;
				outline-offset: -4px;
			}

			&.is-current,
			&[aria-expanded="true"] {
				color: #121212;
			}
		}

		& .gg-tabbar__icon {
			position: relative;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 28px;
			height: 28px;

			& svg {
				stroke-width: 1.7;
			}
		}

		& .gg-tabbar__item.is-current svg,
		& .gg-tabbar__item[aria-expanded="true"] svg {
			stroke-width: 2;
		}

		& .gg-tabbar__label {
			font-size: 13px;
			font-weight: 600;
			line-height: 16px;
			letter-spacing: 0.8px;
			text-transform: uppercase;
		}

		& .gg-tabbar__badge {
			position: absolute;
			top: -4px;
			right: -8px;
			display: flex;
			align-items: center;
			justify-content: center;
			min-width: 17px;
			height: 17px;
			padding: 0 4px;
			border-radius: 999px;
			background: #d4af37;
			color: #121212;
			font-size: 10px;
			font-weight: 700;
			line-height: 1;
			letter-spacing: 0;

			&[hidden] {
				display: none;
			}
		}
	}
}

.gg-tabmenu {
	display: none;
}

@media (max-width: 760px) {
	body.gg-tabmenu-open {
		overflow: hidden;
	}

	.gg-tabmenu:not([hidden]) {
		position: fixed;
		top: 0;
		right: 0;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
		left: 0;
		z-index: 980;
		display: block;
		color: #121212;
		font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
	}

	button.gg-tabmenu__overlay.gg-tabmenu__overlay {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: rgba(18, 18, 18, 0.4);
		box-shadow: none;
		opacity: 0;
		transition: opacity 0.28s ease;
		cursor: pointer;
		appearance: none;
	}

	.gg-tabmenu.is-open .gg-tabmenu__overlay {
		opacity: 1;
	}

	.gg-tabmenu__panel {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		display: flex;
		flex-direction: column;
		width: min(20rem, 86vw);
		background: #fbf9f5;
		box-shadow: -12px 0 32px rgba(18, 18, 18, 0.12);
		transform: translateX(100%);
		transition: transform 0.28s ease;
	}

	.gg-tabmenu.is-open .gg-tabmenu__panel {
		transform: translateX(0);
	}

	.gg-tabmenu__top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 18px 12px 18px 20px;
		border-bottom: 1px solid #eae4dc;
	}

	.gg-tabmenu__top h2 {
		margin: 0;
		font-size: 18px;
		font-weight: 700;
		line-height: 24px;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	button.gg-tabmenu__close.gg-tabmenu__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: transparent;
		box-shadow: none;
		color: #121212;
		cursor: pointer;
		appearance: none;
	}

	button.gg-tabmenu__close.gg-tabmenu__close svg {
		stroke: currentColor;
	}

	.gg-tabmenu__nav {
		flex: 1;
		overflow: auto;
		padding: 8px 0 24px;
	}

	.gg-tabmenu__list,
	.gg-tabmenu__sublist {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.gg-tabmenu__list > li,
	.gg-tabmenu__sublist > li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		margin: 0;
		border-bottom: 1px solid #eae4dc;
	}

	.gg-tabmenu__list a,
	.gg-tabmenu__sublist a {
		flex: 1 1 auto;
		min-width: 0;
		padding: 16px 8px 16px 20px;
		color: #121212;
		font-size: 16px;
		font-weight: 600;
		line-height: 22px;
		text-decoration: none;
	}

	.gg-tabmenu__sublist a {
		padding-left: 32px;
		font-weight: 500;
	}

	.gg-tabmenu__list a[aria-current="page"],
	.gg-tabmenu__sublist a[aria-current="page"] {
		color: #8a6d2f;
	}

	button.gg-tabmenu__sub.gg-tabmenu__sub {
		display: inline-flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin: 0 4px 0 0;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background: transparent;
		box-shadow: none;
		color: #6e6a64;
		cursor: pointer;
		appearance: none;
	}

	.gg-tabmenu__list > li.is-open > button.gg-tabmenu__sub svg {
		transform: rotate(180deg);
	}

	.gg-tabmenu__empty {
		margin: 16px 20px;
		color: #6e6a64;
		font-size: 15px;
		line-height: 22px;
	}

	.gg-tabmenu__sr {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

@media (max-width: 400px) {
	body:not(#gg) .gg-tabbar .gg-tabbar__label {
		font-size: 11px;
		letter-spacing: 0.4px;
	}
}

@media print {
	.gg-tabbar {
		display: none !important;
	}
}
