/**
 * VisualBlogger - UX layer styling (dark mode, share, feedback, breadcrumbs,
 * skip link, search highlight, a11y focus).
 */

/* ---- Dark mode toggle button ---- */
.vb-theme-toggle {
	position: fixed;
	bottom: 24px;
	left: 24px;
	width: 44px;
	height: 44px;
	font-size: 20px;
	line-height: 1;
	background: #1a1a2e;
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 9998;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.25 );
	opacity: 0.85;
}
.vb-theme-toggle:hover {
	opacity: 1;
}

/* ---- Site-wide dark mode ---- */
html.vb-dark body {
	background: #14141d;
}
html.vb-dark,
html.vb-dark body,
html.vb-dark .wp-block-post-content,
html.vb-dark .entry-content {
	color: #d7d7e0;
}
/* Flip the theme's "background" preset (used by content cards) to dark. */
html.vb-dark {
	--wp--preset--color--background: #1c1c28;
	--wp--preset--color--white: #1c1c28;
}
html.vb-dark .has-background-background-color,
html.vb-dark .has-white-background-color {
	background-color: #1c1c28 !important;
}
html.vb-dark a {
	color: #8ab4ff;
}
html.vb-dark .wp-block-post-content :is( h1, h2, h3, h4, h5, h6 ) {
	color: #f0f0f5;
}
html.vb-dark .vb-toc,
html.vb-dark .vb-filetree,
html.vb-dark .vb-references,
html.vb-dark .vb-faq-q,
html.vb-dark .vb-toc-float-panel {
	background: #20202e;
	border-color: #33334a;
	color: #d7d7e0;
}
html.vb-dark .vb-toc-float-panel a {
	color: #c2c2d2;
}
html.vb-dark .vb-faq-item {
	border-color: #33334a;
}
html.vb-dark .vb-toc-list a {
	color: #c2c2d2;
}
html.vb-dark .vb-reading-time {
	color: #c2c2d2;
}
html.vb-dark .vb-post-nav .wp-block-post-navigation-link {
	border-color: #33334a;
}
html.vb-dark kbd {
	color: #e6e6f0;
	background: #2a2a3c;
	border-color: #44445c;
	box-shadow: inset 0 -1px 0 #44445c;
}
html.vb-dark :not( pre ) > code {
	background: rgba( 255, 255, 255, 0.1 );
	color: #ff9db6;
}

/* ---- Skip to content ---- */
.vb-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	padding: 10px 16px;
	background: #1a1a2e;
	color: #fff;
	border-radius: 0 0 6px 0;
}
.vb-skip:focus {
	left: 0;
}

/* ---- Breadcrumbs ---- */
.vb-breadcrumbs {
	font-size: 13px;
	color: #777;
	margin: 0 0 0.6rem;
}
.vb-breadcrumbs a {
	text-decoration: none;
	color: #58a6ff;
}
.vb-bc-sep {
	margin: 0 0.45em;
	color: #aaa;
}

/* ---- Social share ---- */
.vb-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 2rem 0 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e3e8ef;
}
.vb-share-label {
	font-weight: 700;
	font-size: 14px;
}
.vb-share a,
.vb-share-copy {
	padding: 5px 12px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
}
.vb-share-x { background: #000; }
.vb-share-li { background: #0a66c2; }
.vb-share-fb { background: #1877f2; }
.vb-share-copy { background: #555; }

/* ---- Was this helpful ---- */
.vb-feedback {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 1rem 0 0;
	font-size: 14px;
}
.vb-feedback button {
	font-size: 18px;
	background: #f1f3f7;
	border: 1px solid #e3e8ef;
	border-radius: 8px;
	padding: 4px 12px;
	cursor: pointer;
}
.vb-feedback button:hover {
	background: #e6ebf3;
}

/* ---- Search highlight ---- */
mark.vb-hit {
	background: #fff3a3;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}

/* ---- Accessible focus ---- */
a:focus-visible,
button:focus-visible,
.vb-toc-list a:focus-visible,
.vb-tab-btn:focus-visible {
	outline: 2px solid #58a6ff;
	outline-offset: 2px;
}
