:root {
    --auth-blue: #4f86df;
    --auth-dark: #202142;
    --auth-primary: #11145f;
    --auth-primary-hover: #0b0e4a;
    --auth-white: #ffffff;
    --auth-input: #f8f9fb;
    --auth-text: #303244;
    --auth-muted: #6f7180;
    --auth-border: #d8dbe3;
    --auth-danger: #b42318;
    --auth-success: #067647;
    --auth-info: #175cd3;
    --auth-radius: 12px;
    --auth-control-height: clamp(48px, 6.1vh, 58px);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
html { overflow: hidden; }
body.auth-body {
    margin: 0;
    overflow: hidden;
    font-family: 'Jost', Arial, sans-serif;
    background: var(--auth-blue);
    color: var(--auth-text);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.auth-wrapper { position: relative; width: 100%; height: 100dvh; overflow: hidden; }
.auth-part {
    direction: ltr;
    display: flex;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
}
.auth-banner, .auth-form { width: 50%; height: 100dvh; min-width: 0; }
html[dir="ltr"] .auth-form { order: -1; }
html[dir="rtl"] .auth-form { direction: rtl; text-align: right; }
html[dir="ltr"] .auth-form { direction: ltr; text-align: left; }

.auth-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-dark) center center / cover no-repeat;
    color: var(--auth-white);
    overflow: hidden;
}
.auth-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(24, 25, 61, 0.92);
}
.auth-content { width: min(100%, 620px); text-align: center; }
.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    margin-bottom: 40px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.auth-logo img { width: 72%; height: 72%; object-fit: contain; }
.auth-headline { margin: 0 0 18px; color: #fff; font-size: clamp(28px, 2.1vw, 38px); line-height: 1.25; font-weight: 700; }
.auth-details { margin: 0; color: #fff; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.7; }

.language-toggler {
    position: fixed;
    top: 20px;
    z-index: 10020;
    display: flex;
    gap: 10px;
}
html[dir="rtl"] .language-toggler { right: 20px; left: auto; flex-direction: row-reverse; }
html[dir="ltr"] .language-toggler { left: 20px; right: auto; }
.auth-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255,255,255,.72);
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
    transition: transform .15s ease, border-color .15s ease;
}
.auth-lang-link:hover { transform: translateY(-1px); }
.auth-lang-link.active { border-color: #fff; }
.auth-lang-flag { font-size: 25px; line-height: 1; }

.auth-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 40px 28px;
    background: var(--auth-blue);
    overflow: visible;
}
.auth-form-content { width: min(100%, 460px); margin: auto; }
.auth-page--register .auth-form-content { width: min(100%, 430px); }
.auth-form-title {
    margin: 0 0 clamp(14px, 2vh, 24px);
    color: #fff;
    font-size: clamp(28px, 2.45vw, 38px);
    line-height: 1.2;
    font-weight: 700;
}
.auth-page--register .auth-form-title { font-size: clamp(27px, 2.1vw, 34px); }
.auth-label { display: block; margin: 0 0 7px; color: #35405f; font-size: 15px; line-height: 1.35; }
.auth-field { margin-bottom: clamp(10px, 1.45vh, 15px); }
.auth-field--method { margin-bottom: clamp(10px, 1.2vh, 13px); }

.auth-method {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}
.auth-method__tab {
    min-height: 48px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: #f1f1f1;
    color: #51515b;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}
.auth-method__tab.active { background: var(--auth-primary); color: #fff; }
.auth-method__tab:focus-visible { outline: 3px solid rgba(17,20,95,.25); outline-offset: 2px; }

.auth-control,
.auth-select2 {
    width: 100%;
    height: var(--auth-control-height);
    border: 1px solid transparent;
    border-radius: var(--auth-radius);
    background: var(--auth-input);
    color: var(--auth-text);
    padding: 0 18px;
    outline: none;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-control::placeholder { color: #858793; opacity: 1; }
.auth-control:focus { border-color: rgba(17,20,95,.55); box-shadow: 0 0 0 3px rgba(17,20,95,.09); }
html[dir="rtl"] .auth-control:not(.auth-control--phone) { direction: rtl; text-align: right; }
html[dir="ltr"] .auth-control { direction: ltr; text-align: left; }
.auth-control--phone { direction: ltr !important; text-align: left !important; }

.auth-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 15px;
    color: #fff;
}
.auth-check,
.auth-terms {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #fff;
    line-height: 1.45;
    cursor: pointer;
}
html[dir="rtl"] .auth-check,
html[dir="rtl"] .auth-terms { direction: rtl; text-align: right; justify-content: flex-start; }
html[dir="ltr"] .auth-check,
html[dir="ltr"] .auth-terms { direction: ltr; text-align: left; }
.auth-check input[type="checkbox"],
.auth-terms input[type="checkbox"] {
    appearance: auto;
    width: 19px;
    height: 19px;
    min-width: 19px;
    margin: 0;
    flex: 0 0 19px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}
.auth-terms { margin: 2px 0 clamp(10px, 1.45vh, 15px); font-size: 14px; }
.auth-terms__text { display: inline; }
.auth-terms a,
.auth-link { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.auth-terms a:hover,
.auth-link:hover { color: #fff; opacity: .9; }

.auth-submit {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: var(--auth-radius);
    background: var(--auth-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: background-color .15s ease, transform .15s ease;
}
.auth-submit:hover { background: var(--auth-primary-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-footer-text { margin: 12px 0 0; color: #fff; text-align: center; line-height: 1.5; }

.auth-alert {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,.94);
    font-size: 14px;
    line-height: 1.4;
}
.auth-alert ul { margin: 0; padding-inline-start: 20px; }
.auth-page--register .auth-alert { max-height: 72px; overflow: auto; }
.auth-alert--danger { color: var(--auth-danger); }
.auth-alert--success { color: var(--auth-success); }
.auth-alert--info { color: var(--auth-info); text-align: center; }

/* intl-tel-input: keep the library's RTL logic, only constrain size/stacking. */
.iti { width: 100%; display: block; }
.iti .auth-control { width: 100%; }
.iti__dropdown-content {
    z-index: 10050 !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.16) !important;
}
.iti__country-list { max-height: 270px !important; overflow-y: auto !important; overflow-x: hidden !important; }
.iti__search-input {
    width: 100% !important;
    min-height: 42px !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    padding: 9px 12px !important;
    outline: none !important;
    background: #fff !important;
}
html[dir="rtl"] .iti__search-input { direction: rtl; text-align: right; }
html[dir="ltr"] .iti__search-input { direction: ltr; text-align: left; }
html[dir="rtl"] .iti__country { text-align: right; }
.iti__dial-code,
.iti__selected-dial-code { direction: ltr; unicode-bidi: isolate; }

/* Select2 city */
.select2-container { width: 100% !important; display: block; }
.select2-container .select2-selection--single {
    height: var(--auth-control-height) !important;
    border: 1px solid transparent !important;
    border-radius: var(--auth-radius) !important;
    background: var(--auth-input) !important;
    outline: none !important;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: rgba(17,20,95,.55) !important;
    box-shadow: 0 0 0 3px rgba(17,20,95,.09) !important;
}
.select2-container .select2-selection--single .select2-selection__rendered {
    height: var(--auth-control-height) !important;
    line-height: var(--auth-control-height) !important;
    padding-inline: 18px 42px !important;
    color: var(--auth-text) !important;
}
.select2-container .select2-selection--single .select2-selection__placeholder { color: #858793 !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0 !important;
    width: 38px !important;
    height: var(--auth-control-height) !important;
}
html[dir="rtl"] .select2-container .select2-selection--single .select2-selection__rendered { text-align: right; direction: rtl; }
html[dir="ltr"] .select2-container .select2-selection--single .select2-selection__rendered { text-align: left; direction: ltr; }
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow { right: auto !important; left: 8px !important; }
html[dir="ltr"] .select2-container--default .select2-selection--single .select2-selection__arrow { left: auto !important; right: 8px !important; }
.select2-dropdown {
    z-index: 10040 !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.14) !important;
}
.select2-search--dropdown { padding: 8px !important; }
.select2-search--dropdown .select2-search__field {
    height: 40px !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 8px !important;
    padding: 7px 10px !important;
    outline: none !important;
}
html[dir="rtl"] .select2-search__field { direction: rtl; text-align: right; }
.select2-results__options { max-height: 240px !important; }
html[dir="rtl"] .select2-results__option { direction: rtl; text-align: right; }
html[dir="ltr"] .select2-results__option { direction: ltr; text-align: left; }

/* OTP */
.auth-otp {
    display: grid;
    grid-template-columns: repeat(6, minmax(38px, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}
.verification-input {
    width: 100%;
    height: 56px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--auth-input);
    color: var(--auth-text);
    text-align: center;
    font-size: 22px;
    outline: none;
}
.verification-input:focus { border-color: rgba(17,20,95,.55); box-shadow: 0 0 0 3px rgba(17,20,95,.09); }
.auth-link-button {
    display: block;
    width: 100%;
    margin: 11px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.auth-link-button:disabled { opacity: .65; cursor: not-allowed; }

/* Dedicated auth modal: no Bootstrap .modal class, no collisions. */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(10, 12, 30, .55);
}
.auth-modal.is-open { display: flex; }
.auth-modal__dialog {
    display: flex;
    flex-direction: column;
    width: min(100%, 620px);
    max-height: min(84dvh, 760px);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0,0,0,.25);
    overflow: hidden;
}
.auth-modal__header,
.auth-modal__footer { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.auth-modal__header { justify-content: space-between; border-bottom: 1px solid #eaecf0; }
.auth-modal__footer { justify-content: flex-end; border-top: 1px solid #eaecf0; }
html[dir="rtl"] .auth-modal__footer { justify-content: flex-start; }
.auth-modal__title { margin: 0; font-size: 20px; color: #15182d; }
.auth-modal__close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #f2f4f7;
    color: #171a2d;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}
.auth-modal__body {
    overflow: auto;
    padding: 20px;
    color: #303244;
    line-height: 1.75;
    overscroll-behavior: contain;
}
html[dir="rtl"] .auth-modal__body { direction: rtl; text-align: right; }
html[dir="ltr"] .auth-modal__body { direction: ltr; text-align: left; }
.auth-modal__button {
    min-width: 100px;
    min-height: 42px;
    padding: 8px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--auth-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.auth-modal-open { overflow: hidden !important; }
.rtf h1, .rtf h2, .rtf h3, .rtf h4, .rtf h5, .rtf h6 { color: #171a2d; }
.rtf p { margin: .7em 0; }
.rtf ol, .rtf ul { padding-inline-start: 24px; }

/* Keep register inside the viewport at common laptop heights; no page/form scrollbar. */
@media (max-height: 820px) and (min-width: 769px) {
    :root { --auth-control-height: 54px; }
    .auth-page--register .auth-form { padding-top: 52px; padding-bottom: 14px; }
    .auth-page--register .auth-form-title { margin-bottom: 12px; font-size: 30px; }
    .auth-page--register .auth-label { margin-bottom: 5px; font-size: 14px; }
    .auth-page--register .auth-method__tab { min-height: 44px; padding-block: 8px; }
    .auth-page--register .auth-field { margin-bottom: 10px; }
    .auth-page--register .auth-terms { margin-block: 0 9px; font-size: 13.5px; }
    .auth-page--register .auth-submit { min-height: 50px; }
    .auth-page--register .auth-footer-text { margin-top: 8px; }
}

@media (max-height: 720px) and (min-width: 769px) {
    :root { --auth-control-height: 48px; }
    .auth-page--register .auth-form { padding-top: 46px; padding-bottom: 8px; }
    .auth-page--register .auth-form-title { margin-bottom: 8px; font-size: 26px; }
    .auth-page--register .auth-field { margin-bottom: 7px; }
    .auth-page--register .auth-field--method .auth-label { display: none; }
    .auth-page--register .auth-method__tab { min-height: 40px; }
    .auth-page--register .auth-terms { margin-bottom: 6px; font-size: 12.5px; }
    .auth-page--register .auth-submit { min-height: 46px; }
    .auth-page--register .auth-footer-text { margin-top: 5px; font-size: 13px; }
}

@media (max-width: 768px) {
    :root { --auth-control-height: 50px; }
    .auth-banner { display: none; }
    .auth-form { order: 0 !important; width: 100%; padding: 58px 20px 18px; }
    .auth-form-content { width: min(100%, 460px); }
    .auth-form-title { font-size: 28px; }
    .language-toggler { top: 12px; }
    html[dir="rtl"] .language-toggler { right: 14px; }
    html[dir="ltr"] .language-toggler { left: 14px; }
    .auth-lang-link { width: 34px; height: 34px; }
    .auth-lang-flag { font-size: 22px; }
    .auth-page--register .auth-field { margin-bottom: 8px; }
    .auth-page--register .auth-form-title { margin-bottom: 10px; font-size: 27px; }
    .auth-page--register .auth-method__tab { min-height: 42px; }
    .auth-page--register .auth-terms { margin: 2px 0 8px; font-size: 13px; }
    .auth-page--register .auth-submit { min-height: 48px; }
    .auth-page--register .auth-footer-text { margin-top: 7px; font-size: 13px; }
    .iti__dropdown-content { max-width: calc(100vw - 20px) !important; }
}

@media (max-width: 520px) {
    .auth-form { padding-inline: 14px; }
    .auth-inline-row { align-items: flex-start; flex-direction: column; gap: 8px; }
    .auth-otp { gap: 6px; }
    .verification-input { height: 48px; font-size: 19px; }
}

/* =========================================================
   Auth Language Switcher
========================================================= */

.auth-lang {
    position: absolute;
    top: 22px;
    right: 24px;
    z-index: 100;
    direction: ltr;
}

.auth-lang__dropdown {
    position: relative;
}

.auth-lang__dropdown > summary {
    list-style: none;
}

.auth-lang__dropdown > summary::-webkit-details-marker {
    display: none;
}

/* Main button */
.auth-lang__button {
    height: 44px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 0 14px;

    background: rgba(255, 255, 255, 0.14);

    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;

    color: #fff;

    cursor: pointer;
    user-select: none;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        0 6px 20px rgba(14, 20, 70, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-lang__button:hover {
    background: rgba(255, 255, 255, 0.21);
    border-color: rgba(255, 255, 255, 0.4);

    transform: translateY(-1px);

    box-shadow:
        0 8px 24px rgba(14, 20, 70, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.auth-lang__icon {
    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.14);
    border-radius: 8px;

    font-size: 15px;
}

.auth-lang__current {
    min-width: 48px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.auth-lang__arrow {
    opacity: 0.8;

    transition: transform 0.2s ease;
}

.auth-lang__dropdown[open] .auth-lang__arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.auth-lang__menu {
    position: absolute;

    top: calc(100% + 9px);
    right: 0;

    width: 190px;

    padding: 7px;

    background: rgba(255, 255, 255, 0.98);

    border: 1px solid rgba(20, 25, 70, 0.08);
    border-radius: 16px;

    box-shadow:
        0 16px 45px rgba(14, 20, 70, 0.2);

    overflow: hidden;

    animation: authLangOpen 0.18s ease;
}

@keyframes authLangOpen {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Options */
.auth-lang__item {
    width: 100%;
    min-height: 54px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 10px;

    color: #25274f;
    text-decoration: none;

    border-radius: 11px;

    transition:
        background 0.18s ease,
        transform 0.18s ease;
}

.auth-lang__item:hover {
    background: #f1f5ff;
}

.auth-lang__item.active {
    background: #eaf1ff;
}

.auth-lang__flag {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f5f7fb;
    border: 1px solid #e8ebf2;
    border-radius: 10px;

    font-size: 20px;
}

.auth-lang__info {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 2px;

    text-align: left;
}

.auth-lang__name {
    font-size: 14px;
    font-weight: 600;
    color: #1d214f;
}

.auth-lang__code {
    font-size: 10px;
    font-weight: 600;
    color: #9196aa;
    letter-spacing: 0.6px;
}

.auth-lang__check {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #171a67;
    border-radius: 50%;

    color: #fff;

    font-size: 12px;
    font-weight: bold;
}

/* RTL page position */
html[dir="rtl"] .auth-lang {
    right: 24px;
    left: auto;
}

/* Mobile */
@media (max-width: 767px) {
    .auth-lang {
        top: 12px;
        right: 12px;
    }

    html[dir="rtl"] .auth-lang {
        right: 12px;
    }

    .auth-lang__button {
        height: 40px;
        padding: 0 11px;
        border-radius: 12px;
    }

    .auth-lang__current {
        display: none;
    }

    .auth-lang__menu {
        width: 180px;
    }
}

/* =========================================================
   Phone field / intl-tel-input
   Phone numbers always stay LTR, even on Arabic pages.
========================================================= */

.iti {
    width: 100%;
    display: block;
    direction: ltr !important;
}

/* The phone number itself must always be written/read left-to-right. */
.iti input,
.iti input[type="tel"],
.iti .auth-control--phone,
.iti .iti__input {
    width: 100%;
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: plaintext;
    padding-left: 110px !important;
    padding-inline-start: 110px !important;
    padding-right: 16px !important;
    padding-inline-end: 16px !important;
    box-sizing: border-box;
}

/* Keep flag + arrow + dial code together on the LEFT of the input. */
.iti__country-container,
.iti__flag-container {
    position: absolute !important;
    top: 0 !important;
    left: 12px !important;
    right: auto !important;
    direction: ltr !important;
    height: 100% !important;
}

html[dir="rtl"] .iti__country-container,
html[dir="rtl"] .iti__flag-container {
    left: 12px !important;
    right: auto !important;
}

.iti__selected-country,
.iti__selected-country-primary {
    direction: ltr !important;
    text-align: left !important;
}

.iti__selected-dial-code,
.iti__dial-code {
    direction: ltr !important;
    unicode-bidi: isolate;
    white-space: nowrap;
}

/* Dropdown sizing / stacking */
.iti__dropdown-content {
    z-index: 10050 !important;
    width: min(430px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    border: 1px solid var(--auth-border) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16) !important;
}

.iti__country-list {
    max-height: 270px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Search field follows the page language. */
.iti__search-input {
    width: 100% !important;
    min-height: 42px !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    padding: 9px 12px !important;
    outline: none !important;
    background: #fff !important;
}

html[dir="rtl"] .iti__search-input {
    direction: rtl !important;
    text-align: right !important;
}

html[dir="ltr"] .iti__search-input {
    direction: ltr !important;
    text-align: left !important;
}

/* Country names may be Arabic/RTL while codes remain LTR. */
html[dir="rtl"] .iti__dropdown-content,
html[dir="rtl"] .iti__country-list {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .iti__country {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .iti__country-name {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .iti__dial-code {
    direction: ltr !important;
    unicode-bidi: isolate;
}

/* Avoid an oversized dropdown on phones. */
@media (max-width: 520px) {
    .iti__dropdown-content {
        width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
    }
}
