/**
 * NECOX RTL Stylesheet (v3.68.0)
 *
 * Sadece <body class="necox-rtl"> aktifse uygulanir.
 * Aktif olmasi icin admin paneldenve eklenen dil RTL kodu olmali (ar/he/fa/ur).
 *
 * Yaklasim: layout doninusumlerini "automatic mirroring" ile yapariz —
 * float/text-align/margin/padding flip + flex-direction tersine cevir.
 *
 * Kapsanan alanlar:
 *   - Genel layout (header, footer, sidebar)
 *   - Ad card (resim solda -> saga geçer)
 *   - Filter sidebar (sol -> sag)
 *   - Single advert (galeri solda -> saga geçer)
 *   - Dashboard (sol panel -> sag panele geçer)
 *   - Pricing kartlar (popular badge sag -> sol)
 *   - Cookie panel
 *   - Modal kapatma butonu
 *
 * NOT: Tum CSS bu dosyada degil — kritik flipler burada, geri kalan
 * kosullari orijinal CSS'lerde [dir="rtl"] selectorlar ile kontrol edilir.
 */

/* ════════════════════════════════════════════════
   GLOBAL RTL TEMEL
   ════════════════════════════════════════════════ */
.necox-rtl {
    direction: rtl;
    text-align: right;
}

.necox-rtl input[type="text"],
.necox-rtl input[type="search"],
.necox-rtl input[type="email"],
.necox-rtl input[type="tel"],
.necox-rtl input[type="url"],
.necox-rtl input[type="number"],
.necox-rtl textarea,
.necox-rtl select {
    text-align: right;
}

/* Numerik degerler (fiyat, telefon, tarih) LTR kalsin */
.necox-rtl .necox-price,
.necox-rtl .necox-phone,
.necox-rtl .necox-date,
.necox-rtl input[type="number"] {
    direction: ltr;
    text-align: right;
}

/* Genel padding/margin flip — utility class'lar */
.necox-rtl [class*="ml-"],
.necox-rtl [class*="ms-"] {
    margin-left: 0 !important;
}
.necox-rtl [class*="mr-"],
.necox-rtl [class*="me-"] {
    margin-right: 0 !important;
}

/* ════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════ */
.necox-rtl .necox-header {
    direction: rtl;
}
.necox-rtl .necox-header__logo { margin-right: 0; margin-left: auto; }
.necox-rtl .necox-header__nav { flex-direction: row-reverse; }
.necox-rtl .necox-header__actions { flex-direction: row-reverse; }

/* Lang switcher RTL */
.necox-rtl .necox-lang-switcher__dropdown {
    right: auto;
    left: 0;
}

/* ════════════════════════════════════════════════
   AD CARD
   ════════════════════════════════════════════════ */
.necox-rtl .necox-ad-card { text-align: right; }
.necox-rtl .necox-ad-card__title { text-align: right; }
.necox-rtl .necox-ad-card__price { text-align: left; direction: ltr; }
.necox-rtl .necox-ad-card__location { flex-direction: row-reverse; }
.necox-rtl .necox-ad-card__location svg { margin-right: 0; margin-left: 4px; }

/* List view (yatay kart) — gorseller saga gecer */
.necox-rtl .necox-ad-card--list {
    flex-direction: row-reverse;
}

/* Badges sol uste yapis -> sag uste */
.necox-rtl .necox-ad-card__badge {
    left: auto;
    right: 8px;
}
.necox-rtl .necox-ad-card__badge--right {
    right: auto;
    left: 8px;
}

/* ════════════════════════════════════════════════
   SEARCH FILTER SIDEBAR
   ════════════════════════════════════════════════ */
.necox-rtl .necox-search-results {
    direction: rtl;
}
.necox-rtl .necox-search-results__sidebar {
    /* Sidebar sol -> sag */
    order: 2;
}
.necox-rtl .necox-search-results__main {
    order: 1;
}
.necox-rtl .necox-filter-group__title { text-align: right; }
.necox-rtl .necox-filter-checkbox { flex-direction: row-reverse; }
.necox-rtl .necox-filter-checkbox input { margin-right: 0; margin-left: 8px; }

/* ════════════════════════════════════════════════
   SINGLE ADVERT (Ilan Detay)
   ════════════════════════════════════════════════ */
.necox-rtl .single-advert,
.necox-rtl .necox-single-advert {
    direction: rtl;
}
.necox-rtl .single-advert__layout {
    /* Galeri sol -> sag, content sol -> sag */
    grid-template-areas:
        "content gallery"
        "sidebar gallery";
}
.necox-rtl .single-advert__cf-table { text-align: right; }
.necox-rtl .single-advert__breadcrumb { flex-direction: row-reverse; }
.necox-rtl .single-advert__price { direction: ltr; text-align: left; }

/* Aksiyon butonlari */
.necox-rtl .single-advert__actions { flex-direction: row-reverse; }

/* ════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════ */
.necox-rtl .necox-dashboard {
    direction: rtl;
}
.necox-rtl .necox-dashboard__sidebar {
    order: 2;
}
.necox-rtl .necox-dashboard__main {
    order: 1;
}
.necox-rtl .necox-dashboard__menu-item { flex-direction: row-reverse; }
.necox-rtl .necox-dashboard__menu-item .dashicons { margin-right: 0; margin-left: 8px; }

/* ════════════════════════════════════════════════
   PRICING (Paketler)
   ════════════════════════════════════════════════ */
.necox-rtl .necox-pp__hero { direction: rtl; text-align: center; }
.necox-rtl .necox-pp__features li {
    flex-direction: row-reverse;
    text-align: right;
}
.necox-rtl .necox-pp__features li::before {
    margin-right: 0;
    margin-left: 10px;
}
.necox-rtl .necox-pp__compare-table thead th:first-child,
.necox-rtl .necox-pp__compare-table tbody td:first-child {
    text-align: right;
    padding-left: 16px;
    padding-right: 24px;
}

/* ════════════════════════════════════════════════
   CHECKOUT (Odeme)
   ════════════════════════════════════════════════ */
.necox-rtl .necox-page-payment { direction: rtl; }
.necox-rtl .necox-pp-pricing-header { direction: rtl; }
.necox-rtl .necox-pp-card-row { flex-direction: row-reverse; }
.necox-rtl .necox-pp-feature { flex-direction: row-reverse; }
.necox-rtl .necox-pp-feature svg { margin-right: 0; margin-left: 8px; }

/* ════════════════════════════════════════════════
   YASAL SAYFALAR (KVKK / Cerez / Mesafeli)
   ════════════════════════════════════════════════ */
.necox-rtl .necox-page-legal { direction: rtl; }
.necox-rtl .necox-page-legal__hero { text-align: center; direction: rtl; }
.necox-rtl .necox-page-legal__breadcrumb { direction: rtl; }
.necox-rtl .has-toc-layout .necox-page-legal__main-inner {
    grid-template-columns: 1fr 260px; /* TOC saga gecer */
}
.necox-rtl .necox-page-legal__toc-list a {
    border-left: none;
    border-right: 2px solid transparent;
    text-align: right;
}
.necox-rtl .necox-page-legal__toc-list a.is-active {
    border-right-color: var(--pl-toc-active-border, #FFCC04);
}
.necox-rtl .necox-page-legal__toc-item--3 a {
    padding-left: 12px;
    padding-right: 24px;
}
.necox-rtl .necox-page-legal__contact-item { flex-direction: row-reverse; }
.necox-rtl .necox-page-legal__contact-item svg { margin-right: 0; margin-left: 10px; }

/* Cookie panel */
.necox-rtl .necox-page-legal__cookie-cat { flex-direction: row-reverse; }
.necox-rtl .necox-page-legal__cookie-cat-name { flex-direction: row-reverse; }
.necox-rtl .necox-page-legal__cookie-toggle::after {
    left: auto;
    right: 3px;
}
.necox-rtl .necox-page-legal__cookie-toggle.is-active::after {
    transform: translateX(-22px);
}
.necox-rtl .necox-page-legal__cookie-toggle.is-disabled::after {
    transform: translateX(-22px);
}

/* Mesafeli party kartlari */
.necox-rtl .necox-page-legal__parties-grid {
    grid-template-columns: 1fr auto 1fr;
    direction: rtl;
}
.necox-rtl .necox-page-legal__parties-divider svg {
    transform: rotate(180deg); /* Ok ters cevirsin */
}
.necox-rtl .necox-page-legal__party-row { flex-direction: row-reverse; }

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
.necox-rtl .necox-footer { direction: rtl; }
.necox-rtl .necox-footer__col { text-align: right; }

/* ════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════ */
.necox-rtl .necox-modal__close {
    right: auto;
    left: 16px;
}
.necox-rtl .necox-modal__back {
    left: auto;
    right: 16px;
}
.necox-rtl .necox-modal__back svg {
    transform: rotate(180deg);
}

/* ════════════════════════════════════════════════
   FORM (Ilan Ver, Iletisim vs.)
   ════════════════════════════════════════════════ */
.necox-rtl .necox-form-row { text-align: right; }
.necox-rtl .necox-form-label { text-align: right; }
.necox-rtl .necox-form-help { text-align: right; }
.necox-rtl .necox-form-hint::before {
    margin-right: 0;
    margin-left: 4px;
}

/* ════════════════════════════════════════════════
   ICON FLIPS (YONEN OKLAR)
   ════════════════════════════════════════════════ */
/* Sol/sag ok ikonlari ters cevrilir */
.necox-rtl .dashicons-arrow-left-alt,
.necox-rtl .dashicons-arrow-left-alt2,
.necox-rtl .dashicons-arrow-right-alt,
.necox-rtl .dashicons-arrow-right-alt2 {
    transform: scaleX(-1);
}

/* Pagination okları */
.necox-rtl .necox-pagination__prev svg,
.necox-rtl .necox-pagination__next svg {
    transform: rotate(180deg);
}

/* Slider/carousel arrow flip */
.necox-rtl .swiper-button-prev,
.necox-rtl .swiper-button-next {
    transform: scaleX(-1);
}

/* Breadcrumb separator (›) (RTL'de ‹ olmali) */
.necox-rtl .necox-breadcrumb__sep::before {
    content: '‹';
}

/* ════════════════════════════════════════════════
   CHATBOT (varsa)
   ════════════════════════════════════════════════ */
.necox-rtl .necox-chatbot {
    right: auto;
    left: 24px;
}
.necox-rtl .necox-chatbot__msg--user {
    text-align: left;
}
.necox-rtl .necox-chatbot__msg--bot {
    text-align: right;
}

/* ════════════════════════════════════════════════
   FONT TWEAK FOR ARABIC
   ════════════════════════════════════════════════ */
.necox-lang-ar,
.necox-lang-he,
.necox-lang-fa,
.necox-lang-ur {
    /* Arapca/Ibranice icin sistem fontu - Latin font yerine */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Tahoma",
                 "Cairo", "Almarai", "Noto Sans Arabic", "Noto Sans Hebrew",
                 sans-serif;
}

/* Fraunces (Latin serif) RTL dillerde sistem serif'e duser */
.necox-rtl .necox-pp__hero-title,
.necox-rtl .necox-page-legal__hero-title,
.necox-rtl .necox-pp-title {
    font-family: "Amiri", "Scheherazade New", Georgia, serif;
}
