/**
 * Auto Direction CSS
 * Styles for automatic text direction based on content language
 */

/* Base RTL direction for Persian interface */
body {
    direction: rtl;
    text-align: right;
}

/* Auto-direction classes */
.auto-dir-rtl {
    direction: rtl;
    text-align: right;
}

.auto-dir-ltr {
    direction: ltr;
    text-align: left;
}

/* Input and textarea elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea {
    /* Will be set dynamically by JavaScript */
    unicode-bidi: plaintext; /* Allow natural text direction */
}

/* Chat messages - auto direction */
.chat-message,
.message-content,
.message-text {
    /* Will be set dynamically by JavaScript */
}

/* User info boxes */
.user-info,
.user-name,
.user-email,
.user-role {
    /* Will be set dynamically by JavaScript */
}

/* Password boxes */
.password-input,
.password-field {
    /* Will be set dynamically by JavaScript */
}

/* Form labels and inputs */
.form-label,
.form-input,
.form-textarea {
    /* Will be set dynamically by JavaScript */
}

/* Menu items */
.nav-item,
.menu-item,
.sidebar-nav a {
    /* Will be set dynamically by JavaScript */
}

/* Cards and boxes */
.card,
.box,
.panel {
    /* Will be set dynamically by JavaScript */
}

/* Dark mode support */
[data-theme="dark"] .auto-dir-rtl,
[data-theme="dark"] .auto-dir-ltr {
    /* Inherit direction settings */
}

/* Mixed content - English in Persian context */
.mixed-content {
    /* Handle mixed content specially */
}

/* English text in RTL context */
.english-text {
    direction: ltr;
    text-align: left;
    display: inline-block;
}

/* Persian text in LTR context */
.persian-text {
    direction: rtl;
    text-align: right;
    display: inline-block;
}

/* Code blocks and technical content - always LTR */
code,
pre,
.technical-content,
.api-endpoint,
.url {
    direction: ltr;
    text-align: left;
}

/* Numbers - can be in either direction */
.number,
.count,
.stat-number {
    direction: ltr;
    text-align: left;
    display: inline-block;
}

