/* Contact dock (inc/contact-dock.php): the compact bar bottom right on computers, the labelled bar along the bottom
   on phones and tablets. Colours and corners are tokens, so each site's dock wears its own brand. */
#wsDock,
#wsMbar {
	--ws-dock-brand: var(--wp--preset--color--brand, #333);
	--ws-dock-brand-hover: var(--wp--preset--color--brand-deep, #111);
	--ws-dock-on-brand: var(--ws-on-brand, #fff);
	--ws-dock-accent: var(--wp--preset--color--brand, #333);
	--ws-dock-ink: var(--wp--preset--color--ink, #1f2a30);
	--ws-dock-muted: #56636a;
	--ws-dock-line: #dfe6ea;
	--ws-dock-tint: color-mix(in srgb, var(--ws-dock-accent) 10%, #fff);
	--ws-dock-radius: 999px;      /* the bar and its buttons */
	--ws-dock-panel-radius: 14px; /* panels and sheets */
	--ws-dock-cta-case: none;
	--ws-dock-cta-spacing: normal;
	box-sizing: border-box;
	font-size: 15px;
	line-height: 1.3;
	color: var(--ws-dock-ink);
	transition: opacity .2s ease, visibility .2s;
}
#wsDock *,
#wsMbar * {
	box-sizing: border-box;
}
#wsDock .ws-dock__icon,
#wsMbar .ws-dock__icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
#wsDock p,
#wsMbar p {
	margin: 0;
	line-height: 1.3;
}
#wsDock :is(a, summary, button):focus-visible,
#wsMbar :is(a, button):focus-visible {
	outline: 3px solid var(--ws-dock-accent);
	outline-offset: 2px;
}

/* Computers ---------------------------------------------------------------- */
#wsDock {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999;
	display: none;
	align-items: stretch;
	gap: 3px;
	height: 50px;
	padding: 4px;
	background: #fff;
	border-radius: var(--ws-dock-radius);
	box-shadow: 0 8px 28px rgba(20, 40, 50, .2), 0 1px 3px rgba(20, 40, 50, .12);
}
@media (min-width: 1000px) {
	#wsDock {
		display: flex;
	}
}
@media (min-width: 1000px) {
	/* At the end of the page the footer's last line would sit under the dock (50px tall, 20px up): the footer runs on
	   by the dock's footprint, in its own colour, so its last line ends above the dock. */
	body:has(#wsDock) .site-footer::after {
		content: "";
		display: block;
		clear: both;
		height: 70px;
	}
}
#wsDock summary {
	list-style: none;
	cursor: pointer;
}
#wsDock summary::-webkit-details-marker {
	display: none;
}
#wsDock .ws-dock__cta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-right: 4px;
	padding: 0 16px;
	border-radius: var(--ws-dock-radius);
	background: var(--ws-dock-brand);
	color: var(--ws-dock-on-brand);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: var(--ws-dock-cta-spacing);
	text-transform: var(--ws-dock-cta-case);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s;
}
#wsDock .ws-dock__cta:hover {
	background: var(--ws-dock-brand-hover);
	color: var(--ws-dock-on-brand);
}
#wsDock .ws-dock__cta .ws-dock__icon {
	width: 16px;
	height: 16px;
}
#wsDock .ws-dock__item {
	display: flex;
}
#wsDock .ws-dock__btn {
	position: relative;
	display: grid;
	place-items: center;
	width: 42px;
	border-radius: var(--ws-dock-radius);
	color: var(--ws-dock-accent);
	text-decoration: none;
	transition: background-color .15s;
}
#wsDock .ws-dock__btn:hover,
#wsDock .ws-dock__item[open] > summary {
	background: var(--ws-dock-tint);
}
#wsDock .ws-dock__tip {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%);
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--ws-dock-ink);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s;
}
#wsDock .ws-dock__btn:is(:hover, :focus-visible) .ws-dock__tip {
	opacity: 1;
	visibility: visible;
}
#wsDock.is-open .ws-dock__tip {
	display: none;
}

/* Chat: a face and a visible label, like a chat service's own launcher. */
#wsDock .ws-dock__chat {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 0 14px 0 4px;
	border-radius: var(--ws-dock-radius);
	background: var(--ws-dock-tint);
	color: var(--ws-dock-ink);
	transition: background-color .15s;
}
#wsDock .ws-dock__chat:hover,
#wsDock .ws-dock__item--chat[open] > summary {
	background: color-mix(in srgb, var(--ws-dock-accent) 18%, #fff);
}
#wsDock .ws-dock__face {
	position: relative;
	display: block;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
}
#wsDock .ws-dock__face img,
#wsDock .ws-dock__head img,
#wsMbar .ws-mbar__face img {
	display: block;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 20%;
	box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ws-dock-accent);
}
#wsDock .ws-dock__head img {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
}
#wsDock .ws-dock__face-blank,
#wsMbar .ws-dock__face-blank {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ws-dock-accent);
	color: #fff;
}
#wsDock .ws-dock__badge {
	position: absolute;
	right: -4px;
	bottom: -3px;
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--ws-dock-accent);
	color: #fff;
}
#wsDock .ws-dock__badge .ws-dock__icon {
	width: 9px;
	height: 9px;
	stroke-width: 2.8;
}
#wsDock .ws-dock__chat-text {
	display: flex;
	flex-direction: column;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.15;
	white-space: nowrap;
}
#wsDock .ws-dock__chat-text small {
	font-size: 12px;
	font-weight: 400;
	color: var(--ws-dock-muted);
}

/* Panels */
#wsDock .ws-dock__pop {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	width: 320px;
	max-height: calc(100vh - 120px);
	overflow: auto;
	padding: 16px;
	border-radius: var(--ws-dock-panel-radius);
	background: #fff;
	box-shadow: 0 12px 36px rgba(20, 40, 50, .24);
	text-align: left;
}
.ws-dock__eyebrow {
	margin-bottom: 6px !important;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ws-dock-muted);
}
#wsDock .ws-dock__num,
#wsMbar .ws-dock__num {
	display: block;
	font-size: 14px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--ws-dock-muted);
}
#wsDock .ws-dock__num--lead {
	font-size: 18px;
	font-weight: 600;
	color: var(--ws-dock-ink);
}
#wsDock .ws-dock__today {
	margin: 2px 0 12px;
	font-size: 13px;
	color: var(--ws-dock-muted);
}
#wsDock .ws-dock__go {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	height: 42px;
	border-radius: var(--ws-dock-radius);
	background: var(--ws-dock-brand);
	color: var(--ws-dock-on-brand);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
#wsDock .ws-dock__go .ws-dock__icon {
	width: 15px;
	height: 15px;
}
#wsDock .ws-dock__go:hover {
	background: var(--ws-dock-brand-hover);
	color: var(--ws-dock-on-brand);
}
#wsDock .ws-dock__head {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 0 2px 12px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--ws-dock-line);
}
#wsDock .ws-dock__head-name {
	font-size: 15px;
	font-weight: 600;
}
.ws-dock__hint {
	font-size: 13px;
	line-height: 1.4;
	color: var(--ws-dock-muted);
}
.ws-dock__opt {
	display: flex;
	gap: 12px;
	align-items: center;
	width: 100%;
	padding: 10px;
	border: 0;
	border-radius: 10px;
	background: var(--ws-dock-tint);
	color: var(--ws-dock-ink);
	font: inherit;
	font-size: 14px;
	line-height: 1.35;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}
.ws-dock__opt:hover {
	background: color-mix(in srgb, var(--ws-dock-accent) 18%, #fff);
}
.ws-dock__opt[aria-busy="true"] {
	cursor: progress;
}
.ws-dock__opt-title {
	display: block;
	font-weight: 600;
}
.ws-dock__opt small {
	display: block;
	font-size: 12.5px;
	color: var(--ws-dock-muted);
}
.ws-dock__opt-icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	border-radius: 50%;
	background: var(--ws-dock-accent);
	color: #fff;
}
.ws-dock__notice {
	margin: 8px 2px 0 !important;
	font-size: 12px;
	line-height: 1.45 !important;
	color: var(--ws-dock-muted);
}
.ws-dock__rows {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}
.ws-dock__orow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 10px 10px 4px;
	border-top: 1px solid var(--ws-dock-line);
}
.ws-dock__orow-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
}
.ws-dock__pill {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	height: 34px;
	padding: 0 16px;
	border-radius: var(--ws-dock-radius);
	background: var(--ws-dock-brand);
	color: var(--ws-dock-on-brand);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
}
.ws-dock__pill:hover {
	background: var(--ws-dock-brand-hover);
	color: var(--ws-dock-on-brand);
}

/* Phones and tablets --------------------------------------------------------- */
#wsMbar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid var(--ws-dock-line);
	box-shadow: 0 -6px 20px rgba(20, 40, 50, .1);
}
@media (min-width: 1000px) {
	#wsMbar {
		display: none;
	}
}
@media (max-width: 999.98px) {
	body:has(#wsMbar) {
		padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); /* the last content never sits under the bar */
	}
}
#wsMbar .ws-mbar__cta {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 0;
	height: 48px;
	padding: 0 14px;
	border-radius: var(--ws-dock-radius);
	background: var(--ws-dock-brand);
	color: var(--ws-dock-on-brand);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: var(--ws-dock-cta-spacing);
	text-transform: var(--ws-dock-cta-case);
	text-decoration: none;
	white-space: nowrap;
}
#wsMbar .ws-mbar__cta:is(:hover, :focus) {
	color: var(--ws-dock-on-brand);
}
#wsMbar .ws-mbar__cta .ws-dock__icon {
	width: 18px;
	height: 18px;
}
#wsMbar .ws-mbar__items {
	display: flex;
	flex: 0 0 auto;
}
#wsMbar:not(:has(.ws-mbar__cta)) .ws-mbar__items {
	flex: 1 1 auto;
	justify-content: space-around; /* on the booking page the three actions share the bar */
}
#wsMbar .ws-mbar__it {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 56px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: none;
	color: var(--ws-dock-accent);
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
}
#wsMbar .ws-mbar__it:active,
#wsMbar .ws-mbar__it:has(+ .ws-sheet:popover-open) {
	background: var(--ws-dock-tint);
}
#wsMbar .ws-mbar__it .ws-dock__icon {
	width: 22px;
	height: 22px;
}
#wsMbar .ws-mbar__face,
#wsMbar .ws-mbar__face img {
	display: block;
	width: 24px;
	height: 24px;
}

/* Bottom sheets (popover). */
#wsMbar .ws-sheet {
	position: fixed;
	inset: auto 0 0 0;
	width: 100%;
	max-width: none;
	max-height: 80vh;
	margin: 0;
	overflow: auto;
	padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
	border: 0;
	border-radius: var(--ws-dock-panel-radius) var(--ws-dock-panel-radius) 0 0;
	background: #fff;
	box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
	color: var(--ws-dock-ink);
}
#wsMbar .ws-sheet::backdrop {
	background: rgba(10, 20, 30, .35);
}
#wsMbar .ws-sheet__grab {
	display: block;
	width: 40px;
	height: 5px;
	margin: 0 auto 12px;
	border-radius: 3px;
	background: #cfd8de;
}
#wsMbar .ws-sheet__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eef2f4;
	color: var(--ws-dock-ink);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
#wsMbar .ws-sheet .ws-dock__eyebrow {
	margin: 4px 0 14px !important;
}
#wsMbar .ws-sheet .ws-dock__opt {
	padding: 14px 12px;
	font-size: 16px;
}
#wsMbar .ws-sheet .ws-dock__orow {
	padding: 14px 12px 4px;
}
#wsMbar .ws-sheet .ws-dock__orow-name {
	font-size: 16px;
}
#wsMbar .ws-sheet .ws-dock__pill {
	height: 44px;
	padding: 0 20px;
	font-size: 15px;
}

/* Chat ------------------------------------------------------------------------ */
/* The chat service's bubble and greeting stay hidden: the dock is the launcher. While its window is open, its round button
   is the close button, and the dock steps aside; closed, the dock comes back (js/contact-dock.js sets the classes). */
html.ws-chat-dock chat-widget:not([data-active="true"]) {
	display: none !important;
}
html.ws-chat-open #wsDock,
html.ws-chat-open #wsMbar {
	opacity: 0;
	visibility: hidden;
}
@media print {
	#wsDock,
	#wsMbar {
		display: none !important;
	}
}
@media (prefers-reduced-motion: reduce) {
	#wsDock,
	#wsDock *,
	#wsMbar,
	#wsMbar * {
		transition: none !important;
	}
}
