/* ==========================================================================
   SETLAB English site (trysetlab.com): left-to-right overrides.
   The shared files (style.css, css/*.css) were written for the Persian RTL site;
   this file loads last on every page and only flips direction and font.
   ========================================================================== */

:root {
    --sl-font:
        "Inter",
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

html,
body,
.woocommerce:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content),
.sl-page,
.sl-section,
.sl-wrap,
.sl-trial,
.sl-reset-panel,
.sl-license-help,
.setlab-custom-dashboard {
    direction: ltr !important;
}

/* Root cause of right-aligned text (style.css "body { text-align: right }"): every element without its own
   alignment inherits it. Resetting the base fixes all pages at once, including ones not checked by eye. */
html body {
    text-align: left;
}

.sl-page,
.sl-section,
.sl-plan,
.sl-plan-list,
.sl-free-row,
.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
    text-align: left;
}

.sl-head.sl-center,
.sl-center {
    text-align: center;
}

/* Legal and plain text pages (Terms, Privacy, Refund, Offline): a readable column, calm headings. */
.sl-legal .sl-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 20px 64px;
}

.sl-legal h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 0.4em;
}

.sl-legal h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 1.8em 0 0.6em;
}

.sl-legal p,
.sl-legal li {
    color: var(--sl-text-soft, #cbd5e1);
    line-height: 1.75;
}

.sl-legal a {
    color: var(--sl-accent, #26d0ce);
}

/* Home and step rows: the RTL files point arrows left and right-align some labels. */
.sl-home .sl-step:not(:last-child)::after,
.sl-page .sl-steps .sl-card:not(:last-child)::after,
.sl-page .sl-loop-step:not(:last-child)::after {
    content: "\2192";
}

.sl-home .sl-step-title,
.sl-home .sl-defs li strong,
.sl-home .sl-facts strong.sl-ltr {
    text-align: left;
}

/* My account: style.css sets the account layout right-to-left with a more specific selector; win over it. */
html body.woocommerce-account
.woocommerce:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
    direction: ltr !important;
}

html body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    border-right: none !important;
    border-left: 3px solid var(--sl-accent) !important;
}

html body.woocommerce-account .woocommerce-MyAccount-content,
html body.woocommerce-account .woocommerce-MyAccount-content table th,
html body.woocommerce-account .woocommerce-MyAccount-content table td,
html body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    text-align: left;
}

/* Mini cart in the header: style.css puts the image on the right and the remove button on the left. */
@media (min-width: 922px) {
    html body .ast-header-woo-cart .woocommerce-mini-cart-item {
        padding: 0 38px 14px 58px !important;
        text-align: left !important;
    }

    html body .ast-header-woo-cart .woocommerce-mini-cart-item img {
        left: 0 !important;
        right: auto !important;
    }

    html body .ast-header-woo-cart .woocommerce-mini-cart-item a.remove {
        left: auto !important;
        right: 0 !important;
    }
}

/* Account menu on phones (style.css @media max-width 520px). */
@media (max-width: 520px) {
    html body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
        text-align: left !important;
    }
}

/* Password strength under "Set password" and "Account details": theme colours instead of WooCommerce pastels. */
html body .woocommerce-password-strength {
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-sm);
    background: var(--sl-panel-soft);
    color: var(--sl-text-soft);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

html body .woocommerce-password-strength.short,
html body .woocommerce-password-strength.bad {
    border-color: var(--sl-danger);
    color: var(--sl-danger);
}

html body .woocommerce-password-strength.good {
    border-color: var(--sl-accent-border);
    color: var(--sl-accent);
}

html body .woocommerce-password-strength.strong {
    border-color: var(--sl-success);
    color: var(--sl-success);
}

html body .woocommerce-password-hint {
    display: block;
    margin-top: 6px;
    color: var(--sl-muted);
    font-size: 13px;
}

/* Guide steps: blocks.css reserves the number's space on the right; the number sits on the left here. */
.sl-guide .sl-gsteps > li {
    padding: 16px 18px 16px 58px;
}

@media (max-width: 640px) {
    .sl-guide .sl-gsteps > li {
        padding: 14px 14px 14px 52px;
    }
}

/* Guide install pictures: two columns, in step order. */
@media (min-width: 641px) {
    .sl-guide .sl-gshots-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

/* Comparison tables on the home page and in articles. */
.sl-page .sl-vs-wrap {
    max-width: 1040px;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-xl);
    background: var(--sl-panel-soft);
}

.sl-page .sl-vs {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    color: var(--sl-text-soft);
    font-size: 15px;
    line-height: 1.6;
}

.sl-page .sl-vs th,
.sl-page .sl-vs td {
    padding: 13px 16px;
    border: 0;
    border-top: 1px solid var(--sl-border-soft);
    background: transparent;
    text-align: left;
    vertical-align: top;
}

.sl-page .sl-vs thead th {
    border-top: 0;
    color: var(--sl-text);
    font-weight: 800;
}

.sl-page .sl-vs tbody th {
    width: 21%;
    color: var(--sl-text);
    font-weight: 700;
}

.sl-page .sl-vs .is-setlab {
    background: var(--sl-accent-soft);
    color: var(--sl-text);
}

.sl-page .sl-vs thead .is-setlab {
    color: var(--sl-accent);
}

.sl-page .sl-vs-note {
    max-width: 1040px;
    margin-inline: auto;
    color: var(--sl-dim);
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

/* phones: each row becomes a small card, the column's name beside its answer; rows marked sl-vs-more wait for a wider screen */
@media (max-width: 640px) {
    .sl-page .sl-vs thead,
    .sl-page .sl-vs .sl-vs-more { display: none; }

    .sl-page .sl-vs,
    .sl-page .sl-vs tbody,
    .sl-page .sl-vs tr,
    .sl-page .sl-vs tbody th,
    .sl-page .sl-vs td {
        display: block;
        width: 100%;
    }

    .sl-page .sl-vs { font-size: 14px; }

    .sl-page .sl-vs tbody th { padding: 10px 14px 4px; }

    .sl-page .sl-vs td {
        padding: 3px 14px;
        border-top: 0;
    }

    .sl-page .sl-vs tr { padding-bottom: 8px; }

    .sl-page .sl-vs td::before {
        content: attr(data-label) ":";
        display: inline-block;
        margin-inline-end: 6px;
        color: var(--sl-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .sl-page .sl-vs td.is-setlab::before { color: var(--sl-accent); }
}

/* Article pages (.sl-article in blocks.css): Latin text needs less line height than Persian. */
.sl-article {
    --sl-art-lh: 1.75;
}

.sl-article h1 {
    line-height: 1.2;
}

.sl-article .sl-art-col > h2,
.sl-article .sl-art-way > h2,
.sl-article p.sl-art-glance-title,
.sl-article p.sl-art-slogan {
    line-height: 1.3;
}

.sl-article p.sl-art-lead {
    line-height: 1.7;
}

.sl-article .sl-art-next p.sl-art-next-link {
    line-height: 1.5;
}
