/* Quick-links toolbar + entries count.
 * Scoped to BOTH .gwolle-gb (front end) and .gwolle_gb (wp-admin) by writing
 * each selector twice. Never use a bare .gwolle-gb branch. */

.gwolle-gb .tbook-count-row,
	.gwolle_gb .tbook-count-row {
	display: flex;
	justify-content: flex-end;
	width: 100%;
	padding: 0 0 6px;
}
.gwolle-gb .tbook-count,
	.gwolle_gb .tbook-count {
	font-size: 13px;
	color: #4b5563;
	white-space: nowrap;
}
.gwolle-gb .tbook-count b,
	.gwolle_gb .tbook-count b {
	color: #111827;
	font-weight: 700;
}
.gwolle-gb .tbook-toolbar-row,
	.gwolle_gb .tbook-toolbar-row {
	width: 100%;
}
.gwolle-gb .tbook-toolbar,
	.gwolle_gb .tbook-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	/* Inset from the article's borders instead of running edge to edge. 90% of
	 * the article width, centred, so the gutter scales with the column; the
	 * clamp guarantees at least a 6px gap on each side even when the article is
	 * very narrow, which a bare 90% would shrink below. */
	width: 90%;
	max-width: calc(100% - 12px);
	margin-left: auto;
	margin-right: auto;
	gap: var(--tbook-tb-gap, 5px);
	padding: 8px 0 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid #eceff1;
}
.gwolle-gb .tbook-toolbar .nm-item,
	.gwolle_gb .tbook-toolbar .nm-item {
	display: inline-flex;
	align-items: center;
	gap: var(--tbook-tb-item-gap, 7px);
	text-decoration: none;
	color: #4b5563;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.gwolle-gb .tbook-toolbar .nm-item:hover,
	.gwolle_gb .tbook-toolbar .nm-item:hover {
	color: #111827;
}
.gwolle-gb .tbook-toolbar .nm-item:focus-visible,
	.gwolle_gb .tbook-toolbar .nm-item:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
	border-radius: 6px;
}
.gwolle-gb .tbook-toolbar .nm-ico,
	.gwolle_gb .tbook-toolbar .nm-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.gwolle-gb .tbook-toolbar .nm-ico svg,
	.gwolle_gb .tbook-toolbar .nm-ico svg {
	display: block;
	width: var(--tbook-tb-icon, 17px);
	height: var(--tbook-tb-icon, 17px);
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.gwolle-gb .tbook-toolbar .nm-ico img,
	.gwolle_gb .tbook-toolbar .nm-ico img {
	display: block;
	width: var(--tbook-tb-icon, 17px);
	height: var(--tbook-tb-icon, 17px);
	object-fit: contain;
	border-radius: 2px;
}
.gwolle-gb .tbook-toolbar .nm-label,
	.gwolle_gb .tbook-toolbar .nm-label {
	font-size: var(--tbook-tb-label, 13px);
	line-height: 1.3;
	white-space: nowrap;
}
.gwolle-gb .tbook-toolbar.nm-current .nm-item,
	.gwolle_gb .tbook-toolbar.nm-current .nm-item {
	padding: 5px 4px;
	color: var(--tbook-tb-text, #4b5563);
}
.gwolle-gb .tbook-toolbar.nm-chips .nm-item,
	.gwolle_gb .tbook-toolbar.nm-chips .nm-item {
	padding: 6px 11px;
	border: var(--tbook-tb-border-w, 1px) solid var(--tbook-tb-border, #e5e7eb);
	border-radius: var(--tbook-tb-radius, 999px);
	background: var(--tbook-tb-fill, #fff);
	color: var(--tbook-tb-text, #4b5563);
}
.gwolle-gb .tbook-toolbar.nm-chips .nm-item:hover,
	.gwolle_gb .tbook-toolbar.nm-chips .nm-item:hover {
	border-color: var(--tbook-tb-border-hover, #d1d5db);
	background: var(--tbook-tb-fill-hover, #f9fafb);
}
.gwolle-gb .tbook-toolbar.nm-soft .nm-item,
	.gwolle_gb .tbook-toolbar.nm-soft .nm-item {
	padding: 6px 11px;
	border: var(--tbook-tb-border-w, 0) solid var(--tbook-tb-border, transparent);
	border-radius: var(--tbook-tb-radius, 8px);
	background: var(--tbook-tb-fill, #f3f4f6);
	color: var(--tbook-tb-text, #4b5563);
}
.gwolle-gb .tbook-toolbar.nm-soft .nm-item:hover,
	.gwolle_gb .tbook-toolbar.nm-soft .nm-item:hover {
	background: var(--tbook-tb-fill-hover, #e5e7eb);
}
.gwolle-gb .tbook-toolbar.nm-segmented,
	.gwolle_gb .tbook-toolbar.nm-segmented {
	gap: 0;
}
.gwolle-gb .tbook-toolbar.nm-segmented .nm-item,
	.gwolle_gb .tbook-toolbar.nm-segmented .nm-item {
	padding: 7px 12px;
	border: var(--tbook-tb-border-w, 1px) solid var(--tbook-tb-border, #e5e7eb);
	margin-left: -1px;
	background: var(--tbook-tb-fill, #fff);
	color: var(--tbook-tb-text, #4b5563);
	position: relative;
}
.gwolle-gb .tbook-toolbar.nm-segmented .nm-item:first-child,
	.gwolle_gb .tbook-toolbar.nm-segmented .nm-item:first-child {
	margin-left: 0;
	border-radius: 8px 0 0 8px;
}
.gwolle-gb .tbook-toolbar.nm-segmented .nm-item:last-child,
	.gwolle_gb .tbook-toolbar.nm-segmented .nm-item:last-child {
	border-radius: 0 8px 8px 0;
}
.gwolle-gb .tbook-toolbar.nm-segmented .nm-item:hover,
	.gwolle_gb .tbook-toolbar.nm-segmented .nm-item:hover {
	background: var(--tbook-tb-fill-hover, #f9fafb);
	z-index: 2;
}
.gwolle-gb .tbook-toolbar.nm-icons,
	.gwolle_gb .tbook-toolbar.nm-icons {
	gap: 2px;
}
.gwolle-gb .tbook-toolbar.nm-icons .nm-item,
	.gwolle_gb .tbook-toolbar.nm-icons .nm-item {
	padding: 6px;
	border-radius: 8px;
}
.gwolle-gb .tbook-toolbar.nm-icons .nm-label,
	.gwolle_gb .tbook-toolbar.nm-icons .nm-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}
.gwolle-gb .tbook-toolbar-preview,
	.gwolle_gb .tbook-toolbar-preview {
	display: block;
}
.gwolle-gb .tbook-toolbar-preview .tbook-count-row,
	.gwolle_gb .tbook-toolbar-preview .tbook-count-row {
	display: flex;
	justify-content: flex-start;
	padding: 0 0 6px;
}
.gwolle-gb .tbook-toolbar-preview .tbook-toolbar,
	.gwolle_gb .tbook-toolbar-preview .tbook-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	width: auto;
	padding: 4px 0 0;
	margin-bottom: 0;
	border-bottom: 0;
}
.gwolle-gb .tbook-toolbar-preview .nm-item,
	.gwolle_gb .tbook-toolbar-preview .nm-item {
	display: inline-flex;
	align-items: center;
	gap: var(--tbook-tb-item-gap, 7px);
	color: #4b5563;
	cursor: default;
}
@media (max-width: 782px) {
	.gwolle_gb .tbook-toolbar,
	.gwolle-gb .tbook-toolbar {
		gap: 4px;
}
	.gwolle_gb .tbook-toolbar .nm-item,
	.gwolle-gb .tbook-toolbar .nm-item {
		padding: 5px 8px;
}
	.gwolle_gb .tbook-toolbar .nm-label,
	.gwolle-gb .tbook-toolbar .nm-label {
		font-size: 12px;
}
}
@media (prefers-reduced-motion: reduce) {
	.gwolle_gb .tbook-toolbar .nm-item,
	.gwolle-gb .tbook-toolbar .nm-item {
		transition: none;
		transform: none;
}
}
.gwolle_gb .tbook-toolbar-preview-empty,
	.gwolle-gb .tbook-toolbar-preview-empty {
	display: block;
	padding: 8px 0;
	font-size: 12px;
	font-style: italic;
	color: #8c8f94;
}

/* Popup quick links (5.4.56).
 *
 * A popup item is a <button> so it cannot be opened in a new tab or followed
 * by the browser; the reset below only provides what the toolbar's chip styles
 * do not already set, since those have higher specificity. */
.gwolle-gb .tbook-toolbar button.nm-item,
	.gwolle_gb .tbook-toolbar button.nm-item {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: none;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
}
.gwolle-gb .tbook-tb-modal,
	.gwolle_gb .tbook-tb-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.gwolle-gb .tbook-tb-modal[hidden],
	.gwolle_gb .tbook-tb-modal[hidden] {
	display: none;
}
.gwolle-gb .tbook-tb-modal-backdrop,
	.gwolle_gb .tbook-tb-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 24, 0.62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
.gwolle-gb .tbook-tb-modal-dialog,
	.gwolle_gb .tbook-tb-modal-dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: var(--tbook-tb-modal-w, 720px);
	height: var(--tbook-tb-modal-h, 480px);
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.gwolle-gb .tbook-tb-modal-closebar,
	.gwolle_gb .tbook-tb-modal-closebar {
	flex: 0 0 auto;
	display: block;
	width: 100%;
	margin: 0;
	padding: 7px 12px;
	border: 0;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
	color: #6b7280;
	font: inherit;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.55em;
	text-indent: 0.55em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.gwolle-gb .tbook-tb-modal-closebar:hover,
	.gwolle_gb .tbook-tb-modal-closebar:hover {
	background: #eef2f7;
	color: #111827;
}
.gwolle-gb .tbook-tb-modal-closebar:focus-visible,
	.gwolle_gb .tbook-tb-modal-closebar:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: -2px;
}
.gwolle-gb .tbook-tb-modal-body,
	.gwolle_gb .tbook-tb-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}
.gwolle-gb .tbook-tb-modal-body iframe,
	.gwolle_gb .tbook-tb-modal-body iframe {
	display: block;
	width: 100%;
	/* The dialog owns the height; an iframe's own height attribute would
	 * otherwise overflow the body once the CLOSE bar takes its share. */
	height: 100% !important;
	min-height: 0;
	border: 0;
}
body.tbook-tb-modal-open {
	overflow: hidden;
}
@media (max-width: 600px) {
	.gwolle-gb .tbook-tb-modal,
		.gwolle_gb .tbook-tb-modal {
		padding: 8px;
	}
	.gwolle-gb .tbook-tb-modal-dialog,
		.gwolle_gb .tbook-tb-modal-dialog {
		/* Full width on phones, but honour the configured height instead of
		 * filling the viewport; the flex parent keeps it vertically centred. */
		width: 100%;
		max-width: none;
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
		border-radius: 10px;
	}
}
