/* ============================================================
   EN / AR button and the Arabic (right-to-left) look
   ============================================================ */

/* Small round language button next to "Post Listing" */

.lang-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--fg);
    font: 700 11px/1 var(--font-sans);
    letter-spacing: 0.02em;
    cursor: pointer;
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}


/* Arabic font */

html[lang="ar"] {
    --font-sans: "Cairo", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* Spacing between letters breaks joined Arabic letters */
html[lang="ar"] * {
    letter-spacing: 0 !important;
}

/* Arabic letters are taller, give big headings more room */
html[lang="ar"] h1 {
    line-height: 1.3;
}

/* Text people typed (names, comments, details) keeps its own direction,
   so an English comment on the Arabic site still reads correctly */
.comment-text,
.body-text,
.notes,
.bubble,
.chat-item .last,
.chat-item .about {
    unicode-bidi: plaintext;
}

/* Phone numbers and prices always read left to right */

html[dir="rtl"] .mono,
html[dir="rtl"] input[inputmode="tel"],
html[dir="rtl"] input[type="number"] {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] .price {
    direction: ltr;
    unicode-bidi: isolate;
}


@media (max-width: 760px) {
    .lang-btn {
        width: 30px;
        height: 30px;
        font-size: 10.5px;
    }
}
