/* RTL-specific styles for Arabic pages */

/**
 * Global text direction — html[dir="rtl"] is set from base_vue when LANGUAGE_CODE == ar.
 * Use logical alignment where possible; these rules fix common LTR-only leftovers in CSS.
 */
html[dir="rtl"],
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] main {
    text-align: start;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    text-align: start;
}

html[dir="rtl"] .text-center {
    text-align: center !important;
}

/* Guest shell: home / search / filters */
html[dir="rtl"] .main-page,
html[dir="rtl"] .body-page {
    text-align: start;
}

html[dir="rtl"] .filter-box .value-group,
html[dir="rtl"] .filter-search-box .value-group {
    text-align: right;
}

/* Search page filter strip: Swiper prev/next chevrons are LTR-oriented; flip in RTL */
html[dir="rtl"] .filter-search-box .swiper-button-prev.swiper-btn-filter,
html[dir="rtl"] .filter-search-box .swiper-button-next.swiper-btn-filter {
    transform: rotate(180deg);
}

/* Vacation / property-type popup arrows (left-arrow.svg) — LTR art; match RTL swipe direction */
html[dir="rtl"] #vacation-slider-prev,
html[dir="rtl"] #vacation-slider-next {
    transform: rotate(180deg);
}

/* Filter drawer — property type carousel arrows */
html[dir="rtl"] #filter-property-slider-prev,
html[dir="rtl"] #filter-property-slider-next {
    transform: rotate(180deg);
}

/* Footer (Vue-driven guest footer) */
html[dir="rtl"] .footer .header-footer .content,
html[dir="rtl"] .footer .body-footer .group-links,
html[dir="rtl"] .footer .contact-stack,
html[dir="rtl"] .footer .group-contact,
html[dir="rtl"] .footer .group-contact .title-group,
html[dir="rtl"] .footer .copyright-footer {
    text-align: right;
}

html[dir="rtl"] .footer .group-contact,
html[dir="rtl"] .footer .social-links,
html[dir="rtl"] .footer .download-links {
    align-items: flex-start;
}

html[dir="rtl"] .footer .social-links,
html[dir="rtl"] .footer .download-links {
    justify-content: flex-start;
}

html[dir="rtl"] .footer .links,
html[dir="rtl"] .footer .links a {
    text-align: right;
}

html[dir="rtl"] .footer .header-footer .container .logo img {
    object-position: right center;
}

html[dir="rtl"] .footer .copyright-footer .copyright-scene img {
    object-position: right bottom;
    transform: scaleX(-1);
}

/* Navbar: labels and dropdowns */
html[dir="rtl"] .navbar .username,
html[dir="rtl"] .navbar .list-menu,
html[dir="rtl"] .navbar .dropdown-menu,
html[dir="rtl"] .navbar .dropdown-item {
    text-align: right;
}

/* Language switcher stays LTR so EN | عربي order is stable in RTL pages */
html[dir="rtl"] #language-select .btn-language-toggle {
    direction: ltr;
}

/* Host header profile menu — "Go to Guest View" pill stays LTR flex for icon; align Arabic lines to logical end */
html[dir="rtl"] .host-header .profile-menu .dropdown-item.btn-white-purple .download-text {
    align-items: flex-end;
}

/* Property / listing cards */
html[dir="rtl"] .property-card,
html[dir="rtl"] .card-offer,
html[dir="rtl"] .swiper-gallery-card .details {
    text-align: right;
}

/* Price range slider — index.css sets text-align: left on [slider] nodes */
html[dir="rtl"] .price-range-box [slider],
html[dir="rtl"] .filter-form-modal [slider] {
    text-align: start !important;
}

html[dir="rtl"] .price-range-box [slider]>div>[thumb],
html[dir="rtl"] .filter-form-modal [slider]>div>[thumb] {
    text-align: start !important;
}

/* App download strip */
html[dir="rtl"] .info-header__message {
    text-align: right;
}

/* Flip borders for info-property-2 items in RTL */
[dir="rtl"] .info-property-2 .item-property:not(:first-child) {
    border-left: none !important;
    border-right: 1px solid var(--light-strong) !important;
    padding-left: 0 !important;
    padding-right: 12px !important;
    margin-left: 0 !important;
    margin-right: 12px !important;
}

/* Ensure first child has no border on the right in RTL */
[dir="rtl"] .info-property-2 .item-property:first-child {
    border-right: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* Flip borders for info-property-3 items in RTL */
[dir="rtl"] .info-property-3 .property:not(:first-child) {
    border-left: none !important;
    border-right: 1px solid var(--light-strong) !important;
    padding-left: 0 !important;
    padding-right: 24px !important;
    margin-left: 0 !important;
    margin-right: 24px !important;
}

/* Ensure first child has no border on the right in RTL */
[dir="rtl"] .info-property-3 .property:first-child {
    border-right: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* Fix list-condition bullet positioning in RTL — keep full text visible (#158347) */
[dir="rtl"] .condition {
    padding-right: 20px !important;
    overflow: visible !important;
}

[dir="rtl"] .list-condition {
    padding-right: 0 !important;
    padding-left: 0 !important;
    list-style-position: outside !important;
    margin-inline-start: 1.1em !important;
    overflow: visible !important;
}

[dir="rtl"] .list-condition li {
    padding-right: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Fix list-details bullet positioning in RTL - bullets should be inside, text aligned consistently */
[dir="rtl"] .list-details {
    list-style-position: outside !important;
    padding-left: 0 !important;
}

[dir="rtl"] .list-details li {
    padding-right: 0 !important;
    text-indent: 0 !important;
}

/* Fix modal header layout for RTL - title on right, close button on left */
[dir="rtl"] .modal-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
}

[dir="rtl"] .modal-header .modal-title {
    text-align: right !important;
    margin: 0 !important;
}

/* Keep report / delete-account modal title bottom margin in RTL */
[dir="rtl"] #reportModal .modal-header .modal-title,
[dir="rtl"] #reportModal #reportViolationModalLabel,
[dir="rtl"] #deleteAccountConfirmModal .modal-header .modal-title,
[dir="rtl"] #deleteWithdrawalMethodModal .modal-header .modal-title,
[dir="rtl"] #deleteAccountConfirmModal #deleteAccountConfirmModalLabel,
[dir="rtl"] #deleteWithdrawalMethodModal #deleteWithdrawalMethodModalLabel,
[dir="rtl"] #rejectModal .modal-header .modal-title,
[dir="rtl"] #rejectModal #rejectModalLabel,
[dir="rtl"] #approveModal .modal-header .modal-title,
[dir="rtl"] #approveModal #approveModalLabel {
    margin-bottom: 16px !important;
}

[dir="rtl"] #idCardModal .modal-header .modal-title,
[dir="rtl"] #idCardModal #idCardModalLabel {
    margin-bottom: 0 !important;
}

[dir="rtl"] #idCardModal .modal-header {
    margin-bottom: 16px !important;
}

[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem -0.5rem -0.5rem 0 !important;
}

/* Fix modal-dialog-slide-left to slide from right in RTL */
[dir="rtl"] .modal-dialog-slide-left {
    left: auto !important;
    right: 0 !important;
    transform: translateX(100%) !important;
    width: auto !important;
    max-width: 400px !important;
}

/*
 * Filter drawer (#filterSideModal): physical LEFT in RTL/AR (Filter-Panel.png).
 * Generic rule above mirrors slide-left modals to the right; this drawer stays left.
 * Use #id + .modal class so we beat `.filter-modal.modal .modal-dialog { position:relative }`
 * and the generic `[dir=rtl] .modal-dialog-slide-left { right:0 }` rule.
 */
html[dir="rtl"] #filterSideModal.filter-modal .modal-dialog.modal-dialog-slide-left,
html[dir="rtl"] #filterSideModal .modal-dialog-slide-left,
[dir="rtl"] #filterSideModal.filter-modal .modal-dialog.modal-dialog-slide-left,
[dir="rtl"] #filterSideModal .modal-dialog-slide-left,
html[dir="rtl"] #blogFilterSortModal.filter-modal .modal-dialog.modal-dialog-slide-left,
html[dir="rtl"] #blogFilterSortModal .modal-dialog-slide-left,
[dir="rtl"] #blogFilterSortModal.filter-modal .modal-dialog.modal-dialog-slide-left,
[dir="rtl"] #blogFilterSortModal .modal-dialog-slide-left,
[dir="rtl"] .filter-modal .modal-dialog-slide-left {
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    top: var(--outing-filter-drawer-top, 0) !important;
    bottom: 0 !important;
    margin: 0 !important;
    transform: translateX(-100%) !important;
    width: 100vw !important;
    max-width: 400px !important;
}

html[dir="rtl"] #filterSideModal.filter-modal.show .modal-dialog.modal-dialog-slide-left,
html[dir="rtl"] #filterSideModal.filter-modal.show .modal-dialog,
html[dir="rtl"] #filterSideModal.show .modal-dialog-slide-left,
[dir="rtl"] #filterSideModal.filter-modal.show .modal-dialog.modal-dialog-slide-left,
[dir="rtl"] #filterSideModal.filter-modal.show .modal-dialog,
html[dir="rtl"] #blogFilterSortModal.filter-modal.show .modal-dialog.modal-dialog-slide-left,
html[dir="rtl"] #blogFilterSortModal.filter-modal.show .modal-dialog,
html[dir="rtl"] #blogFilterSortModal.show .modal-dialog-slide-left,
[dir="rtl"] #blogFilterSortModal.filter-modal.show .modal-dialog.modal-dialog-slide-left,
[dir="rtl"] #blogFilterSortModal.filter-modal.show .modal-dialog,
[dir="rtl"] .filter-modal.show .modal-dialog-slide-left,
[dir="rtl"] .filter-modal.show .modal-dialog {
    transform: translateX(0) !important;
    top: var(--outing-filter-drawer-top, 0) !important;
    left: 0 !important;
    right: auto !important;
}

/* Left-edge drawer (AR): shadow falls toward page content (to the right). */
[dir="rtl"] .filter-modal .modal-content {
    max-height: calc(100dvh - var(--outing-filter-drawer-top, 0px));
    box-shadow:
        4px 0 24px rgba(70, 41, 90, 0.14),
        2px 0 12px rgba(0, 0, 0, 0.08);
}

/* Fix scrollbar and overflow for RTL modal */
[dir="rtl"] .modal-dialog-slide-left .modal-content {
    overflow-x: hidden !important;
    width: 100% !important;
}

[dir="rtl"] .modal-dialog-slide-left .modal-body {
    overflow-x: hidden !important;
}

/* Features sheet: slide from left inside left-edge AR drawer. */
[dir="rtl"] .filter-extra-attributes-panel {
    left: 0;
    right: 0;
    transform: translateX(-100%);
    z-index: 20;
}

[dir="rtl"] .filter-extra-attributes-panel.is-open {
    transform: translateX(0);
}

[dir="rtl"] .filter-extra-attributes-panel__content {
    box-shadow: none;
}

[dir="rtl"] .filter-extra-attributes-form .list-checkbox-2 .group-checkbox .checkmark {
    margin-right: 0;
    margin-left: 6px;
}

/* Fix RTL elements inside modal - checkbox/radio groups */
[dir="rtl"] .list-checkbox .group-checkbox,
[dir="rtl"] #reportModal .list-checkbox .group-checkbox,
[dir="rtl"] .from-report .list-checkbox .group-checkbox {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

[dir="rtl"] .group-checkbox input[type="radio"],
[dir="rtl"] .group-checkbox input[type="checkbox"] {
    order: 3 !important;
}

[dir="rtl"] .group-checkbox .check-mark {
    order: 2 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Report modal: keep checkmark at inline-start (right in RTL) — do not reorder */
[dir="rtl"] #reportModal .list-checkbox .group-checkbox > .check-mark,
[dir="rtl"] #reportModal .group-checkbox .check-mark {
    order: 0 !important;
}

[dir="rtl"] #reportModal .list-checkbox .group-checkbox > span:last-child {
    order: 0 !important;
    text-align: start !important;
    margin: 0 !important;
}

[dir="rtl"] .group-checkbox label:not(.check-mark),
[dir="rtl"] #reportModal .group-checkbox label:not(.check-mark) {
    order: 1 !important;
    text-align: right !important;
    margin: 0 !important;
}

/* Fix form elements text alignment in RTL */
[dir="rtl"] .form-group .title-group,
[dir="rtl"] .form-group label,
[dir="rtl"] .form-label {
    text-align: right !important;
}

[dir="rtl"] #addUnitToListFav .list-groups-fav .list-group-item .title-group {
    text-align: center !important;
}

[dir="rtl"] .form-control,
[dir="rtl"] textarea {
    text-align: right !important;
    direction: rtl !important;
}

/* Fix select2 dropdown arrow position in RTL */
[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: auto !important;
    left: 8px !important;
}

[dir="rtl"] .select2-container--default .select2-selection--single {
    padding-right: 14px !important;
    padding-left: 30px !important;
}

/* Fix buttons with icons in RTL - icon should be on the right */
[dir="rtl"] .btn {
    flex-direction: row-reverse !important;
}

/* Host reservations status filters: icon above label (beats global .btn row-reverse). */
html[dir="rtl"] .filter-reservation .filter-btn {
    flex-direction: column !important;
}

html[dir="rtl"] .filter-reservation .filter-btn .custom-icon {
    order: 0 !important;
}

/* Booking sidebar "Edit" dates: keep icon before label at inline-start (global .btn RTL rule reverses flex). */
html[dir="rtl"] .booking-details .header-booking-details-content .btn.btn-white-purple {
    flex-direction: row !important;
}

/* Create-account profile upload: Arrow-up must sit at inline-start (right in RTL).
   Global [dir=rtl] .btn { flex-direction: row-reverse !important } would put it at inline-end. */
html[dir="rtl"] .create-account .form-group.upload-image label.btn.btn-white-purple,
html[dir="rtl"] .create-host-form .form-group.upload-image label.btn.btn-white-purple,
html[dir="rtl"] .form-personal-info .form-group.upload-image label.btn.btn-white-purple {
    flex-direction: row !important;
}

html[dir="rtl"] #add-holiday-price-app .btn.btn-add,
html[dir="rtl"] #add-holiday-price-app .add-coupon-form > .btn.btn-gradient-3,
html[dir="rtl"] #host-unit-price-app .add-new-offer,
html[dir="rtl"] #host-unit-price-app .advanced-config .btn-gray2,
html[dir="rtl"] #host-unit-price-advanced-app .add-coupon-form > .btn.btn-gradient-3,
html[dir="rtl"] #host-unit-price-advanced-app .check-content > .btn.btn-gray {
    flex-direction: row !important;
}

/* Submit CTA: keep check icon at inline-start (before the label in Arabic).
   Only when the icon is first in the DOM (Save Price). Set Price is label-then-arrow. */
html[dir="rtl"] #add-holiday-price-app .add-coupon-form > .btn.btn-gradient-3 > .custom-icon,
html[dir="rtl"] #host-unit-price-app .add-new-offer > .custom-icon:first-child,
html[dir="rtl"] #host-unit-price-app .advanced-config .btn-gray2 > .custom-icon,
html[dir="rtl"] #host-unit-price-advanced-app .add-coupon-form > .btn.btn-gradient-3 > .custom-icon,
html[dir="rtl"] #host-unit-price-advanced-app .check-content > .btn.btn-gray > .custom-icon {
    order: 1 !important;
}

html[dir="rtl"] #add-holiday-price-app .add-coupon-form > .btn.btn-gradient-3 > span:not(.custom-icon),
html[dir="rtl"] #host-unit-price-app .add-new-offer > .custom-icon:first-child ~ span:not(.custom-icon),
html[dir="rtl"] #host-unit-price-app .advanced-config .btn-gray2 > span:not(.custom-icon),
html[dir="rtl"] #host-unit-price-advanced-app .add-coupon-form > .btn.btn-gradient-3 > span:not(.custom-icon),
html[dir="rtl"] #host-unit-price-advanced-app .check-content > .btn.btn-gray > span:not(.custom-icon) {
    order: 2 !important;
}

/* Set Price: keep the arrow after the label (physical left of the text in RTL). */
html[dir="rtl"] #host-unit-price-app .add-new-offer > span:first-child:not(.custom-icon) {
    order: 1 !important;
}

html[dir="rtl"] #host-unit-price-app .add-new-offer > span:first-child:not(.custom-icon) + .custom-icon {
    order: 2 !important;
}

/* Calendar month/year Select2: beat global RTL select2 padding (arrow is hidden like home). */
html[dir="rtl"] #host-unit-price-advanced-app .daterangepicker th.month .select2-selection--single {
    padding: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

[dir="rtl"] .btn .custom-icon {
    order: 2 !important;
}

[dir="rtl"] .btn span:not(.custom-icon) {
    order: 1 !important;
}

/* Guest home: store / host / search buttons — icon at inline-start (design). */
html[dir="rtl"] .info-header .info-header__store-btn,
html[dir="rtl"] #header-app .navbar-nav .nav-item > .btn.btn-purple-brand,
html[dir="rtl"] .filter-box .submit-btn,
html[dir="rtl"] .box-donwload .download-buttons .btn,
html[dir="rtl"] #otp-change-number-btn,
html[dir="rtl"] #createAccountEmailOtpModal .otp-phone-section .btn-link,
html[dir="rtl"] #createAccountPhoneOtpModal .otp-phone-section .btn-link,
html[dir="rtl"] #personalInfoEmailOtpModal .otp-phone-section .btn-link,
html[dir="rtl"] #hostAccountEmailOtpModal .otp-phone-section .btn-link,
html[dir="rtl"] #hostAccountPhoneOtpModal .otp-phone-section .btn-link,
html[dir="rtl"] #personalInfoPhoneOtpModal .otp-phone-section .btn-link {
    flex-direction: row !important;
}

html[dir="rtl"] #otpModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #loginModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #createAccountEmailOtpModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #createAccountPhoneOtpModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #personalInfoEmailOtpModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #hostAccountEmailOtpModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #hostAccountPhoneOtpModal .modal-dialog .container .modal-content .modal-body .otp-resend,
html[dir="rtl"] #personalInfoPhoneOtpModal .modal-dialog .container .modal-content .modal-body .otp-resend {
    justify-content: flex-end;
}

/* Fix modal body text alignment */
[dir="rtl"] .modal-body {
    text-align: right !important;
}

[dir="rtl"] .modal-body .details {
    text-align: right !important;
}

/* Fix chat-panel positioning for RTL - move from right to left */
[dir="rtl"] .chat-panel {
    right: auto !important;
    left: 0 !important;
}

/* Fix padding for container with chat-panel in RTL */
[dir="rtl"] .section-with-sticky .container:has(.chat-panel) {
    padding-inline-end: 0 !important;
    padding-inline-start: 400px !important;
}

/* Fix close button position in chat-panel for RTL */
[dir="rtl"] .chat-panel .close-chats {
    right: auto !important;
    left: 15px !important;
}

/* Fix mobile chat-panel positioning for RTL */
@media (max-width: 992px) {
    [dir="rtl"] .chat-panel {
        right: auto !important;
        left: -100% !important;
    }

    [dir="rtl"] .chat-panel.show {
        right: auto !important;
        left: 0 !important;
    }
}

/* Fix toggle-chat button alignment for RTL */
[dir="rtl"] .toggle-chat {
    align-self: flex-start !important;
}

/* Fix account-details item-info border positioning in RTL */
[dir="rtl"] .account-details .item-info:not(:first-child)::before {
    left: auto !important;
    right: -16px !important;
}

/* Flip angle-down-small-gray arrows in RTL */
[dir="rtl"] .setting-item .custom-icon img[src*="angle-down-small-gray"] {
    transform: scaleX(-1) !important;
}

/* Center text in item-payment-way button for RTL */
[dir="rtl"] .item-payment-way.btn .title-item {
    justify-content: center !important;
    width: 100% !important;
}

/* Position send-btn on the right side of input in RTL (legacy pages using physical left/right) */
[dir="rtl"] .input-container .send-btn:not(.send-btn--logical) {
    left: auto !important;
    right: 8px !important;
}

/* Support chat: send at the END of the input (left in RTL / right in LTR) */
.support-center .support-chat .chat-from .input-container .send-btn,
[dir="rtl"] .support-center .support-chat .chat-from .input-container .send-btn {
    inset-inline-end: 8px !important;
    inset-inline-start: auto !important;
    left: auto !important;
    right: auto !important;
}

[dir="rtl"] .support-center .support-chat .chat-from .input-container .send-btn {
    left: 8px !important;
    right: auto !important;
}

[dir="ltr"] .support-center .support-chat .chat-from .input-container .send-btn {
    right: 8px !important;
    left: auto !important;
}

.support-center .support-chat .chat-from .form-control {
    padding-inline-start: 16px !important;
    padding-inline-end: 45px !important;
}

[dir="rtl"] .support-center .support-chat .chat-from .form-control {
    padding-left: 45px !important;
    padding-right: 16px !important;
}

[dir="ltr"] .support-center .support-chat .chat-from .form-control {
    padding-right: 45px !important;
    padding-left: 16px !important;
}

/* Fix price range slider for RTL */
[dir="rtl"] [slider] {
    direction: ltr !important;
    /* Keep slider logic LTR, but we'll flip visually */
}

/* [dir="rtl"] [slider]>div>[inverse-left] {
    left: auto !important;
    right: 0 !important;
}

[dir="rtl"] [slider]>div>[inverse-right] {
    right: auto !important;
    left: 0 !important;
} */

[dir="rtl"] [slider]>div>[range] {
    z-index: 1 !important;
    /* Ensure range bar is above inverse bars */
}

[dir="rtl"] [slider]>div>[thumb] {
    margin-left: 0 !important;
    margin-right: -0px !important;
}

[dir="rtl"] [slider]>div>[sign] {
    margin-left: 0 !important;
    margin-right: -0px !important;
}

[dir="rtl"] [slider]>div>[sign]:after {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] [slider]>input[type=range] {
    direction: rtl !important;
}

[dir="rtl"] .year-statistics-slider img,
[dir="rtl"] .setting-item .custom-icon img,
[dir="rtl"] .setting-item .custom-icon img[src*="angle-down-small-gray"],
[dir="rtl"] .header-add-type .left-side .go-back img,
[dir="rtl"] .header-add-type .left-side .back img {
    rotate: 180deg;
    transform: none !important;
}

[dir="rtl"] .list-settings .setting-item > .custom-icon {
    rotate: 180deg;
}

[dir="rtl"] .unit-config .item-config .custom-icon img.no-rtl-flip {
    rotate: 0deg;
    transform: none !important;
}

[dir="rtl"] .unit-config .item-config .nav-arrow img {
    rotate: 0deg;
    transform: rotate(90deg) !important;
}

[dir="rtl"] .unit-reviews-back img {
    transform: scaleX(-1) !important;
}

[dir="rtl"] .unit-form .container .bottom-form {
    flex-direction: row-reverse;

    .btn-gradient-3 {
        flex-direction: row !important;
    }
}

[dir="rtl"] .cuustom-unit-actions .btn {
    [dir="rtl"] .cuustom-unit-actions .btn {
        justify-content: center;
    }


    [dir="rtl"] .unit-form .group-actions .btn,
    [dir="rtl"] .unit-form .container .flower-rooms-form .btn-gray {
        justify-content: flex-end !important;
    }

    [dir="rtl"] .form-group.upload-image {
        text-align: start;
    }
}

/* Upload button: align icon+label to inline-end (right) in RTL.
   Supersedes the dead, mis-nested rule in the .cuustom-unit-actions block above. */
[dir="rtl"] .unit-form .group-actions .btn {
    justify-content: flex-end !important;
}

/* Host CMS banners: reverse nav button order for RTL layout */
[dir="rtl"] .host-cms-banners .host-cms-banners-nav {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

[dir="rtl"] .tech-support .footer-from .btn img,
[dir="rtl"] .tech-support .footer-from .top-side .title .custom-icon img {
    rotate: -90deg;
}

[dir="rtl"] #otpModal,
[dir="rtl"] #loginModal,
[dir="rtl"] #createAccountEmailOtpModal,
[dir="rtl"] #createAccountPhoneOtpModal,
[dir="rtl"] #personalInfoEmailOtpModal,
[dir="rtl"] #hostAccountEmailOtpModal,
[dir="rtl"] #hostAccountPhoneOtpModal,
[dir="rtl"] #personalInfoPhoneOtpModal,
[dir="rtl"] #logoutConfirmModal {
    .modal-dialog {
        .container {
            .modal-content {
                .modal-body {
                    .number-group {
                        flex-direction: row-reverse;

                        input {
                            direction: ltr !important;
                        }
                    }
                }
            }
        }
    }
}

[dir="rtl"] #loginModal,
[dir="rtl"] #logoutConfirmModal {
    .modal-dialog {
        .container {
            .modal-content {
                .modal-body {
                    .country-code-static {
                        direction: ltr;
                    }

                    .number-group {
                        flex-direction: row-reverse;

                        input {
                            text-align: left !important;
                        }
                    }
                }
            }
        }
    }
}

[dir="rtl"] #otpModal {
    .modal-dialog {
        .container {
            .modal-content {
                .modal-header {
                    #otp-phone-section {
                        #otp-phone-number {
                            direction: ltr !important;
                            unicode-bidi: isolate;
                        }
                    }
                }
            }
        }
    }
}

[dir="rtl"] #createAccountPhoneOtpModal .otp-phone-number,
[dir="rtl"] #personalInfoPhoneOtpModal .otp-phone-number,
[dir="rtl"] #personalInfoEmailOtpModal .otp-phone-number,
[dir="rtl"] #hostAccountEmailOtpModal .otp-phone-number,
[dir="rtl"] #hostAccountPhoneOtpModal .otp-phone-number {
    direction: ltr !important;
    unicode-bidi: isolate;
}

[dir="rtl"] #otpModal {
    .modal-dialog {
        .container {
            .modal-content {
                .modal-body {
                    #otpForm {
                        .container-otp-box {
                            input {
                                text-align: center !important;
                            }
                        }
                    }
                }
            }
        }
    }
}

[dir="rtl"] .container-otp-box input {
    text-align: center !important;
}

[dir="rtl"] #toast-container .btn-close {
    margin-right: auto !important;
    margin-left: .5rem !important;
}

[dir="rtl"] .unit-form .container .bottom-form .btn-gradient-3.add-unit-next-btn .custom-icon.icon-white img {
    rotate: 180deg;
}

[dir="rtl"] .unit-form .container .bottom-form .btn-transparent.add-unit-back-btn .custom-icon img {
    rotate: 180deg;
}

[dir="rtl"] .profile-menu .dropdown-menu {
    left: 0;
    right: auto;
}

/* Host dashboard — app download banner (gradient direction for RTL; mascot/padding use logical props in host.css) */
[dir="rtl"] .download-app-section .download-content {
    background: linear-gradient(270deg, #783EA1 0%, #FF6249 100%) !important;
}

@media (max-width: 558px) {

    /* Pair with host.css: LTR switches to 270deg here; RTL uses 90deg for a consistent sweep */
    [dir="rtl"] .download-app-section .download-content {
        background: linear-gradient(90deg, #783EA1 0%, #FF6249 100%) !important;
    }
}

/* Breadcrumb divider: Bootstrap 5 uses physical float:left + padding-right for the
 * `::before` separator, which leaves the arrow on the physical-left side even when
 * the document direction is RTL. Flip both the float and the padding so the divider
 * sits between items in reading order, and invert the glyph so it visually points
 * toward the next item (Arabic flows right-to-left, so ">" becomes "<"). 
*/
[dir="rtl"] .breadcrumb-item+.breadcrumb-item {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}

[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before {
    float: right !important;
    padding-right: 0 !important;
    padding-left: 0.5rem !important;
    display: inline-block;
}

[dir="rtl"] #header-app .profile-menu .dropdown-menu .dropdown-item.join-as-host-item .download-text {
    align-items: end;
}

html[dir="rtl"] .right-side .card-direction .checkmark {
    left: auto;
    right: 12px;
}

/* Property card gallery: nav buttons sit outside .swiper, so .swiper-rtl rules from
 * swiper-bundle never reach them. Mirror Swiper's RTL behavior: swap left/right and
 * swap ::after content exactly like .swiper-rtl .swiper-button-next/prev (not rotate). */
html[dir="rtl"] .card-offer .header-card .swiper-arrows .swiper-button-prev {
    right: var(--swiper-navigation-sides-offset, 10px);
    left: auto;
}

html[dir="rtl"] .card-offer .header-card .swiper-arrows .swiper-button-next {
    left: var(--swiper-navigation-sides-offset, 10px);
    right: auto;
}

/* Same as swiper-bundle: .swiper-button-prev:after,.swiper-rtl .swiper-button-next:after */
html[dir="rtl"] .card-offer .header-card .swiper-arrows .swiper-button-next::after {
    content: "prev";
}

/* Same as swiper-bundle: .swiper-button-next:after,.swiper-rtl .swiper-button-prev:after */
html[dir="rtl"] .card-offer .header-card .swiper-arrows .swiper-button-prev::after {
    content: "next";
}

.similar-properties-section .header-content .section-slider-arrows .popup-arrow img {
    rotate: 180deg;
}

html[dir="rtl"] .form-host-content {
    .create-host-form {
        .form-group.upload-image {
            text-align: start;
        }
    }
}

html[dir="rtl"] #reportModal .list-checkbox .group-checkbox {
    flex-direction: row !important;
    justify-content: flex-start !important;
}

html[dir="rtl"] #reportModal .list-checkbox .group-checkbox > .check-mark,
html[dir="rtl"] #reportModal .list-checkbox .group-checkbox > span:last-child {
    order: 0 !important;
}
html[dir="rtl"] .support-center .container .right-side .direct-contact .custom-icon{
    rotate: -90deg;
}

/* Choose-add-unit-type: unit select chevron at physical left (field end in RTL). */
html[dir="rtl"] .form-group .group-input.step-4-select-unit .form-select {
    background-position: left 0.5rem center !important;
}

/* Keep filter drawer flush to physical left; neutralize Bootstrap scroll-lock gap */
html[dir="rtl"] body.modal-open:has(#filterSideModal.show),
html[dir="rtl"] body.modal-open:has(#blogFilterSortModal.show),
html[dir="rtl"] body.modal-open:has(#invoiceSortModal.show),
html[dir="rtl"] body.modal-open:has(#invoiceFilterModal.show) {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

html[dir="rtl"] #filterSideModal.filter-modal .modal-dialog.modal-dialog-slide-left,
[dir="rtl"] #filterSideModal .modal-dialog-slide-left,
html[dir="rtl"] #blogFilterSortModal.filter-modal .modal-dialog.modal-dialog-slide-left,
[dir="rtl"] #blogFilterSortModal .modal-dialog-slide-left {
    left: 0 !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
