/*
 * Farsi (right-to-left) frame – Release A, 11/10/2026.
 * Loaded ONLY on Farsi pages (after each page's own stylesheet), so English never sees these rules.
 * Every rule starts with html[dir="rtl"] and mirrors a left/right rule of the named stylesheet; where that rule
 * uses !important, so does its mirror.
 */

/* ---------- Direction arrows (back / forward / "My dashboard" / introduction shortcut / welcome button) ---------- */
html[dir="rtl"] .fa-arrow-left:empty,
html[dir="rtl"] .fa-arrow-right:empty,
html[dir="rtl"] .fa-chevron-left:empty,
html[dir="rtl"] .fa-chevron-right:empty,
html[dir="rtl"] .nt-direction-arrow {
    transform: scaleX(-1);
}
/* user-welcome.css: the "→" of the welcome button, also while hovered */
html[dir="rtl"] .netthub-userwelcome-page .pg-welcome-button > span[aria-hidden="true"] {
    transform: scaleX(-1) !important;
}
html[dir="rtl"] .netthub-userwelcome-page .pg-welcome-button:hover:not(:disabled) > span[aria-hidden="true"] {
    transform: scaleX(-1) translateX(2px) !important;
}

/* ---------- Text forced to the left ---------- */
html[dir="rtl"] .netthub-userwelcome-page .user-welcome-clean,
html[dir="rtl"] .netthub-userwelcome-page .user-welcome-heading,
html[dir="rtl"] .netthub-userwelcome-page .user-welcome-title,
html[dir="rtl"] .netthub-userwelcome-page .user-welcome-text,
html[dir="rtl"] .questionnaire-page .welcome-container .pg-welcome-title,
html[dir="rtl"] .personality-intro-text,
html[dir="rtl"] body.register-details-step .register-title,
html[dir="rtl"] body.register-details-step .register-intro-lead,
html[dir="rtl"] body.register-details-step .register-privacy-explanation,
html[dir="rtl"] .questionnaire-page .questionary-question,
html[dir="rtl"] .questionnaire-page .questionnaire-binary-question__text {
    text-align: right !important;
}
html[dir="rtl"] .personality-info-card,
html[dir="rtl"] .nt-dashboard-account__menu a,
html[dir="rtl"] .nt-dashboard-account__menu button,
html[dir="rtl"] .nt-dashboard-member__photo--pending,
html[dir="rtl"] .nt-dashboard-member__photo--rejected,
html[dir="rtl"] .nt-member-results__heading h1,
html[dir="rtl"] .nt-match-card__menu-panel button,
html[dir="rtl"] .nt-match-card__menu-panel a,
html[dir="rtl"] .nt-intro-options button,
html[dir="rtl"] .nt-public-detail-group dd,
html[dir="rtl"] .nt-profile-introduction,
html[dir="rtl"] .nt-profile-readonly,
html[dir="rtl"] .nt-profile-page #memberSearchEditMode .block-header h3,
html[dir="rtl"] .nt-member-menu__dropdown a,
html[dir="rtl"] .nt-member-account__menu a,
html[dir="rtl"] .nt-member-account__menu button,
html[dir="rtl"] .nt-thread-menu button,
html[dir="rtl"] .nt-thread-menu a {
    text-align: right;
}
/* Paragraphs written with style="text-align: left" (photo-review pop-up and similar) */
html[dir="rtl"] .swal2-html-container [style*="text-align: left"],
html[dir="rtl"] .swal2-html-container [style*="text-align:left"] {
    text-align: right !important;
}

/* ---------- Questionnaire and personality answers (questionary.css): tick box beside the text, on the right ---------- */
html[dir="rtl"] .questionnaire-page .questionnaire-option__label,
html[dir="rtl"] .questionnaire-page .questionnaire-option > label,
html[dir="rtl"] .questionnaire-page .questionnaire-options .questionnaire-option > label {
    padding: .8rem 3.5rem .8rem 1rem !important;
    text-align: right !important;
}
html[dir="rtl"] body.questionnaire-workflow .questionnaire-page .ques-active .custom-checkbox.questionnaire-option > label,
html[dir="rtl"] body.questionnaire-workflow .questionnaire-page .ques-active span.radio.questionnaire-option > label,
html[dir="rtl"] body.questionnaire-workflow .questionnaire-page .ques-active .personality-answer-row.questionnaire-option > label {
    padding-left: 1rem !important;
    padding-right: 3.75rem !important;
    text-align: right !important;
}
html[dir="rtl"] .questionnaire-page .questionnaire-option__label::before,
html[dir="rtl"] .questionnaire-page .questionnaire-option > label::before {
    left: auto !important;
    right: 1rem !important;
}
html[dir="rtl"] .questionnaire-page .questionnaire-option--checkbox > input:checked + label::after,
html[dir="rtl"] .questionnaire-page .custom-checkbox.questionnaire-option > input:checked + label::after {
    left: auto !important;
    right: 1.45rem !important;
}
html[dir="rtl"] .questionnaire-page .questionnaire-option--radio > input:checked + label::after,
html[dir="rtl"] .questionnaire-page span.radio.questionnaire-option > input:checked + label::after,
html[dir="rtl"] .questionnaire-page .personality-answer-row.questionnaire-option > input:checked + label::after {
    left: auto !important;
    right: 1.37rem !important;
}
/* The selected answer's inner edge line sits on the starting (right) side */
html[dir="rtl"] .questionnaire-page .custom-checkbox input[type="checkbox"]:checked + label,
html[dir="rtl"] .questionnaire-page span.radio input[type="radio"]:checked + label,
html[dir="rtl"] .questionnaire-page .personality-answer-radio:checked + .personality-answer-label,
html[dir="rtl"] .questionnaire-page label.ans-check,
html[dir="rtl"] .questionnaire-page .personality-answer-row:has(.personality-answer-radio:checked) {
    box-shadow: inset -3px 0 0 var(--questionnaire-selection-contrast) !important;
}
/* Personality two-choice questions */
html[dir="rtl"] body.questionnaire-workflow .questionnaire-page.questionnaire-state--personality-question .eq.ques-active .questionnaire-question-card--psychometric-two-choice .personality-answer-label {
    padding: .75rem 3.75rem .75rem 1.25rem !important;
    text-align: right !important;
}
html[dir="rtl"] body.questionnaire-workflow .questionnaire-page.questionnaire-state--personality-question .eq.ques-active .questionnaire-question-card--psychometric-two-choice .personality-answer-label::before {
    left: auto !important;
    right: 1.25rem !important;
}
html[dir="rtl"] body.questionnaire-workflow .questionnaire-page.questionnaire-state--personality-question .eq.ques-active .questionnaire-question-card--psychometric-two-choice .personality-answer-label::after {
    left: auto !important;
    right: 1.625rem !important;
}
/* The logout button moves to the top-left corner */
html[dir="rtl"] .questionnaire-page .questionnaire-logout-form {
    right: auto !important;
    left: 1.25rem !important;
}

@media (max-width: 575.98px) {
    html[dir="rtl"] .questionnaire-page .questionnaire-option__label,
    html[dir="rtl"] .questionnaire-page .questionnaire-option > label,
    html[dir="rtl"] .questionnaire-page .questionnaire-options .questionnaire-option > label,
    html[dir="rtl"] .questionnaire-page .custom-checkbox.questionnaire-option > label,
    html[dir="rtl"] .questionnaire-page span.radio.questionnaire-option > label,
    html[dir="rtl"] .questionnaire-page .personality-answer-row.questionnaire-option > label,
    html[dir="rtl"] body.questionnaire-workflow .questionnaire-page .ques-active .custom-checkbox.questionnaire-option > label,
    html[dir="rtl"] body.questionnaire-workflow .questionnaire-page .ques-active span.radio.questionnaire-option > label,
    html[dir="rtl"] body.questionnaire-workflow .questionnaire-page .ques-active .personality-answer-row.questionnaire-option > label {
        padding: .55rem 3.25rem .55rem .875rem !important;
    }
    html[dir="rtl"] body.questionnaire-workflow .questionnaire-page.questionnaire-state--personality-question .eq.ques-active .questionnaire-question-card--psychometric-two-choice .personality-answer-label {
        padding: .7rem 3.25rem .7rem 1rem !important;
    }
    html[dir="rtl"] body.questionnaire-workflow .questionnaire-page.questionnaire-state--personality-question .eq.ques-active .questionnaire-question-card--psychometric-two-choice .personality-answer-label::before {
        right: 1rem !important;
    }
    html[dir="rtl"] body.questionnaire-workflow .questionnaire-page.questionnaire-state--personality-question .eq.ques-active .questionnaire-question-card--psychometric-two-choice .personality-answer-label::after {
        right: 1.375rem !important;
    }
    html[dir="rtl"] .questionnaire-page .questionnaire-logout-form {
        left: .75rem !important;
    }
}

/* ---------- Match preferences and profile tick boxes (profile-page.css) ---------- */
html[dir="rtl"] .nt-profile-option-grid .form-check-input {
    left: auto;
    right: 11px;
}
html[dir="rtl"] .nt-profile-option-grid .form-check-label {
    padding: 8px 40px 8px 10px;
}
html[dir="rtl"] .nt-profile-page #frmeditSearch #match-open-to .form-check-input,
html[dir="rtl"] .nt-profile-page #frmeditSearch #match-interests .form-check-input {
    left: auto;
    right: 14px;
}
html[dir="rtl"] .nt-profile-page #frmeditSearch #match-open-to .form-check-label,
html[dir="rtl"] .nt-profile-page #frmeditSearch #match-interests .form-check-label {
    padding: 11px 46px 11px 14px;
}
html[dir="rtl"] .nt-profile-page #match-open-to .form-check-input,
html[dir="rtl"] .nt-profile-page #match-interests .form-check-input {
    margin: 0 13px 0 0;
}
@media (max-width: 480px) {
    html[dir="rtl"] .nt-profile-option-grid .form-check-label {
        padding-left: 10px;
        padding-right: 36px;
    }
}
@media (min-width: 992px) {
    html[dir="rtl"] .nt-active-preference details[open] > ul {
        left: auto;
        right: var(--nt-disclosure-panel-left, 0);
    }
}

/* ---------- Multi-select drop-downs (bootstrap-select.min.css) ---------- */
html[dir="rtl"] .bootstrap-select .dropdown-toggle .filter-option {
    float: right;
    left: auto;
    right: 0;
    text-align: right;
}
html[dir="rtl"] .bootstrap-select .dropdown-toggle .filter-expand {
    float: right;
}
html[dir="rtl"] .bootstrap-select .dropdown-toggle .caret {
    right: auto;
    left: 12px;
}
html[dir="rtl"] .bootstrap-select .dropdown-menu li a.opt {
    padding-left: 0;
    padding-right: 2.25em;
}
html[dir="rtl"] .bootstrap-select.show-tick .dropdown-menu .selected span.check-mark {
    right: auto;
    left: 15px;
}
html[dir="rtl"] .bootstrap-select.show-tick .dropdown-menu li a span.text {
    margin-right: 0;
    margin-left: 34px;
}
html[dir="rtl"] .bootstrap-select .dropdown-menu {
    text-align: right;
}
html[dir="rtl"] .bs-donebutton {
    float: right;
}

/* ---------- Member header drop-downs (member-portal-header.css): open inwards, inside the screen ---------- */
html[dir="rtl"] .nt-member-brand__logo {
    object-position: right center;
}
@media (min-width: 901px) {
    html[dir="rtl"] .nt-member-menu__dropdown--right,
    html[dir="rtl"] .nt-member-account__menu {
        right: auto;
        left: 0;
    }
    html[dir="rtl"] .nt-member-menu--split > details > .nt-member-menu__dropdown {
        left: auto;
        right: -130px;
    }
}
@media (max-width: 900px) {
    html[dir="rtl"] .nt-member-account,
    html[dir="rtl"] .nt-member-nav__utility {
        margin-left: 0;
        margin-right: auto;
    }
}
html[dir="rtl"] .nt-member-menu--split > .nt-member-menu__main {
    padding: 8px 9px 8px 3px;
    border-radius: 0 7px 7px 0;
}
html[dir="rtl"] .nt-member-menu--split > details > summary {
    padding: 8px 3px 8px 7px;
}
html[dir="rtl"] .nt-dashboard-return {
    padding: 5px 6px 5px 13px;
}
html[dir="rtl"] .nt-dashboard-account__menu {
    right: auto;
    left: 0;
}

/* ---------- Dashboard introduction dialog (dashboard-page.css) ---------- */
html[dir="rtl"] .nt-intro-dialog__close {
    right: auto;
    left: 12px;
}
html[dir="rtl"] .nt-intro-dialog h2 {
    padding-right: 0;
    padding-left: 42px;
}

/* ---------- Another member's profile (public-profile-page.css) ---------- */
html[dir="rtl"] .nt-public-detail-group {
    border-left: 0;
    border-right: 1px solid #e3e9f0;
}
html[dir="rtl"] .nt-public-detail-group:first-child {
    padding-left: 20px;
    padding-right: 0;
    border-right: 0;
}
html[dir="rtl"] .nt-public-detail-group:last-child {
    padding-left: 0;
}
html[dir="rtl"] .nt-public-lightbox__close {
    right: auto;
    left: 28px;
}

/* ---------- Messages (message.css) ---------- */
html[dir="rtl"] .nt-conversations {
    border-right: 0;
    border-left: 1px solid var(--msg-border);
}
html[dir="rtl"] .nt-conversation-row.is-selected {
    box-shadow: inset -4px 0 var(--msg-blue);
}
html[dir="rtl"] .nt-message-avatar > i {
    right: auto;
    left: 0;
}
html[dir="rtl"] .nt-thread__actions {
    margin-left: 0;
    margin-right: auto;
}
html[dir="rtl"] .nt-thread-menu > div {
    right: auto;
    left: 0;
}
html[dir="rtl"] .nt-message--outgoing {
    margin-left: 0;
    margin-right: auto;
}
html[dir="rtl"] .nt-message__bubble {
    border-radius: 16px 5px 16px 16px;
}
html[dir="rtl"] .nt-message--outgoing .nt-message__bubble {
    border-radius: 5px 16px 16px;
}

/* ---------- Mixed-direction values kept in their written order ---------- */
/* Counters ("34 / 300", photo "2 / 5") and English-format times ("4:20 pm") read left to right. */
html[dir="rtl"] [data-message-counter],
html[dir="rtl"] [data-lightbox-position],
html[dir="rtl"] time[data-local-time] {
    direction: ltr;
    unicode-bidi: isolate;
}
/* Preference values such as the age range "18–35" follow their own first letter (left to right when only numbers) */
html[dir="rtl"] .nt-active-preference__content > span,
html[dir="rtl"] .nt-active-preference details li > span {
    unicode-bidi: plaintext;
}
/* A name with its age is kept apart from the time or text beside it */
html[dir="rtl"] .nt-thread__identity h2,
html[dir="rtl"] .nt-conversation-row__body strong,
html[dir="rtl"] .nt-match-card__identity strong,
html[dir="rtl"] .nt-dashboard-member__details > strong,
html[dir="rtl"] #member-profile-title {
    unicode-bidi: isolate;
}
/* Phone numbers are typed left to right */
html[dir="rtl"] #input_phone {
    direction: ltr;
}
