/* ====================================
   CSS PRE NOVÉ JAZYKY - ČÍNŠTINA, JAPONČINA, ARABČINA
   ==================================== */

/* 1. FONTY PRE ÁZIJSKÉ JAZYKY */

/* Čínština */
html[lang="zh"] body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "Noto Sans CJK SC", sans-serif;
}

/* Japončina */
html[lang="ja"] body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", "Meiryo", "Source Han Sans JP", "Noto Sans CJK JP", sans-serif;
    line-height: 1.7; /* Japonské znaky potrebujú viac priestoru */
}

/* Arabčina */
html[lang="ar"] body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Arabic UI Text", "Traditional Arabic", "Noto Sans Arabic", "Droid Arabic Naskh", "Geeza Pro", sans-serif;
}

/* 2. RTL PODPORA PRE ARABČINU */

/* Základné RTL nastavenia */
html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

/* Navigácia pre RTL */
html[lang="ar"] .home-header-content {
    flex-direction: row-reverse;
}

html[lang="ar"] .home-auth-section {
    flex-direction: row-reverse;
}

html[lang="ar"] .language-dropdown {
    direction: ltr; /* Ponecháme LTR pre jazykové menu */
}

html[lang="ar"] .language-options {
    left: auto;
    right: 0;
}

/* Formuláre pre RTL */
html[lang="ar"] .form-control,
html[lang="ar"] input[type="text"],
html[lang="ar"] input[type="email"],
html[lang="ar"] input[type="password"] {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .home-search-wrapper {
    flex-direction: row-reverse;
}

/* Tabuľky pre RTL */
html[lang="ar"] .stats-table {
    direction: rtl;
}

html[lang="ar"] .stats-table th,
html[lang="ar"] .stats-table td {
    text-align: right;
}

/* Karty a boxy pre RTL */
html[lang="ar"] .stats-card-header {
    flex-direction: row-reverse;
}

html[lang="ar"] .modal-header {
    direction: rtl;
}

html[lang="ar"] .modal-close {
    left: 20px;
    right: auto;
}

/* Ikony pre RTL */
html[lang="ar"] .fas,
html[lang="ar"] .far {
    margin-left: 8px;
    margin-right: 0;
}

/* 3. ÚPRAVY PRE DROPDOWN MENU */



/* VLAJKY PRE NOVÉ JAZYKY - POUŽITIE PNG SÚBOROV */
.flag-icon.flag-zh {
    background-image: url('/static/images/flags/cn.png');
    width: 24px;
    height: 16px;
    background-size: cover;
    background-position: center;
    display: inline-block;
}

.flag-icon.flag-ja {
    background-image: url('/static/images/flags/jp.png');
    width: 24px;
    height: 16px;
    background-size: cover;
    background-position: center;
    display: inline-block;
}

.flag-icon.flag-ar {
    background-image: url('/static/images/flags/sa.png');
    width: 24px;
    height: 16px;
    background-size: cover;
    background-position: center;
    display: inline-block;
}


/* 4. RESPONSIVE ÚPRAVY */

@media (max-width: 768px) {
    /* RTL úpravy pre mobil */
    html[lang="ar"] .home-header-content,
    html[lang="ar"] .home-auth-section {
        flex-direction: column;
    }
    
    /* Menšie písmo pre ázijské jazyky na mobile */
    html[lang="ja"] body,
    html[lang="zh"] body {
        font-size: 14px;
    }
}

/* 5. ŠPECIÁLNE ÚPRAVY PRE WORDMARKET KOMPONENTY */

/* WM index pre ázijské jazyky */
html[lang="ja"] .wm-index,
html[lang="zh"] .wm-index {
    font-family: monospace, sans-serif;
}

/* Ceny pre RTL */
html[lang="ar"] .price-highlight {
    direction: ltr;
    display: inline-block;
}

/* Search input pre RTL */
html[lang="ar"] .search-visual-text {
    right: 0;
    left: auto;
    text-align: right;
}

html[lang="ar"] .wm-index-suffix {
    right: auto;
    left: 15px;
}