/* ======================================================================
   Calma Chalet — Arabic / right-to-left extras
   Loaded only when the page language is Arabic (after every other stylesheet).
   The Cairo font files live in assets/fonts (SIL Open Font License).
   ====================================================================== */

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../assets/fonts/cairo-arabic-400-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../assets/fonts/cairo-latin-400-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../assets/fonts/cairo-arabic-600-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../assets/fonts/cairo-latin-600-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../assets/fonts/cairo-arabic-700-normal.woff2) format('woff2');
    unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../assets/fonts/cairo-latin-700-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
    --font-body:    'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    --font-display: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* letter-spacing breaks the joined Arabic letters */
html[dir="rtl"] * {
    letter-spacing: normal !important;
}

html[dir="rtl"] body {
    line-height: 1.75;
}

/* things that must stay left-to-right even inside Arabic text */
.ltr,
html[dir="rtl"] bdi.ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input.ltr {
    direction: ltr;
    text-align: right;
}

/* while a box is still empty its grey hint is Arabic text, so it is shown right-to-left;
   what the visitor types (e-mail, number, password) stays left-to-right */
html[dir="rtl"] input[type="email"]:placeholder-shown,
html[dir="rtl"] input[type="tel"]:placeholder-shown,
html[dir="rtl"] input[type="url"]:placeholder-shown,
html[dir="rtl"] input[type="number"]:placeholder-shown,
html[dir="rtl"] input[type="password"]:placeholder-shown,
html[dir="rtl"] input.ltr:placeholder-shown {
    direction: rtl;
}


/* ---------- public header + pages ---------- */
html[dir="rtl"] .nav-dropdown__content {
    right: auto;
    left: 0;
}

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

/* ---------- the calendar is a grid of numbers: keep it left-to-right ---------- */
html[dir="rtl"] .flatpickr-calendar {
    direction: ltr;
}

/* ---------- chalets page: filters on the right, results on the left (wide screens only) ---------- */
@media (min-width: 901px) {
    html[dir="rtl"] form.sidebar { float: right; }
    html[dir="rtl"] .results-area { float: left; }
}

/* ---------- admin / owner / user panels ---------- */
html[dir="rtl"] .kpi-card::before {
    left: auto;
    right: 0;
    border-radius: 0 4px 4px 0;
}

html[dir="rtl"] .navbar__notif__dot {
    right: auto;
    left: 6px;
}

html[dir="rtl"] .table-search {
    padding: 8px 36px 8px 14px;
    background-position: right 12px center;
}

html[dir="rtl"] .filter-select {
    padding: 8px 12px 8px 28px;
    background-position: left 10px center;
}

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

html[dir="rtl"] .navbar__admin-badge {
    margin-inline-start: 0;
}

/* the small x on picture thumbnails */
html[dir="rtl"] .preview-item .remove-prev,
html[dir="rtl"] .del-btn {
    right: auto;
    left: 5px;
}

/* big "arrow" characters that point forward */
html[dir="rtl"] .flip-rtl {
    display: inline-block;
    transform: scaleX(-1);
}
