/* ============================================================
   RTL overrides for Arabic — loaded only when site_dir() == rtl
   Pragmatic pass: direction, alignment, mirrored spacing/floats.
   ============================================================ */

body {
    direction: rtl;
    text-align: right;
}

/* --- Typography: keep Latin-friendly stack but prefer Arabic-capable fonts --- */
body,
h1, h2, h3, h4, h5, h6,
input, select, textarea, button {
    font-family: 'Segoe UI', Tahoma, 'Poppins', sans-serif;
}

/* --- Generic mirroring --- */
.text-left  { text-align: right !important; }
.text-right { text-align: left !important; }

.float-left,  .pull-left  { float: right !important; }
.float-right, .pull-right { float: left !important; }

/* --- Main menu / header --- */
#menu ul,
nav.main-menu ul {
    padding-right: 0;
}
.main-menu ul li {
    text-align: right;
}

/* --- Dropdowns keep their panels on-screen --- */
.dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

/* --- Forms --- */
label {
    text-align: right;
}
input, select, textarea {
    direction: rtl;
    text-align: right;
}
/* keep phone/email/url fields LTR for readability */
input[type="email"],
input[type="tel"],
input[type="url"],
input[name*="phone"],
input[name*="email"],
input[name*="website"] {
    direction: ltr;
    text-align: right;
}
.input-group .form-control:first-child {
    border-radius: 0 0.25rem 0.25rem 0;
}

/* --- Listing cards & common components --- */
.strip_list,
.listing-card,
.card {
    text-align: right;
}
.score {
    float: left;
}
.loc_open, .loc_closed {
    float: right;
}

/* --- Breadcrumbs --- */
.breadcrumb, #breadcrumb ul {
    padding-right: 0;
}

/* --- Icon spacing: mirror common utility margins --- */
.mr-1 { margin-right: 0 !important; margin-left: .25rem !important; }
.mr-2 { margin-right: 0 !important; margin-left: .5rem  !important; }
.mr-3 { margin-right: 0 !important; margin-left: 1rem   !important; }
.ml-1 { margin-left: 0 !important;  margin-right: .25rem !important; }
.ml-2 { margin-left: 0 !important;  margin-right: .5rem  !important; }
.ml-3 { margin-left: 0 !important;  margin-right: 1rem   !important; }
.pl-0 { padding-left: initial !important; padding-right: 0 !important; }
.pr-0 { padding-right: initial !important; padding-left: 0 !important; }

/* --- Footer --- */
footer ul {
    padding-right: 0;
}
footer h5, footer ul li {
    text-align: right;
}

/* --- Back-to-top stays clear of RTL scrollbars --- */
#toTop {
    left: 25px;
    right: auto;
}

/* --- Modals / popups --- */
.modal-header .close {
    margin: -1rem auto -1rem -1rem;
}

/* --- Numbers, prices, times remain LTR inside RTL text --- */
.price, .rating, time, .opening_hours_time {
    direction: ltr;
    unicode-bidi: embed;
}
