/* RTL overrides for Persian (fa) and Arabic (ar) */

/* Font family for Persian and Arabic */
[dir="rtl"] {
    font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
}

/* Hero section: reverse flex order so image appears on the left */
[dir="rtl"] .hero-content {
    flex-direction: row-reverse;
}

/* Ensure text alignment follows direction */
[dir="rtl"] .hero-description,
[dir="rtl"] .privacy-section p,
[dir="rtl"] .privacy-section li {
    text-align: start;
}

/* Data table text alignment */
[dir="rtl"] .data-table th,
[dir="rtl"] .data-table td {
    text-align: start;
}

@media (max-width: 768px) {
    [dir="rtl"] .hero-content {
        flex-direction: column;
    }
}

/* Beta form RTL adjustments */

/* Email and password fields should remain LTR for proper input */
[dir="rtl"] .form-input[type="email"],
[dir="rtl"] .form-input[type="password"] {
    direction: ltr;
    text-align: right;
}

/* Fix select dropdown height in RTL — use custom arrow to prevent browser size mismatch */
[dir="rtl"] .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    padding-left: 2rem;
}

/* Consent checkbox: natural RTL flow (checkbox on right, text on left) */
[dir="rtl"] .form-checkbox-label {
    flex-direction: row;
    text-align: right;
}

[dir="rtl"] .form-error {
    text-align: right;
}
