/* Keep the existing layout tokens. These selectors cover physical RTL styles. */
html[lang="en"] :is(
  .brand small,
  .header-search-panel,
  .phone-page,
  .pagination,
  .phones-pagination,
  .board-side-label,
  .icto-design-credit,
  .icto-certificate-url,
  .app-surface .hero-platforms .hero-fine,
  main section.page-width[dir="rtl"]
) {
  direction: ltr;
}

html[lang="en"] :is(
  .header-search-panel,
  .brand-options button,
  .phone-list button,
  .fault-list article > button,
  .site-footer .copyright > .icto-design-credit,
  .site-footer .copyright > span:first-child,
  .site-footer .icto-footer-social__intro
) {
  text-align: start;
}

html[lang="en"] :is(
  #home-solutions,
  .solution-nav-badge,
  .solution-mobile-link,
  .solution-setting-link,
  header a[href="/solutions"],
  header a[href="/en/solutions"]
) {
  display: none !important;
}

html[lang="en"] .signup-terms ol {
  list-style-type: decimal;
}

html[lang="en"] .en-spam-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-block-start: 12px;
  padding: 14px;
  border: 2px solid #be760b;
  border-radius: 12px;
  background: #fff3cc;
  color: #693800;
  text-align: start;
  line-height: 1.5;
}

html[lang="en"] .en-spam-warning[hidden] {
  display: none;
}

.en-spam-warning__icon {
  font-size: 32px;
  line-height: 1;
}

.en-spam-warning__title,
.en-spam-warning__text {
  display: block;
}

.en-spam-warning__title {
  font-size: 16px;
  font-weight: 800;
}

.en-spam-warning__text {
  margin-block-start: 3px;
  font-size: 13px;
  font-weight: 500;
}

.site-footer :is(.icto-trust-card, .enamad-link, .icto-certificate-url),
.site-footer :is(div,section):has(> .enamad-link) {
  display: none !important;
}

/* Use the Persian mobile header layout with the English destination URLs. */
@media (max-width: 820px) {
  html[lang="en"] .site-header,
  html[lang="en"] .site-header .header-search-panel {
    direction: rtl;
  }

  html[lang="en"] .site-header .header-search-panel input {
    direction: ltr;
    text-align: left;
  }

  :where(html[lang="en"]) .site-header .topbar.page-width > nav > a:is([href="/en/premium"], [href="/en/app"]) {
    display: inline-flex;
    justify-content: center;
    min-height: 34px;
    min-width: 0;
    padding: 8px;
    gap: 3px;
    font-size: 11px;
    line-height: 1.2;
  }

  html[lang="en"] #mobile-site-nav > a[href="/en/boards"] {
    display: none;
  }
}

@media (max-width: 420px) {
  :where(html[lang="en"]) .site-header .topbar.page-width > nav > a:is([href="/en/premium"], [href="/en/app"]) {
    min-height: 32px;
    padding: 7px 6px;
    font-size: 10px;
  }
}

@media (max-width: 350px) {
  :where(html[lang="en"]) .site-header .topbar.page-width > nav > a:is([href="/en/premium"], [href="/en/app"]) {
    padding-inline: 4px;
    font-size: 9.5px;
  }
}

/* Shadow DOM styles for the existing support chat. */
:host([data-icto-locale="en"]) {
  direction: ltr;
}

:host([data-icto-locale="en"]) :is(.topic, .proactive, .member-message) {
  text-align: start;
}

:host([data-icto-locale="en"]) .msg:not(.mine) {
  border-radius: 16px 16px 16px 3px;
}

:host([data-icto-locale="en"]) .msg.mine {
  margin-left: auto;
  margin-right: 0;
  border-radius: 16px 16px 3px 16px;
}

:host([data-icto-locale="en"]) .quote {
  border-left: 3px solid #91b440;
  border-right: 0;
}
#plans [data-en-wallet-method] a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

#plans .premium-checkout .en-usdt-primary {
  display: inline-grid;
  align-items: center;
  justify-items: start;
  gap: 2px;
  min-height: 52px;
  padding: 9px 16px;
  border: 1px solid #6389ff;
  border-radius: 12px;
  background: linear-gradient(132deg, #1748df, #1036b3);
  color: #fff;
  box-shadow: 0 5px 16px #173fba40;
  line-height: 1.35;
  text-align: start;
  text-decoration: none;
}
#plans .en-usdt-primary strong { color: inherit; font-size: 16px; }
#plans .en-usdt-primary small { color: #e2eaff; font-size: 13px; }
#plans .en-usdt-primary:hover { background: #10329f; }
#plans .en-usdt-primary:focus-visible { outline: 2px solid #8eacff; outline-offset: 3px; }
#plans :is(.premium-pay, .premium-gateways, .icto-coupon-form),
#plans #premium-admin-preview :is(.has-gateways, .premium-result),
#plans .premium-checkout.has-gateways > span > small {
  display: none !important;
}
@media (max-width: 600px) {
  #plans .premium-checkout .en-usdt-primary { width: 100%; box-sizing: border-box; }
}

#plans .premium-grid article:not([data-en-price-ready]) > :is(strong,small),
#plans .premium-checkout:has([data-en-usdt-primary]) > span {
  visibility: hidden;
}

#plans .premium-checkout .en-usdt-primary[hidden] {
  display: none;
}

