﻿/* WPCode CCB common utilities */
.wpode-ltr-value,
.wpode-ltr-block {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}

body.wpode-ccb-rtl .wpode-mirror-x {
  transform: scaleX(-1);
}

body.wpode-ccb-enabled #calculator_admin,
body.wpode-ccb-enabled #ccb-admin-app,
body.wpode-ccb-enabled #calculator_orders,
body.wpode-ccb-enabled .ccb-main-container,
body.wpode-ccb-enabled .ccb-main-widget,
body.wpode-ccb-enabled .help-center,
body.wpode-ccb-enabled .ccb-whats-new-page {
  text-align: start;
}

body.wpode-ccb-rtl #calculator_admin,
body.wpode-ccb-rtl #ccb-admin-app,
body.wpode-ccb-rtl #calculator_orders,
body.wpode-ccb-rtl .ccb-main-container,
body.wpode-ccb-rtl .ccb-main-widget,
body.wpode-ccb-rtl .ccb-app-container,
body.wpode-ccb-rtl .ccb-sticky-calc,
body.wpode-ccb-rtl .ccb-calculator-admin-page,
body.wpode-ccb-rtl .ccb-whats-new-page,
body.wpode-ccb-rtl .help-center {
  direction: rtl;
}

body.wpode-ccb-ltr #calculator_admin,
body.wpode-ccb-ltr #ccb-admin-app,
body.wpode-ccb-ltr #calculator_orders,
body.wpode-ccb-ltr .ccb-main-container,
body.wpode-ccb-ltr .ccb-main-widget,
body.wpode-ccb-ltr .ccb-app-container {
  direction: ltr;
}

/* Numeric / technical values stay LTR */
body.wpode-ccb-rtl #calculator_admin input[type="number"],
body.wpode-ccb-rtl #calculator_admin input[type="email"],
body.wpode-ccb-rtl #calculator_admin input[type="url"],
body.wpode-ccb-rtl #calculator_admin .ccb-field-quantity input,
body.wpode-ccb-rtl #calculator_admin .wpode-ltr-value,
body.wpode-ccb-rtl .ccb-main-widget input[type="number"],
body.wpode-ccb-rtl .ccb-main-widget input[type="email"],
body.wpode-ccb-rtl .ccb-main-widget input[type="url"] {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext;
}

/*
 * English promo / help copy inside RTL pages — fix punctuation flips
 * for non-Persian mode only. Persian Help Center uses RTL naturally.
 */
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .ccb-whats-new-slider__title,
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .ccb-whats-new-slider__description,
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .ccb-whats-new-slider__content,
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .help-center .help-item h3,
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .help-center .help-item p,
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .help-center .help-item ul,
body.wpode-ccb-rtl:not(.wpode-ccb-fa) .help-center .support-page-button:not(.has-icon) {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}

body.wpode-ccb-fa.wpode-ccb-rtl .help-center .help-item h3,
body.wpode-ccb-fa.wpode-ccb-rtl .help-center .help-item p,
body.wpode-ccb-fa.wpode-ccb-rtl .help-center .help-item ul,
body.wpode-ccb-fa.wpode-ccb-rtl .help-center .help-item li,
body.wpode-ccb-fa.wpode-ccb-rtl .help-center .support-page-button {
  direction: rtl !important;
  text-align: start !important;
  unicode-bidi: isolate;
}

body.wpode-ccb-rtl .help-center__header h1,
body.wpode-ccb-rtl .help-center__header p {
  direction: rtl;
  text-align: start;
  unicode-bidi: isolate;
}

/* Keep Latin leftovers readable if a string is still English */
body.wpode-ccb-fa.wpode-ccb-rtl .help-center .help-item p:lang(en),
body.wpode-ccb-fa.wpode-ccb-rtl .help-center .wpode-ltr-block {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}
