/* ===================================================
   RTL CORE
=================================================== */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* ===================================================
   BOOTSTRAP UTILITIES FIX
=================================================== */

/* Margin helpers */
html[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* Text alignment */
html[dir="rtl"] .text-start {
    text-align: right !important;
}

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

/* Float */
html[dir="rtl"] .float-start {
    float: right !important;
}

html[dir="rtl"] .float-end {
    float: left !important;
}

/* ===================================================
   GRID & FLEX
=================================================== */

/* Reverse common flex rows */
html[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

/* Keep column order when needed */
html[dir="rtl"] .flex-row-reverse {
    flex-direction: row;
}

/* ===================================================
   HEADER / NAVBAR
=================================================== */

html[dir="rtl"] .navbar .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
}

/* Navbar toggler icon alignment */
html[dir="rtl"] .navbar-toggler {
    margin-left: 0;
    margin-right: auto;
}

/* ===================================================
   DROPDOWN / OFFCANVAS / MODAL
=================================================== */

/* Dropdown */
html[dir="rtl"] .dropdown-menu {
    text-align: right;
}

/* Offcanvas */
html[dir="rtl"] .offcanvas-start {
    right: 0;
    left: auto;
}

html[dir="rtl"] .offcanvas-end {
    left: 0;
    right: auto;
}

/* Modal close button */
html[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

/* ===================================================
   FORMS
=================================================== */

html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
    text-align: right;
}

html[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

html[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

/* Input group */
html[dir="rtl"] .input-group>.form-control {
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

/* ===================================================
   BUTTONS & ICONS
=================================================== */

/* Button icon spacing */
html[dir="rtl"] .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Flip directional icons */
html[dir="rtl"] .icon-arrow,
html[dir="rtl"] .bi-arrow-right,
html[dir="rtl"] .bi-chevron-right {
    transform: scaleX(-1);
}

/* ===================================================
   BREADCRUMB
=================================================== */

html[dir="rtl"] .breadcrumb {
    justify-content: flex-end;
}

html[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before {
    float: right;
    transform: rotate(180deg);
}

/* ===================================================
   PAGINATION
=================================================== */

html[dir="rtl"] .pagination {
    justify-content: flex-end;
}

/* ===================================================
   CARD / LIST / MEDIA
=================================================== */

html[dir="rtl"] .list-group {
    padding-right: 0;
}

html[dir="rtl"] .list-group-item {
    text-align: right;
}

/* ===================================================
   SLIDER / CAROUSEL
=================================================== */

html[dir="rtl"] .carousel-control-prev {
    right: 0;
    left: auto;
}

html[dir="rtl"] .carousel-control-next {
    left: 0;
    right: auto;
}

html[dir="rtl"] .carousel-control-prev-icon,
html[dir="rtl"] .carousel-control-next-icon {
    transform: scaleX(-1);
}

/* ===================================================
   CUSTOM COMPONENTS (SAFE BASE)
=================================================== */

/* Section titles */
html[dir="rtl"] .fdx-nav__toggle {
    margin-left: 0px;
    margin-right: 25px;
}

html[dir="rtl"] .fd-reservation__image-wrapper {
    border-radius: 0 150px 150px 0;
}

html[dir="rtl"] .fd-footer .fd-btn--submit {
    left: 0;
    right: auto;
}

html[dir="rtl"] .fd-blog {
    flex-direction: row-reverse;
}

/* ===================================================
   END RTL
=================================================== */