/* TA Catalog viewer - see catalog.js. Every rule is under .tac / .tac-zoom so the store theme is untouched,
   and the theme's own button/input styles are reset where it matters. */

.tac {
	--tac-accent: #0d3b8e;
	--tac-ink: #1d2433;
	--tac-muted: #5b6476;
	--tac-line: #dde2ea;
	--tac-soft: #eef2f8;
	--tac-desk: #e9ecf1;
	position: relative;
	margin: 6px 0 26px;
	color: var(--tac-ink);
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
}

.tac *, .tac *::before, .tac *::after,
.tac-zoom *, .tac-zoom *::before, .tac-zoom *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- before the script runs */

.tac-boot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 28px 12px;
	background: var(--tac-desk);
	border: 1px solid var(--tac-line);
	border-radius: 10px;
}

.tac-boot-cover {
	display: block;
	width: min(420px, 78%);
	height: auto;
	background: #fff;
	box-shadow: 0 12px 34px rgba(20, 30, 50, .2), 0 2px 6px rgba(20, 30, 50, .12);
}

.tac-boot-msg {
	margin: 0;
	font-size: 15px;
	color: var(--tac-muted);
	text-align: center;
}

.tac-boot-msg a {
	color: var(--tac-accent);
	font-weight: 600;
}

/* ---------------------------------------------------------------- toolbar */

.tac-bar {
	position: -webkit-sticky;
	position: sticky;
	top: var(--tac-sticky, 0px);
	z-index: 7;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 8px;
	background: #fff;
	border: 1px solid var(--tac-line);
	border-radius: 10px 10px 0 0;
}

.tac-group {
	display: flex;
	align-items: center;
	gap: 2px;
	min-width: 0;
}

/* the side groups keep their buttons' width (equal-width groups made the right one spill over Next on phones);
   space-between on the bar spreads what is left */
.tac-group-left, .tac-group-right {
	flex: 0 0 auto;
}

.tac-group-right {
	justify-content: flex-end;
}

.tac .tac-btn, .tac-zoom .tac-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto;
	min-width: 38px;
	height: 38px;
	min-height: 0;
	margin: 0;
	padding: 0 9px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: var(--tac-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.tac .tac-btn svg, .tac-zoom .tac-btn svg, .tac-nav svg {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tac .tac-btn:hover, .tac .tac-btn:focus-visible {
	background: var(--tac-soft);
	color: var(--tac-accent);
	text-decoration: none;
}

.tac .tac-btn:focus-visible, .tac-zoom .tac-btn:focus-visible, .tac-nav:focus-visible,
.tac-pageinput:focus-visible, .tac-search-input:focus-visible, .tac-toc-item:focus-visible,
.tac-thumb:focus-visible, .tac-hit:focus-visible, .tac-tab:focus-visible {
	outline: 2px solid var(--tac-accent);
	outline-offset: 1px;
}

.tac .tac-btn:disabled, .tac-zoom .tac-btn:disabled {
	opacity: .32;
	cursor: default;
	background: transparent;
	color: var(--tac-ink);
}

.tac .tac-btn--on {
	background: var(--tac-soft);
	color: var(--tac-accent);
}

.tac-pagebox {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	height: 38px;
	margin: 0 2px;
	padding: 0 10px;
	border: 1px solid var(--tac-line);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	cursor: text;
}

.tac .tac-pageinput {
	width: 4ch;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 2px 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
	color: var(--tac-ink);
	font: inherit;
	text-align: center;
}

.tac-pagetotal {
	color: var(--tac-muted);
	font-weight: 500;
}

/* ---------------------------------------------------------------- stage + book */

.tac-stage {
	position: relative;
	isolation: isolate;   /* the drawer's z-index stays under the sticky toolbar */
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 38%, #fafbfc 0%, var(--tac-desk) 78%);
	border: 1px solid var(--tac-line);
	border-top: 0;
	border-radius: 0 0 10px 10px;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
}

.tac-book {
	position: relative;
	flex: none;
	perspective: 2800px;
}

.tac-slot {
	position: absolute;
	top: 0;
	width: var(--tac-page-w);
	height: var(--tac-page-h);
}

.tac-slot-l {
	left: 0;
}

.tac-slot-r {
	left: var(--tac-page-w);
}

.tac--spread .tac-slot:not(.tac-slot--empty) {
	box-shadow: 0 14px 34px rgba(20, 30, 50, .18), 0 2px 6px rgba(20, 30, 50, .12);
}

.tac--single .tac-slot, .tac--spread .tac-track, .tac--single .tac-spine {
	display: none;
}

.tac-page {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #fff center / 100% 100% no-repeat;
}

.tac-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	pointer-events: none;
	-webkit-user-drag: none;
	transition: opacity .25s ease;
}

.tac-img--loading {
	opacity: 0;
}

/* binding: a soft shadow along the spine of each page */
.tac--spread .tac-page--even::after, .tac--spread .tac-page--odd::after,
.tac-zoom .tac-page::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 9%;
	pointer-events: none;
}

.tac--spread .tac-page--even::after {
	right: 0;
	background: linear-gradient(to left, rgba(0, 0, 0, .13), rgba(0, 0, 0, .03) 40%, rgba(0, 0, 0, 0));
}

.tac--spread .tac-page--odd::after {
	left: 0;
	background: linear-gradient(to right, rgba(0, 0, 0, .11), rgba(0, 0, 0, .03) 40%, rgba(0, 0, 0, 0));
}

.tac-zoom .tac-page::after {
	display: none;
}

.tac-spine {
	position: absolute;
	top: 0;
	left: calc(var(--tac-page-w) - 1px);
	width: 2px;
	height: 100%;
	background: rgba(0, 0, 0, .07);
	pointer-events: none;
	z-index: 3;
}

/* the turning page */
.tac-leaf {
	position: absolute;
	top: 0;
	z-index: 5;
	width: var(--tac-page-w);
	height: var(--tac-page-h);
	transform-style: preserve-3d;
	will-change: transform;
	pointer-events: none;
}

.tac-leaf--r {
	left: var(--tac-page-w);
	transform-origin: left center;
}

.tac-leaf--l {
	left: 0;
	transform-origin: right center;
}

.tac-face {
	position: absolute;
	inset: 0;
	overflow: hidden;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	box-shadow: 0 6px 22px rgba(20, 30, 50, .18);
}

.tac-face--back {
	transform: rotateY(180deg);
}

.tac-shade {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}

.tac-leaf--r .tac-face--front .tac-shade, .tac-leaf--l .tac-face--back .tac-shade {
	background: linear-gradient(to right, rgba(0, 0, 0, .42), rgba(0, 0, 0, .08) 45%, rgba(255, 255, 255, .06) 75%, rgba(0, 0, 0, 0));
}

.tac-leaf--r .tac-face--back .tac-shade, .tac-leaf--l .tac-face--front .tac-shade {
	background: linear-gradient(to left, rgba(0, 0, 0, .42), rgba(0, 0, 0, .08) 45%, rgba(255, 255, 255, .06) 75%, rgba(0, 0, 0, 0));
}

.tac-cast {
	position: absolute;
	top: 0;
	z-index: 4;
	height: var(--tac-page-h);
	opacity: 0;
	pointer-events: none;
}

.tac-cast--r {
	left: var(--tac-page-w);
	background: linear-gradient(to right, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0));
}

.tac-cast--l {
	right: var(--tac-page-w);
	background: linear-gradient(to left, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0));
}

/* one page at a time (phones, narrow columns): the pages slide */
.tac--single .tac-book {
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(20, 30, 50, .18), 0 2px 6px rgba(20, 30, 50, .12);
}

.tac-track {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	width: calc(3 * var(--tac-page-w));
	height: var(--tac-page-h);
	transform: translateX(calc(-1 * var(--tac-page-w)));
	will-change: transform;
}

.tac-cell {
	position: relative;
	flex: 0 0 var(--tac-page-w);
	height: 100%;
	background: #fff;
}

/* the outer edge turns the page on click */
.tac--edge-r .tac-stage, .tac--edge-l .tac-stage {
	cursor: pointer;
}

.tac--edge-r .tac-slot-r::after, .tac--edge-l .tac-slot-l::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 22%;
	pointer-events: none;
	z-index: 2;
}

.tac--edge-r .tac-slot-r::after {
	right: 0;
	background: linear-gradient(to left, rgba(0, 0, 0, .09), rgba(0, 0, 0, 0));
}

.tac--edge-l .tac-slot-l::after {
	left: 0;
	background: linear-gradient(to right, rgba(0, 0, 0, .09), rgba(0, 0, 0, 0));
}

.tac-nav {
	position: absolute;
	top: 50%;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 66px;
	margin: -33px 0 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .88);
	box-shadow: 0 2px 10px rgba(20, 30, 50, .15);
	color: var(--tac-ink);
	cursor: pointer;
	transition: opacity .2s, color .15s, background-color .15s;
}

.tac-nav:hover {
	background: #fff;
	color: var(--tac-accent);
}

.tac-nav svg {
	width: 26px;
	height: 26px;
}

.tac-nav-prev {
	left: 8px;
}

.tac-nav-next {
	right: 8px;
}

.tac-nav:disabled {
	opacity: 0;
	pointer-events: none;
}

/* ---------------------------------------------------------------- things on a page */

.tac-hot {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.tac--turning .tac-hot {
	pointer-events: none;
}

.tac .tac-link, .tac .tac-code, .tac-zoom .tac-link, .tac-zoom .tac-code {
	position: absolute;
	display: block;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.tac .tac-link:hover, .tac .tac-link:focus-visible, .tac-zoom .tac-link:hover {
	background: rgba(13, 59, 142, .09);
	outline: 1px solid rgba(13, 59, 142, .35);
}

.tac .tac-code:hover, .tac .tac-code:focus-visible, .tac-zoom .tac-code:hover, .tac-zoom .tac-code:focus-visible {
	background: rgba(255, 190, 0, .3);
	outline: 1px solid rgba(176, 116, 0, .75);
}

.tac-hl {
	position: absolute;
	pointer-events: none;
	border-radius: 2px;
	background: rgba(255, 214, 0, .42);
	mix-blend-mode: multiply;
	animation: tac-pulse 1.1s ease-in-out 2;
}

@keyframes tac-pulse {
	50% {
		background: rgba(255, 170, 0, .62);
	}
}

/* ---------------------------------------------------------------- tooltip, toast, screen reader */

.tac-tip {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 9px;
	border-radius: 6px;
	background: #1d2433;
	color: #fff;
	font-size: 13px;
	line-height: 1.2;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .12s;
}

.tac-tip--on {
	opacity: 1;
}

.tac-tip svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: #fff;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tac-toast {
	position: absolute;
	bottom: 16px;
	left: 50%;
	z-index: 21;
	max-width: 90%;
	padding: 9px 14px;
	border-radius: 8px;
	background: #1d2433;
	color: #fff;
	font-size: 14px;
	line-height: 1.35;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition: opacity .2s, transform .2s;
}

.tac-toast--on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.tac-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- drawer */

.tac-scrim {
	position: absolute;
	inset: 0;
	z-index: 8;
	background: rgba(15, 20, 30, .2);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}

.tac-scrim--on {
	opacity: 1;
	pointer-events: auto;
}

.tac-drawer {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 9;
	display: flex;
	flex-direction: column;
	width: min(390px, 92%);
	background: #fff;
	box-shadow: 10px 0 34px rgba(15, 20, 30, .18);
	transform: translateX(-104%);
	transition: transform .22s ease, visibility 0s linear .22s;
	visibility: hidden;
}

.tac-drawer--open {
	transform: none;
	visibility: visible;
	transition: transform .22s ease;
}

.tac-drawer-head {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 8px 0 10px;
	border-bottom: 1px solid var(--tac-line);
}

.tac-tabs {
	display: flex;
	flex: 1;
	gap: 4px;
}

.tac .tac-tab {
	-webkit-appearance: none;
	appearance: none;
	margin: 0 0 -1px;
	padding: 10px 10px 9px;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--tac-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.tac .tac-tab:hover {
	color: var(--tac-ink);
}

.tac .tac-tab--on {
	border-bottom-color: var(--tac-accent);
	color: var(--tac-accent);
}

.tac-drawer-body {
	position: relative;   /* offsetParent for the thumbnail scroll in markThumbs() */
	flex: 1;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 10px;
}

.tac-empty {
	margin: 10px 4px;
	color: var(--tac-muted);
	font-size: 14px;
	line-height: 1.45;
}

.tac-toc {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tac .tac-toc-item {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: baseline;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 9px 8px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	box-shadow: none;
	color: var(--tac-ink);
	font: inherit;
	font-size: 14px;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
}

.tac .tac-toc-item:hover {
	background: var(--tac-soft);
	color: var(--tac-accent);
}

.tac-toc-name {
	flex: 1;
}

.tac-toc-page {
	flex: none;
	color: var(--tac-muted);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.tac-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 12px 10px;
}

.tac .tac-thumb {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 4px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	box-shadow: none;
	color: var(--tac-muted);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.tac-thumb img {
	display: block;
	width: 100%;
	height: auto;
	background: #fff center / 100% 100% no-repeat;
	box-shadow: 0 2px 8px rgba(20, 30, 50, .18);
}

.tac .tac-thumb:hover {
	background: var(--tac-soft);
}

.tac .tac-thumb--on {
	background: var(--tac-soft);
	color: var(--tac-accent);
}

.tac-thumb--on img {
	outline: 3px solid var(--tac-accent);
	outline-offset: 1px;
}

.tac-search {
	margin: 0 0 8px;
}

.tac .tac-search-input {
	display: block;
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--tac-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--tac-ink);
	font: inherit;
	font-size: 16px;   /* 16 px stops iPhones zooming the page on focus */
}

.tac-results-head {
	margin: 6px 4px 8px;
	color: var(--tac-muted);
	font-size: 13px;
	font-weight: 600;
}

.tac .tac-hit {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: 100%;
	margin: 0 0 4px;
	padding: 8px 9px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	box-shadow: none;
	color: var(--tac-ink);
	font: inherit;
	font-size: 13px;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.tac .tac-hit:hover {
	background: var(--tac-soft);
}

.tac-hit-page {
	color: var(--tac-accent);
	font-weight: 700;
}

.tac-hit-line {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tac-hit-line mark {
	padding: 0 1px;
	border-radius: 2px;
	background: rgba(255, 214, 0, .55);
	color: inherit;
}

.tac-hit-more {
	color: var(--tac-muted);
	font-size: 12px;
}

/* ---------------------------------------------------------------- zoom */

.tac-zoom {
	--tac-accent: #0d3b8e;
	--tac-ink: #fff;
	position: fixed;
	inset: 0;
	z-index: 2147483647;   /* = Journal3's cookie bar; appended to <body> after it, so on top */
	display: flex;
	flex-direction: column;
	background: #1b1e24;
	color: #fff;
	font-family: inherit;
}

.tac-zoom-view {
	position: relative;
	flex: 1;
	overflow: hidden;
	touch-action: none;
	cursor: zoom-in;
	-webkit-user-select: none;
	user-select: none;
}

.tac-zoom--in .tac-zoom-view {
	cursor: grab;
}

.tac-zoom-sheet {
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: 0 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
}

.tac-zoom-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 8px;
	background: #111317;
}

.tac-zoom .tac-btn {
	color: #fff;
}

.tac-zoom .tac-btn:hover, .tac-zoom .tac-btn:focus-visible {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

.tac-zoom .tac-btn:focus-visible, .tac-zoom .tac-link:focus-visible, .tac-zoom .tac-code:focus-visible {
	outline: 2px solid #fff;   /* the brand colours are too dark on the black bar */
	outline-offset: 2px;
}

.tac-zoom .tac-btn:disabled {
	color: #fff;
}

.tac-zoom-label {
	min-width: 112px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.tac-zoom-close {
	margin-left: 10px !important;
}

/* ---------------------------------------------------------------- full screen / fill the window */

.tac.tac--max, .tac:fullscreen {
	position: fixed;
	inset: 0;
	z-index: 2147483647;   /* moved to the end of <body> by fillWindow(), so this also beats the cookie bar */
	display: flex;
	flex-direction: column;
	margin: 0;
	background: var(--tac-desk);
}

.tac:-webkit-full-screen {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483647;
	display: flex;
	flex-direction: column;
	margin: 0;
	background: var(--tac-desk);
}

.tac--max .tac-bar, .tac:fullscreen .tac-bar {
	border-width: 0 0 1px;
	border-radius: 0;
}

.tac--max .tac-stage, .tac:fullscreen .tac-stage {
	flex: 1 1 auto;
	border: 0;
	border-radius: 0;
}

.tac:-webkit-full-screen .tac-stage {
	flex: 1 1 auto;
	border: 0;
	border-radius: 0;
}

html.tac-lock, html.tac-lock body {
	overflow: hidden !important;
}

/* ---------------------------------------------------------------- smaller screens */

@media (max-width: 899px) {
	.tac .tac-wide, .tac .tac-btn-text {
		display: none;
	}
}

@media (max-width: 599px) {
	.tac:not(.tac--max) {
		margin: 4px 0 20px;   /* no negative sides: Journal3's phone layout has no padding to borrow */
	}

	.tac-bar {
		gap: 2px;
		padding: 4px;
	}

	.tac .tac-btn {
		min-width: 34px;
		padding: 0 6px;
	}

	.tac .tac-b-pages {
		display: none;
	}

	.tac-pagebox {
		padding: 0 6px;
	}

	.tac-nav {
		display: none;
	}

	.tac-drawer {
		width: 100%;
	}
}

@media (max-width: 420px) {
	/* 360-375 px phones: the bar's eight controls fit without touching */
	.tac .tac-btn {
		min-width: 30px;
		padding: 0 4px;
	}

	.tac-pagebox {
		margin: 0;
		padding: 0 5px;
	}

	.tac-zoom-bar {
		flex-wrap: wrap;
		gap: 2px;
		padding: 6px 4px;
	}

	.tac-zoom .tac-btn {
		min-width: 34px;
		padding: 0 5px;
	}

	.tac-zoom-label {
		min-width: 0;
		padding: 0 4px;
	}

	.tac-zoom-close {
		margin-left: 0 !important;
	}
}

@media (pointer: coarse) {
	.tac .tac-pageinput {
		font-size: 16px;   /* under 16 px iPhone Safari zooms the whole page when the box is tapped */
	}
}

@media (prefers-reduced-motion: reduce) {
	.tac-drawer, .tac-toast, .tac-img, .tac-scrim {
		transition: none;
	}

	.tac-hl {
		animation: none;
	}
}

@media print {
	.tac-bar, .tac-nav, .tac-drawer, .tac-scrim, .tac-toast, .tac-tip {
		display: none !important;
	}
}

/* fit width: the pages are taller than the window; the side arrows follow the part on screen (positionNav) */
.tac--fit-width .tac-nav {
	transition: opacity .2s, color .15s, background-color .15s, top .12s ease-out;
}

@media (max-width: 599px) {
	.tac .tac-b-fit {
		display: none;   /* a phone page is always as wide as the screen */
	}
}

/* a click on a page zooms in there (the outer edges turn the page instead: see .tac--edge-*) */
.tac .tac-page {
	cursor: zoom-in;
}

.tac--edge-r .tac-page, .tac--edge-l .tac-page, .tac--turning .tac-page {
	cursor: pointer;
}

/* magnifying glass: follows the mouse over the pages; pointer-events none, so every click lands on the page */
.tac-lens {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 19;
	width: 600px;
	height: 170px;
	border-radius: 10px;
	/* a faint line marks the row the mouse is on */
	background: #fff no-repeat;
	box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(20, 30, 50, .35), 0 12px 34px rgba(20, 30, 50, .38);
	opacity: 0;
	pointer-events: none;
	transition: opacity .12s;
	will-change: transform;
}

.tac-lens::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 0;
	border-top: 1px dashed rgba(13, 59, 142, .35);
}

.tac-lens--on {
	opacity: 1;
}

.tac--loupe .tac-page {
	cursor: crosshair;
}

.tac--loupe.tac--edge-r .tac-page, .tac--loupe.tac--edge-l .tac-page {
	cursor: pointer;
}

/* touch screens have no hover: no magnifying glass button there (pinch / Zoom instead) */
@media (hover: none), (max-width: 599px) {
	.tac .tac-b-loupe, .tac-lens {
		display: none;
	}
}

/* live stock in the EDP tooltip */
.tac-tip-stock:not(:empty) {
	padding: 2px 7px;
	border-radius: 4px;
	background: rgba(255, 255, 255, .14);
	font-weight: 700;
}

.tac-tip-stock--in {
	background: #1e7d3a !important;
}

.tac-tip-stock--out {
	background: #a5321f !important;
}

.tac-tip-stock--wait {
	font-weight: 400 !important;
	opacity: .8;
}

/* catalog picker (a box on a store with more than one catalog) */
.tac-shelf {
	position: absolute;
	z-index: 22;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 260px;
	max-width: min(380px, 92vw);
	padding: 6px;
	border: 1px solid var(--tac-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(15, 20, 30, .2);
}

.tac .tac-shelf-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 8px;
	border-radius: 8px;
	color: var(--tac-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.tac a.tac-shelf-item:hover, .tac a.tac-shelf-item:focus-visible {
	background: var(--tac-soft);
	color: var(--tac-accent);
	text-decoration: none;
	outline: none;
}

.tac-shelf-item--on {
	color: var(--tac-muted) !important;
}

.tac-shelf-item img {
	flex: none;
	width: 46px;
	height: auto;
	box-shadow: 0 2px 6px rgba(20, 30, 50, .2);
}
