/*
 * mw-rtl.css — theme-INDEPENDENT RTL mirrors for ar/he pages.
 * Loaded by mu-plugins/mw-rtl.php ONLY when is_rtl(); never on LTR pages.
 *
 * Scope NOW (2026-07-15 RTL prep, investigation REPORT.md §W2):
 *   1. Custom WPRM `template-final` card rules that lack .rtl mirrors.
 *   2. Corrective rule for the zero-width-space-corrupted .rtl checkbox
 *      selector shipped in WPRM premium dist/public-elite.css.
 *   3. mwmf overlay close-button offsets.
 * Foodica theme mirrors are deliberately ABSENT until the 5.x theme update
 * lands (see the placeholder section at the bottom).
 */

/* ---- 1. WPRM template-final card ---------------------------------- */

/* Equipment list bullet indent: the template CSS hardcodes
   margin-left:20px / padding-left:5px with !important, so the mirrors
   need !important too (higher specificity then wins the tie). */
.rtl .wprm-recipe-equipment-item {
	margin-left: 0 !important;
	margin-right: 20px !important;
}
.rtl .wprm-recipe-equipment-name {
	padding-left: 0 !important;
	padding-right: 5px !important;
}

/* Image-overlay title block: the template sets text-align:left. Its
   left:5% / right:5% offsets are symmetric, so only the alignment needs
   mirroring. */
.rtl .wprm-recipe-template-template-final-overlay-container {
	text-align: right;
}

/* Same mirror for the print template's overlay container (its equipment
   rules don't exist and its li margins already ship a .rtl mirror). */
.rtl .wprm-recipe-template-template-final-avec-imprimer-bloqu-overlay-container {
	text-align: right;
}

/* ---- 2. WPRM elite checkbox corrective ----------------------------- */

/* dist/public-elite.css ships
   `.rtl <U+200B>.wprm-checkbox-container label:before{right:...}` with a
   zero-width space (U+200B) inside the selector — browsers drop the whole
   rule, so in RTL the ingredient-checkbox box never repositions. Clean
   equivalent, with an explicit left reset. */
.rtl .wprm-checkbox-container label:before {
	left: auto;
	right: var(--wprm-list-checkbox-left-position);
}

/* ---- 3. mwmf overlay close buttons --------------------------------- */

/* mwmf.css pins the modal/spotlight close buttons top-right; mirror to
   top-left on RTL pages. (The slide-in stays bottom-left by design — it
   avoids the ad-adhesion zone — and the honeypot offset is direction-
   irrelevant.) */
.rtl .mwmf-close {
	right: auto;
	left: .4rem;
}
.rtl .mwmf-spotlight-close {
	right: auto;
	left: .3rem;
}


/* ====================================================================
 * THEME MIRRORS — Foodica 5.2.2 (added 2026-07-15)
 *
 * Mirrors for the direction-hardcoded rules of the two theme sheets the
 * site actually serves: style.css + css/media-queries.min.css (verified
 * against the live handle list; minimal-layout / recipe-index /
 * woocommerce / 404 / color-scheme sheets are not enqueued here).
 * Every rule is scoped under .rtl (body class set by WPML on ar/he).
 * Breakpoint mirrors reproduce the STOCK media-query structure so the
 * cascade stays intact at every width (the stock sheets load before
 * this file, so unscoped stock overrides would otherwise lose to the
 * higher-specificity .rtl base mirrors).
 *
 * DELIBERATELY NOT MIRRORED (see THEME-MIRRORS-REPORT.md):
 *  - .alignleft/.alignright/.floatleft/.floatright — physical editorial
 *    alignment classes, kept physical per WP core RTL convention;
 *  - .sf-menu>li{float:left} — overridden by .main-navbar .sf-menu>li
 *    {float:none;display:inline-block} for the only rendered menu; a
 *    .rtl float mirror would WIN that tie and break the centered nav;
 *  - all .desktop_header_layout_compact / .wpz_layout_centered /
 *    slider / flickity / woocommerce / footer-widgets / tag-cloud /
 *    recipe-index rules — markup absent on this site (verified).
 * ==================================================================== */

/* ---- T1. Global content direction ---------------------------------- */

/* Global list indent (style.css: ul,ol{margin:0 0 1.5em 1em}).
   :where() keeps specificity at (0,1,0): beats the stock element
   selector, still LOSES to every class-scoped stock reset
   (.widget ul{margin:0}, .sf-menu *{margin:0}, …) exactly like the
   original does. */
.rtl :where(ul, ol) {
	margin: 0 1em 1.5em 0;
}
.rtl :where(li > ul, li > ol) {
	margin-left: 0;
	margin-right: 1.5em;
}

/* Post prose (higher-specificity stock rules need explicit mirrors). */
.rtl .entry-content ul,
.rtl .entry-content ol {
	margin: 0 15px 20px 0;
}
.rtl .entry-content blockquote {
	border-left: none;
	border-right: solid 3px #ddd;
	padding: 0 40px 0 0;
}

/* Skip-link focus box + author-comment stub. */
.rtl .screen-reader-text:focus {
	left: auto;
	right: 5px;
}
.rtl .sticky,
.rtl .bypostauthor {
	text-align: right;
}

/* ---- T2. Header / top bar ------------------------------------------ */

/* Language-switcher slot in the top bar. */
.rtl .header_social {
	float: left;
	text-align: left;
}

/* Search widget: icon pinned to the container edge, input expands away
   from it (stock pins right / pads right 40px for the icon). */
.rtl .sb-search {
	right: auto;
	left: 30px;
}
.rtl .sb-search .sb-search-input {
	right: auto;
	left: 0;
	padding: 10px 15px 10px 40px;
}
.rtl .sb-search .sb-icon-search,
.rtl .sb-search .sb-search-submit {
	right: auto;
	left: 0;
}

@media screen and (max-width: 979px) {
	/* Stock flips .header_social to float:none;text-align:left here. */
	.rtl .header_social {
		float: none;
		text-align: right;
	}
	/* Stock: position:relative;right:0 — neutralise the base 30px. */
	.rtl .logo_wrapper_main .sb-search {
		left: 0;
	}
	/* Stock nudges the (mobile-centered) logo +20px to clear the
	   left-pinned hamburger; hamburger moves right → nudge left. */
	.rtl .wpz_header_layout_compact .logo_wrapper_main .navbar-header {
		transform: translateX(-20px);
	}
}

@media screen and (max-width: 640px) {
	/* Stock: .sb-search{right:2%}. */
	.rtl .sb-search {
		left: 2%;
	}
}

/* ---- T3. Desktop dropdown nav (.navbar-wpz / sf-menu) -------------- */

/* Top-level items are display:inline-block in .main-navbar (order
   auto-reverses under dir=rtl) — only the absolutely-positioned
   dropdowns and the caret decorations need mirrors. */
.rtl .sf-menu ul {
	left: auto;
	right: 0;
}
.rtl .navbar-wpz ul {
	left: auto;
	right: 10%;
	text-align: right;
}
.rtl .navbar-wpz ul a {
	text-align: right;
}
/* 2nd-level flyout: stock effectively opens rightward (left:100% wins
   its overconstrained left/right pair in LTR) → mirror opens leftward. */
.rtl .navbar-wpz ul ul,
.rtl .sf-menu ul ul {
	left: auto;
	right: 100%;
}
/* Dropdown caret triangle sits near the parent's leading edge. */
.rtl .navbar-wpz > li > ul:before {
	left: auto;
	right: 14px;
}
.rtl .navbar-wpz > li > ul:after {
	left: auto;
	right: 13px;
}
/* Chevron after a parent label: gap moves to the other side. */
.rtl .sf-arrows .sf-with-ul:after {
	margin: 2px 4px 0 0;
}
.rtl .main-navbar .sf-arrows .sf-with-ul:after {
	margin: 6px 4px 0 0;
}
/* Submenu-row chevron pinned to the far (now left) edge. */
.rtl .sf-arrows ul .sf-with-ul:after {
	float: left;
}

/* ---- T4. Mobile nav — slicknav (markup built at runtime) ------------ */

/* Hamburger is absolutely pinned inside the logo wrapper. */
.rtl .logo_wrapper_main .navbar-toggle,
.rtl .logo_wrapper_main .slicknav_btn {
	left: auto;
	right: 4%;
}
.rtl .slicknav_menu .slicknav_menutxt {
	float: left;
}
.rtl .slicknav_menu .slicknav_icon {
	float: right;
	margin: 1px 0 0 7px;
}
/* Expand/collapse arrow on parent rows. */
.rtl .slicknav_nav .slicknav_arrow {
	float: left;
	margin: 0 0.4em 0 10px;
	padding-left: 0;
	padding-right: 5px;
	border-left: none;
	border-right: 1px solid #cecece;
}
.rtl .slicknav_nav .slicknav_arrow:after {
	margin: 0 4px 0 0;
}
.rtl .slicknav_nav ul {
	text-align: right;
}
/* Nested-list indent + text nodes inside the open panel. */
.rtl .slicknav_nav ul ul {
	padding: 0 30px 0 0;
}
.rtl .slicknav_nav .slicknav_txtnode {
	margin-left: 0;
	margin-right: 15px;
}

@media screen and (max-width: 768px) {
	/* Stock aligns the panel block + rows left at this width. */
	.rtl .logo_wrapper_main .slicknav_menu {
		text-align: right;
	}
	.rtl .slicknav_nav a {
		text-align: right;
	}
}

/* ---- T5. Off-canvas #pageslide (dormant on this site: the side-panel
 * toggle branch of partials/mobile-menu.php is not rendered with the
 * current menu-mobile-type; mirrored anyway so a future option flip
 * lands RTL-correct) -------------------------------------------------- */

/* Panel slides in from the left in stock → from the right on RTL. */
.rtl #pageslide .panel {
	left: auto;
	right: 0;
}
.rtl #pageslide .closeBtn {
	right: auto;
	left: 0;
}
.rtl #pageslide .panel .widget,
.rtl #pageslide .panel .widget h3.title {
	text-align: right;
}
.rtl #pageslide .panel .widget.widget_nav_menu ul.menu li.menu-item-has-children > a .child-arrow,
.rtl #pageslide .side-panel-menu li.menu-item-has-children > a .child-arrow {
	float: left;
	margin: 0 10px 0 0;
}
.rtl #pageslide .panel .widget.widget_nav_menu ul.menu ul li a,
.rtl #pageslide .side-panel-menu li ul li a {
	padding-left: 0;
	padding-right: 10px;
}

/* ---- T6. Sidebar (single posts/pages) — FULL MIRROR: moves to the
 * LEFT of the content column (.site-main is display:flex, so column
 * order auto-reverses; the auto margin must follow to keep the gutter
 * BETWEEN the columns). CSS-only, trivially reversible. --------------- */

.rtl #sidebar {
	margin-left: 0;
	margin-right: auto;
}

@media screen and (max-width: 768px) {
	/* Stock stacks + centers the sidebar below content at this width. */
	.rtl #sidebar {
		margin: 50px auto 0;
	}
}

/* ---- T7. Archives / search (list-view) ------------------------------ */

.rtl .full-layout .section-title,
.rtl .full-layout .category_description {
	text-align: right;
}
.rtl .recent-posts .entry-title,
.rtl .entry-meta,
.rtl .cat-links,
.rtl .readmore_button {
	text-align: right;
}
/* Grid gutters (.recent-posts .post{margin:0 4% 30px 0} + nth resets)
   are NOT mirrored: this site renders every archive/search as
   .list-view, whose higher-specificity width:100%/margin rules zero
   all horizontal gutters at every breakpoint (verified vs the 641-979
   band too). */

/* ---- T8. Pagination -------------------------------------------------- */

/* prev/next are absolutely pinned to the container edges. */
.rtl div.navigation .prev {
	left: auto;
	right: 0;
}
.rtl div.navigation .next {
	right: auto;
	left: 0;
}

/* ---- T9. Single post ------------------------------------------------- */

.rtl .tag_list a {
	margin: 0 0 0 10px;
}
.rtl .single .share a {
	margin: 0 0 4px 7px;
}
.rtl .single .share a:before {
	margin: 0 0 0 6px;
}
.rtl .single .post_author > img {
	float: right;
	margin-right: 0;
	margin-left: 25px;
}
.rtl .single .post_author .author-title {
	margin: 0 0 14px 10px;
}
.rtl .author_links a {
	margin: 0 0 0 5px;
}
.rtl .prevnext > div + div {
	border-left: none;
	border-right: 1px solid #eee;
}
.rtl .prevnext .previous_post_pag {
	float: right;
}
.rtl .prevnext .next_post_pag {
	float: left;
	padding-left: 0;
	padding-right: 2.5%;
	text-align: left;
}

@media screen and (max-width: 1200px) {
	/* Stock un-floats prev (next is hidden) at this width. */
	.rtl .prevnext .previous_post_pag {
		float: none;
	}
}

@media screen and (max-width: 460px) {
	/* Stock resets share-button margins to a uniform 5px here. */
	.rtl .single .share a {
		margin: 5px;
	}
}

/* ---- T10. Comments --------------------------------------------------- */

.rtl .commentlist .children {
	margin: 30px 50px 0 0;
}
.rtl .comment .avatar {
	float: right;
	margin-right: 0;
	margin-left: 28px;
}
.rtl #respond .form_fields p .required_lab,
.rtl #respond .comment-form-cookies-consent label {
	margin-left: 0;
	margin-right: 10px;
}

/* ---- T11. Print (browser print of a post page) ----------------------- */

@media print {
	.rtl .page h1.entry-title,
	.rtl .single h1.entry-title {
		text-align: right;
	}
	/* !important required: the stock rule carries !important. */
	.rtl .single .post-thumb {
		float: right;
		margin: 2% 0 25px 3% !important;
	}
}
