/* The audience bar (inc/audience.php, Story #1399). Colours, radius, shadow and
   buttons come from the theme; this file is layout. */

body.go-has-aud {
	--go-aud-h: 72px;
	/* The height of the header's button ("Book a Demo", "Talk to us"). */
	--go-aud-btn-h: 47px;
	padding-top: calc(80px + var(--go-aud-h)) !important;
}

.go-aud {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 999999999;
	height: var(--go-aud-h);
	display: flex;
	align-items: center;
	background: var(--primary);
	transition: transform 0.25s ease;
}

body.go-has-aud .navbar {
	top: var(--go-aud-h);
	transition: top 0.25s ease;
}

/* Scrolled down: the bar leaves and the white header takes its place. */
body.go-aud-away .go-aud {
	transform: translateY(-100%);
	visibility: hidden;
	transition: transform 0.25s ease, visibility 0s 0.25s;
}

body.go-aud-away .navbar {
	top: 0;
}

body.admin-bar .go-aud {
	top: 32px;
}

body.admin-bar.go-has-aud .navbar {
	top: calc(32px + var(--go-aud-h));
}

body.admin-bar.go-aud-away .navbar {
	top: 32px;
}

/* A section reached through a header link lands below both bars. */
body.go-has-aud [id].go-band {
	scroll-margin-top: calc(90px + var(--go-aud-h));
}

.go-aud-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.go-aud-switch {
	display: flex;
	gap: 4px;
	border-radius: 999px;
	position: relative;
}

/* Drawn over the two options, so a hovered one does not hide the outline. */
.go-aud-switch::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid color-mix(in srgb, var(--white) 55%, var(--primary));
	border-radius: 999px;
	pointer-events: none;
}

.go-aud-switch a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--go-aud-btn-h);
	padding: 0 18px;
	border-radius: 999px;
	color: var(--white);
	font-size: inherit;
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
}

.go-aud-switch a:hover,
.go-aud-switch a:focus {
	color: var(--white);
	text-decoration: none;
	background: color-mix(in srgb, var(--white) 15%, var(--primary));
}

.go-aud-switch a[aria-current="true"] {
	background: var(--white);
	color: var(--primary);
	font-weight: 500;
}

.go-aud-account {
	display: flex;
	align-items: center;
	gap: var(--go-btn-gap, 12px);
}

.go-aud-account a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--go-aud-btn-h);
	padding: 0 17px;
	color: var(--white);
	font-size: inherit;
	font-weight: 400;
	white-space: nowrap;
}

.go-aud-account a:hover {
	color: var(--white);
	text-decoration: none;
}

/* Login: a button with a white border, beside the filled Sign up button. */
.go-aud-account a.go-aud-link {
	padding: 0 22px;
	border: 1px solid var(--white);
	border-radius: var(--go-radius-btn);
	background: transparent;
}

.go-aud-account a.go-aud-link:hover,
.go-aud-account a.go-aud-link:focus {
	background: color-mix(in srgb, var(--white) 15%, var(--primary));
}

.go-aud-account a.go-aud-signup {
	border-radius: var(--go-radius-btn, 8px);
	background: var(--white);
	color: var(--primary);
	text-decoration: none;
}

/* On desktop the account links and the switch are in the bar. */
@media (min-width: 992px) {
	ul.menu li.go-aud-item,
	.go-aud-only {
		display: none !important;
	}

	body.go-has-aud .navbar ul.menu > li.header-btn {
		margin-right: 0 !important;
	}
}

/* The bar is as wide as the header, which assets/css/menu.css narrows here. */
@media screen and (min-width: 992px) and (max-width: 1366px) {
	.go-aud > .container {
		max-width: 1199px;
		margin: 0;
	}
}

/* The pop-up: a centred box, a bottom sheet on phones. */
.go-aud-popup {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: color-mix(in srgb, var(--primary) 65%, transparent);
}

.go-aud-popup[hidden] {
	display: none;
}

.go-aud-dialog {
	width: 100%;
	max-width: 520px;
	max-height: 100%;
	overflow: auto;
	padding: 32px;
	border-radius: var(--go-radius-box, 20px);
	background: var(--white);
	box-shadow: var(--go-shadow);
	text-align: center;
}

.go-aud-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--go-btn-gap, 12px);
	margin-top: 24px;
}

body.go-aud-locked {
	overflow: hidden;
}

/* The footer line to the other side. The link moves to a line of its own as a
   whole when it does not fit beside the question. */
.go-aud-footer a {
	display: inline-block;
	font-weight: 700;
	text-decoration: underline;
}

/* Phones and tablets: no bar. Login, Sign up and the button to the other side
   are buttons in the opened menu. */
@media (max-width: 991.98px) {
	body.go-has-aud {
		padding-top: 80px !important;
	}

	.go-aud {
		display: none;
	}

	body.go-has-aud .navbar,
	body.go-aud-away .navbar {
		top: 0;
	}

	body.admin-bar.go-has-aud .navbar {
		top: 32px;
	}

	body.go-has-aud [id].go-band {
		scroll-margin-top: 90px;
	}

	.go-aud-other a {
		white-space: normal;
	}
}

@media (max-width: 599.98px) {
	.go-aud-dialog {
		max-width: none;
		padding: 24px 16px;
		border-radius: var(--go-radius-box, 20px) var(--go-radius-box, 20px) 0 0;
	}

	.go-aud-popup {
		align-items: flex-end;
		padding: 0;
	}

	.go-aud-buttons .btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.go-aud,
	body.go-has-aud .navbar,
	body.go-aud-away .go-aud {
		transition: none;
	}
}

/* The restaurant footer opens with the logo: left of the menus on wide screens,
   above them below that. */
.go-footer-top {
	margin-bottom: var(--go-space-footer, 20px);
}

.go-footer-brand {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: var(--go-space-footer, 20px);
}

.go-footer-logo {
	display: block;
	width: 100px;
	height: auto;
}

@media (min-width: 1100px) {
	.go-footer-top {
		display: flex;
		gap: 24px;
	}

	.go-footer-brand {
		flex: 0 0 190px;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		margin-bottom: 0;
		padding-top: 10px;
	}

	.go-footer-menus {
		flex: 1 1 auto;
		min-width: 0;
	}
}

@media (max-width: 767.98px) {
	.go-footer-brand {
		flex-direction: column;
	}

}

/* The copyright line and the legal links; on phones the links come first. */
.go-footer-legal-col {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: flex-start;
	gap: 4px 24px;
}

footer.footer .go-footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
	margin: 0;
	padding: 0;
}

footer.footer .go-footer-legal li a {
	line-height: 30px;
}

@media (max-width: 767.98px) {
	.go-footer-legal-col {
		flex-direction: column-reverse;
		gap: 8px;
	}

	footer.footer .go-footer-legal {
		justify-content: center;
	}

	footer.footer .go-footer-legal-col + div .social-icon {
		justify-content: center;
		margin-top: 12px;
	}
}

/* The copyright is plain text on the line of the links and the social icons (the
   theme styles footer spans as menu headings). */
footer.footer .go-footer-legal-col > span {
	display: block !important;
	margin: 0 !important;
	font-size: inherit;
	font-weight: 400;
	line-height: 30px !important;
}

footer.footer .go-footer-legal-col + div .social-icon {
	align-items: center;
	min-height: 30px;
}

/* Phones: everything in the middle, the rows close together. */
@media (max-width: 767.98px) {
	footer.footer .go-footer-legal-col {
		flex-wrap: nowrap;
		align-items: center;
		gap: 2px;
		padding-right: 0;
		padding-left: 0;
		text-align: center;
	}

	footer.footer .go-footer-legal {
		width: 100%;
		margin: 0 !important;
	}

	footer.footer .go-footer-legal li a {
		margin: 0;
		line-height: 26px !important;
	}

	footer.footer .go-footer-legal-col > span {
		line-height: 26px !important;
	}

	body.go-side-partners footer.footer .bottom-tab {
		margin-bottom: 8px;
	}

	body.go-side-partners footer.footer #menu-landing-partners-footer {
		margin: 0 !important;
	}

	body.go-side-partners footer.footer #menu-landing-partners-footer li a {
		margin: 0;
		line-height: 26px !important;
	}

	body.go-side-partners footer.footer .bottom-tab .col-md-7 {
		margin: 0;
	}
}

/* Tablets: the four menus side by side, and the bottom row on one line where it
   fits. */
@media (min-width: 768px) and (max-width: 1099.98px) {
	footer.footer .go-footer-menus .desktop-footer {
		flex-wrap: nowrap;
	}

	footer.footer .go-footer-menus .desktop-footer > div {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
		padding-right: 10px;
		padding-left: 10px;
	}

	footer.footer .go-footer-menus .desktop-footer ul li a {
		line-height: 24px;
		padding-top: 5px;
		padding-bottom: 5px;
		display: block;
	}

	footer.footer .go-footer-legal-col {
		flex: 1 1 0;
		max-width: none;
	}

	footer.footer .go-footer-legal-col + div {
		flex: 0 0 auto;
		width: auto;
		max-width: none;
	}

	footer.footer .go-footer-legal-col + div .footer-icon {
		margin-right: 8px !important;
		margin-left: 8px !important;
	}

	footer.footer .go-footer-legal-col + div .footer-icon:last-child {
		margin-right: 0 !important;
	}
}

