/*
 * Sticky book tab.
 * Artwork is the Figma export from "Sticky nav element".
 * Normal widget 2:142 sits on the right edge of a 1440px frame (x 1368, width 72).
 * Hover widget 2:333 grows left to 84px and stays on that same right edge.
 * Left corners are 20px. The right side is square and flush with the screen.
 */

.hch-sticky-book {
	position: fixed;
	z-index: 100;
	right: 0;
	top: 300px;
	width: 72px;
	height: 162px;
	color: #1a1a1a;
	text-decoration: none;
	transition: width 0.28s ease;
}

.hch-sticky-book:hover,
.hch-sticky-book:focus-visible {
	width: 84px;
	color: #1a1a1a;
	text-decoration: none;
}

.hch-sticky-book:focus,
.hch-sticky-book:visited {
	color: #1a1a1a;
	text-decoration: none;
}

.hch-sticky-book:focus-visible {
	outline: 2px solid #803e98;
	outline-offset: 4px;
}

/*
 * Same Figma ear vector in both states.
 * Normal (node 2:142): left ear rotates -7.84deg, right ear rotates 10deg.
 * Hover (node 2:333): both ears stand upright and grow to 28x26.
 * Positions are from the right edge so the growth does not shove them.
 */
.hch-sticky-book__ear {
	position: absolute;
	/* Behind the orange tab, so the base is covered instead of floating on top. */
	z-index: 1;
	display: block;
	width: 24px;
	height: 22px;
	pointer-events: none;
	transform-origin: center center;
	transition: transform 0.28s ease, right 0.28s ease, top 0.28s ease, width 0.28s ease, height 0.28s ease;
}

.hch-sticky-book__ear svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Same Figma ear. Outer fill matches the tab: #f19624, then #d87e10 on hover. */
.hch-sticky-book__ear-outer {
	fill: #f19624;
	transition: fill 0.28s ease;
}

.hch-sticky-book__ear-inner {
	fill: #803e98;
}

.hch-sticky-book:hover .hch-sticky-book__ear-outer,
.hch-sticky-book:focus-visible .hch-sticky-book__ear-outer {
	fill: #d87e10;
}

.hch-sticky-book__ear--left {
	right: 40.27px;
	top: -2.09px;
	transform: rotate(-7.84deg);
}

.hch-sticky-book__ear--right {
	right: 10.09px;
	top: 1.92px;
	transform: rotate(10deg);
}

.hch-sticky-book:hover .hch-sticky-book__ear--left,
.hch-sticky-book:focus-visible .hch-sticky-book__ear--left {
	right: 44px;
	top: 0;
	width: 28px;
	height: 26px;
	transform: rotate(0deg);
}

.hch-sticky-book:hover .hch-sticky-book__ear--right,
.hch-sticky-book:focus-visible .hch-sticky-book__ear--right {
	right: 12px;
	top: 0;
	width: 28px;
	height: 26px;
	transform: rotate(0deg);
}

.hch-sticky-book__card {
	position: absolute;
	top: 18px;
	left: 0;
	right: 0;
	height: 132px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 12px 16px 16px;
	z-index: 2;
	background: #f19624;
	border-radius: 20px 0 0 20px;
	box-shadow: 0 2px 6px rgba(26, 13, 31, 0.08), 0 10px 28px rgba(64, 26, 82, 0.16);
	/* Hover orange and the lower tab top are from Figma node 2:333. */
	transition: background-color 0.28s ease, top 0.28s ease;
}

.hch-sticky-book:hover .hch-sticky-book__card,
.hch-sticky-book:focus-visible .hch-sticky-book__card {
	top: 22px;
	background: #d87e10;
}

.hch-sticky-book__paw {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.hch-sticky-book__label {
	color: #1a1a1a;
	font-family: Lato, sans-serif;
	font-size: 14px;
	font-weight: 900;
	line-height: 16px;
	/* Figma letter-spacing 4% of 14px. */
	letter-spacing: 0.56px;
	text-align: center;
	text-transform: uppercase;
}

/* Sits in the column under the label, inside the orange tab. */
.hch-sticky-book__expand {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	margin-top: auto;
	background: #ffffff;
	border-radius: 999px;
}

/* The file is a left chevron. The design rotates it so it points right. */
.hch-sticky-book__chevron {
	display: block;
	width: 16px;
	height: 16px;
	transform: rotate(180deg);
}

/*
 * The open mobile menu is full screen at z-index 19.
 * Drop the tab behind it so the menu links can be clicked.
 */
@media screen and (max-width: 940px) {
	body:has(.mobile-menu-section.active) .hch-sticky-book {
		z-index: 1;
		visibility: hidden;
		pointer-events: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hch-sticky-book,
	.hch-sticky-book__card,
	.hch-sticky-book__ear,
	.hch-sticky-book__ear-outer,
	.hch-sticky-book__expand {
		transition: none;
	}
}

@media print {
	.hch-sticky-book {
		display: none;
	}
}
