/* ZUZNEWS – release 2: RTL fixes, article meta bar, calculator box, progress bar, calculator tools.
   Loaded after the theme styles. Brand blue matches the theme options: #3b7dd3 / #3d82bf. */

/* ---------- 1. RTL fixes ---------- */

/* Previous / next article arrows point outward in Hebrew */
html[dir="rtl"] span.mvp-prev-arr,
html[dir="rtl"] span.mvp-next-arr {
	transform: scaleX(-1);
}

/* Comments: the reply button sits on the right, under the text, and is never pushed out of its box */
html[dir="rtl"] #comments .comment-reply {
	clear: both;
	overflow: hidden;
	padding-bottom: 12px;
}
html[dir="rtl"] #comments .comment-reply a {
	float: right;
	margin: 0;
}
html[dir="rtl"] ol.commentlist li.bypostauthor > .comment-wrapper > .comment-inner .comment-reply a,
html[dir="rtl"] .bypostauthor .comment-inner .comment-reply a {
	margin: 0;
}
html[dir="rtl"] ol.commentlist li.bypostauthor > .comment-wrapper > .comment-inner {
	padding: 15px 15px 0;
}
/* Names keep their real letter case */
#comments .comment-meta-1 .fn {
	text-transform: none;
}
/* Comment boxes never grow wider than the column (the author's grey box used to stick out on the left) */
#comments .comment-inner {
	box-sizing: border-box;
	max-width: 100%;
}
/* Nested replies: a clear line on the right shows which comment they answer */
html[dir="rtl"] #comments .children {
	display: flow-root;
	border-right: 2px solid #e5edf7;
	margin-right: 22px;
}
html[dir="rtl"] #comments .depth-2 .comment-wrapper,
html[dir="rtl"] #comments .depth-3 .comment-wrapper,
html[dir="rtl"] #comments .depth-4 .comment-wrapper,
html[dir="rtl"] #comments .depth-5 .comment-wrapper {
	padding: 0 18px 0 0;
}

/* "נושאים קשורים:" is hidden when the article has no tags */
.mvp-post-tags:has(> span[itemprop="keywords"]:empty) {
	display: none;
}

/* ---------- 2. Article meta bar ---------- */
.zuz-meta-bar {
	border-bottom: 1px solid #e8e8e8;
	color: #666;
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 6px 18px;
	justify-content: space-between;
	line-height: 1.6;
	margin: 0 0 22px;
	padding: 0 0 12px;
}
.zuz-meta-bar a,
#mvp-content-main .zuz-meta-bar a {
	box-shadow: none;
	color: #2f6fa8;
	text-decoration: none;
}
.zuz-meta-bar a:hover,
#mvp-content-main .zuz-meta-bar a:hover {
	background: none;
	text-decoration: underline;
}
.zuz-crumbs .breadcrumb_last {
	color: #666;
}
.zuz-meta-info {
	white-space: nowrap;
}
.zuz-sep {
	margin: 0 8px;
}

/* ---------- 4. Reading progress bar ---------- */
.zuz-progress {
	background: transparent;
	height: 3px;
	left: 0;
	pointer-events: none;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 999999;
}
.admin-bar .zuz-progress {
	top: 32px;
}
.zuz-progress span {
	background: #3b7dd3;
	display: block;
	height: 100%;
	transform: scaleX(0);
	transform-origin: right center;
	will-change: transform;
}

/* ---------- 5. Native share button (mobile bar) ---------- */
ul.mvp-soc-mob-list li.mvp-soc-mob-share {
	background: #555;
}

/* ---------- 6. Calculator tools: share result / print ---------- */
.zuz-calc-tools {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin: -24px auto 40px;
	max-width: 760px;
}
.zuz-calc-tools button {
	background: #fff;
	border: 1px solid #5aa1e3;
	border-radius: 8px;
	color: #2a62ab;
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	padding: 10px 18px;
}
.zuz-calc-tools button:hover {
	background: #f0f7fd;
}
.zuz-calc-tools .zuz-calc-toast {
	align-self: center;
	color: #2e7d32;
	font-size: 14px;
}
/* Printing is done from a separate frame that holds only the calculator (see zuz-enhance.js). */

/* ---------- 7. Section titles: real H1/H2 tags that look exactly like the theme's H4 titles ---------- */
.zuz-as-h4.mvp-widget-home-title {
	float: left;
	font-size: inherit;
	line-height: inherit;
	margin: 0 0 20px;
	position: relative;
	text-align: center;
	width: 100%;
}
.zuz-as-h4.mvp-widget-home-title:before {
	background: #555;
	bottom: 50%;
	content: '';
	display: inline-block;
	height: 1px;
	left: 0;
	position: absolute;
	width: 100%;
	z-index: 0;
}
html[dir="rtl"] .zuz-as-h4.mvp-widget-home-title {
	float: right;
}
html[dir="rtl"] .zuz-as-h4.mvp-widget-home-title:before {
	left: auto;
	right: 0;
}
.author .zuz-as-h4.mvp-widget-home-title {
	margin-bottom: 30px;
}
@media screen and (max-width: 479px) {
	.zuz-as-h4.mvp-widget-home-title {
		margin-bottom: 15px;
	}
}

/* ---------- 8. Readable text (WCAG AA contrast 4.5:1) ----------
   Greys the theme hard-codes are darkened slightly. Brand blues are handled in PHP. */
span.mvp-cd-cat,
span.mvp-cd-date,
#mvp-author-box-text p,
.mvp-post-add-main p.wp-caption-text,
#respond label {
	color: #666;
}
.mvp-post-tags a,
.mvp-post-tags a:visited {
	color: #666 !important;
}
span.mvp-feat1-list-but,
.mvp-author-info-text,
span.mvp-feat-caption,
span.mvp-author-box-soc,
span.comments,
#mvp-404 p {
	color: #6b6b6b;
}
.mvp-ad-label {
	color: #767676;
}
#respond .required {
	color: #c62828;
}
/* Dark sections keep a light grey date */
html .mvp-widget-dark-wrap span.mvp-cd-date {
	color: #aaa;
}
/* Author's own comment box is light grey: its name link needs a slightly darker blue */
#comments .bypostauthor .comment-meta-1 a,
#comments .bypostauthor .comment-meta-1 .fn a {
	color: #2d659b;
}
/* Simple Author Box website link */
.saboxplugin-wrap .saboxplugin-web a {
	color: #1f5f99 !important;
}
.comment-reply a,
#cancel-comment-reply-link {
	background: #666;
}
ul.mvp-soc-mob-list li.mvp-soc-mob-twit {
	background: #000;
}
/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid #1979ab;
	outline-offset: 2px;
}

/* ---------- 9. Mobile fixes (release 2.3) ---------- */
/* Mobile share bar: buttons share the width evenly, nothing wraps to a hidden second row.
   Closed bar: Facebook (wider, with its label), WhatsApp, share, comments.
   Open bar (after "..."): every button. */
ul.mvp-soc-mob-list {
	display: flex;
}
ul.mvp-soc-mob-list > a {
	display: block;
	flex: 1 1 0;
	min-width: 0;
}
#mvp-soc-mob-wrap ul.mvp-soc-mob-list > a > li {
	float: none;
	width: 100% !important; /* the theme sets fixed widths with !important */
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-twit),
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-pin),
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-email) {
	display: none;
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-fb) {
	flex-grow: 2;
	order: 1;
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-what) {
	order: 2;
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-share) {
	order: 3;
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list > a:has(> li.mvp-soc-mob-com) {
	order: 4;
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list li i {
	margin: 0;
}
#mvp-soc-mob-wrap:not(.mvp-soc-mob-more) ul.mvp-soc-mob-list li.mvp-soc-mob-fb i {
	margin: 0 0 0 8px;
}

@media screen and (max-width: 599px) {
	/* "Next / don't miss": full width on phones, so the desktop side margin pushed it off screen */
	.mvp-next-post-wrap,
	.mvp-prev-post-wrap {
		margin-left: 0;
		margin-right: 0;
	}
}

@media screen and (max-width: 479px) {
	/* Small thumbnails fill their box (no thin black strip beside them) */
	.mvp-post-more-img,
	.mvp-related-img,
	.mvp-feat1-pop-img,
	.mvp-widget-feat2-right-img,
	.mvp-widget-feat1-bot-img {
		background: transparent;
	}
	.mvp-post-more-img img.mvp-mob-img,
	.mvp-related-img img.mvp-mob-img,
	.mvp-feat1-pop-img img.mvp-mob-img,
	.mvp-widget-feat2-right-img img.mvp-mob-img,
	.mvp-widget-feat1-bot-img img.mvp-mob-img {
		width: 100%;
		height: auto;
	}
	/* Every fifth post in a list shows one large image: no small copy and black band under it */
	.mvp-blog-story-wrap:nth-child(5n+0) .mvp-mob-img {
		display: none !important;
	}
	.mvp-blog-story-wrap:nth-child(5n+0) .mvp-blog-story-img {
		background: transparent;
	}
}

/* ---------- 10. X (formerly Twitter) mark in the share buttons ---------- */
.zuz-x {
	color: #fff;
	display: inline-block;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1em;
	font-weight: 700;
	line-height: 1;
}
ul.mvp-soc-mob-list li .zuz-x {
	font-size: 20px;
	padding: 10px 0;
	vertical-align: top;
}
ul.mvp-alp-soc-list li .zuz-x {
	font-size: 14px;
	padding: 6px 0;
}
ul.mvp-soc-mob-list li.mvp-soc-mob-twit,
ul.mvp-alp-soc-list li.mvp-alp-soc-twit {
	background: #000;
}
