/* Monetix Bulk Product Editor - hard mixed Persian/Latin bidi isolation */
body.rtl table.woocommerce-product-attributes,
body.rtl table.shop_attributes,
body.rtl .woocommerce-product-attributes-item,
body.rtl .shop_attributes tr {
    direction: rtl !important;
}

body.rtl .woocommerce-product-attributes-item__label,
body.rtl .shop_attributes th {
    text-align: right !important;
    direction: rtl !important;
}

body.rtl .mbpe-bidi-label {
    display: inline-block !important;
    direction: rtl !important;
    unicode-bidi: isolate !important;
    text-align: right !important;
    isolation: isolate !important;
}

body.rtl .woocommerce-product-attributes-item__value,
body.rtl .shop_attributes td {
    text-align: right !important;
}

body.rtl .mbpe-bidi-value {
    display: block !important;
    unicode-bidi: isolate !important;
    text-align: right !important;
    isolation: isolate !important;
}

body.rtl .mbpe-bidi-value[dir="auto"] {
    unicode-bidi: plaintext !important;
}

/* Fallback for themes that bypass WooCommerce's display attributes filter. */
body.rtl .woocommerce-product-attributes-item__label,
body.rtl .woocommerce-product-attributes-item__value,
body.rtl .woocommerce-product-attributes-item__value p,
body.rtl .shop_attributes th,
body.rtl .shop_attributes td,
body.rtl .shop_attributes td p {
    unicode-bidi: isolate !important;
    isolation: isolate !important;
}


/* v1.2: deterministic Persian + Latin bidirectional layout */
body.rtl .mbpe-bidi-text { unicode-bidi: isolate !important; isolation: isolate !important; }
body.rtl .mbpe-bidi-text[dir="rtl"] { direction: rtl !important; text-align: right !important; }
body.rtl .mbpe-bidi-text[dir="ltr"] { direction: ltr !important; text-align: left !important; }
body.rtl .mbpe-ltr-token { direction: ltr !important; unicode-bidi: isolate !important; display: inline !important; }
body.rtl .woocommerce-product-attributes-item__label,
body.rtl .shop_attributes th { direction: rtl !important; text-align: right !important; vertical-align: middle !important; }
body.rtl .woocommerce-product-attributes-item__value,
body.rtl .shop_attributes td { vertical-align: middle !important; }
body.rtl .woocommerce-product-attributes-item__value > .mbpe-bidi-value[dir="rtl"],
body.rtl .shop_attributes td > .mbpe-bidi-value[dir="rtl"] { direction: rtl !important; text-align: right !important; }
body.rtl .woocommerce-product-attributes-item__value > .mbpe-bidi-value[dir="ltr"],
body.rtl .shop_attributes td > .mbpe-bidi-value[dir="ltr"] { direction: ltr !important; text-align: left !important; }

.mbpe-specs-shortcode { width: 100%; direction: rtl; }
.mbpe-specs-table { width: 100%; border-collapse: collapse; table-layout: fixed; direction: rtl; }
.mbpe-specs-table th, .mbpe-specs-table td { padding: 14px 12px; border-bottom: 1px solid rgba(0,0,0,.08); vertical-align: middle; }
.mbpe-specs-table th { width: 38%; text-align: right; direction: rtl; font-weight: 700; }
.mbpe-specs-table td { width: 62%; }
.mbpe-specs-table td .mbpe-bidi-text[dir="rtl"] { display: block; text-align: right; }
.mbpe-specs-table td .mbpe-bidi-text[dir="ltr"] { display: block; text-align: left; }


/* v1.3 UX Builder native element */
.mbpe-specs-builder-placeholder {
    direction: rtl !important;
    text-align: right !important;
    width: 100%;
    padding: 14px 16px;
    border: 1px dashed rgba(0,0,0,.18);
    border-radius: 8px;
    font-size: 14px;
}


/* v1.4: specs stored in WooCommerce native short description (Flatsome compatible) */
.woocommerce-product-details__short-description .mbpe-short-specs,
.product-short-description .mbpe-short-specs,
.mbpe-short-specs{width:100%;direction:rtl!important;text-align:right!important;margin:0}
.mbpe-short-specs-table{width:100%;border-collapse:collapse;table-layout:fixed;direction:rtl!important;margin:0}
.mbpe-short-specs-table th,.mbpe-short-specs-table td{padding:12px 10px;border-bottom:1px solid rgba(0,0,0,.08);vertical-align:middle;background:transparent}
.mbpe-short-specs-table th{width:38%;font-weight:700;text-align:right!important;direction:rtl!important}
.mbpe-short-specs-table td{width:62%;text-align:right;unicode-bidi:isolate!important;isolation:isolate!important}
.mbpe-short-specs-table .mbpe-bidi-text[dir="rtl"]{display:block;direction:rtl!important;text-align:right!important}
.mbpe-short-specs-table .mbpe-bidi-text[dir="ltr"]{display:block;direction:ltr!important;text-align:right!important}
.mbpe-short-specs-table .mbpe-ltr-token{direction:ltr!important;unicode-bidi:isolate!important;display:inline!important}
@media(max-width:549px){.mbpe-short-specs-table{table-layout:auto}.mbpe-short-specs-table th,.mbpe-short-specs-table td{padding:10px 7px}.mbpe-short-specs-table th{width:44%}.mbpe-short-specs-table td{width:56%}}


/* v1.5.2: keep pure Latin values on the right while preserving LTR character order */
.mbpe-short-specs-table td .mbpe-bidi-text[dir="ltr"],
.mbpe-specs-table td .mbpe-bidi-text[dir="ltr"],
body.rtl .woocommerce-product-attributes-item__value > .mbpe-bidi-value[dir="ltr"],
body.rtl .shop_attributes td > .mbpe-bidi-value[dir="ltr"] {
    direction: ltr !important;
    text-align: right !important;
    unicode-bidi: isolate !important;
    isolation: isolate !important;
}

/* v1.5.2: native short-description tabs: specs + reviews */
.mbpe-spec-review-tabs{width:100%;direction:rtl;text-align:right;margin:0}
.mbpe-spec-review-tabs__nav{display:flex;align-items:center;justify-content:flex-start;gap:8px;border-bottom:1px solid rgba(0,0,0,.10);margin:0 0 14px;padding:0}
.mbpe-spec-review-tab{appearance:none;border:0;background:transparent;padding:11px 16px;margin:0;cursor:pointer;font:inherit;font-weight:700;position:relative;color:inherit}
.mbpe-spec-review-tab:after{content:"";position:absolute;right:16px;left:16px;bottom:-1px;height:2px;background:transparent}
.mbpe-spec-review-tab.is-active:after{background:currentColor}
.mbpe-spec-review-panel{display:none;width:100%}
.mbpe-spec-review-panel.is-active{display:block}
.mbpe-spec-review-panel[data-mbpe-panel="reviews"] #reviews{margin:0;width:100%}
.mbpe-spec-review-panel[data-mbpe-panel="reviews"] .comment-form{direction:rtl;text-align:right}
@media(max-width:549px){.mbpe-spec-review-tabs__nav{gap:0}.mbpe-spec-review-tab{padding:10px 12px}}
