/* Language Switcher Styles */
.language-switcher {
    display: inline-block;
}

.language-select {
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 120px;
}

.language-select:hover {
    border-color: #5e2ced;
    background-color: #f8f9fa;
}

.language-select:focus {
    border-color: #5e2ced;
    box-shadow: 0 0 0 0.2rem rgba(94, 44, 237, 0.25);
}

.language-select option {
    padding: 10px;
    font-size: 14px;
}

/* For Arabic RTL Support */
html[dir="rtl"] .language-select {
    text-align: right;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .navbar-nav {
/*    flex-direction: row-reverse;*/
}

html[dir="rtl"] .others-option .option-item {
    margin-left: 0;
    margin-right: 15px;
}

html[dir="rtl"] .others-option .option-item:first-child {
    margin-right: 0;
}

html[dir="rtl"] .footer-links-list {
    text-align: right;
}

html[dir="rtl"] .single-footer-widget {
    text-align: right;
}

html[dir="rtl"] .ps-5 {
    padding-left: 0 !important;
    padding-right: 3rem !important;
}

/* RTL Typography fixes */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] p {
    text-align: right;
}

html[dir="rtl"] ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

/* RTL Flexbox fixes */
html[dir="rtl"] .d-flex:not(.others-option) {
    /* flex-direction: row-reverse; */
}

html[dir="rtl"] .justify-content-between {
    flex-direction: row;
}

html[dir="rtl"] .align-items-center {
    flex-direction: row;
}

/* Preserve flex direction for navigation items */
.others-option.d-flex {
    flex-direction: row;
}

html[dir="rtl"] .others-option.d-flex {
/*    flex-direction: row-reverse;*/
}

/* Dark mode support */
body.dark-theme .language-select {
    background-color: #1a1a2e;
    color: #fff;
    border-color: #2d2d44;
}

body.dark-theme .language-select:hover {
    border-color: #5e2ced;
    background-color: #16213e;
}

/* Responsive styles */
@media only screen and (max-width: 767px) {
    .language-select {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 100px;
    }
    
    /* Make language switcher visible on mobile */
    .others-option-for-responsive .language-switcher {
        display: block;
        width: 100%;
    }
    
    .others-option-for-responsive .language-select {
        width: 100%;
        min-width: auto;
    }
    
    /* Stack mobile menu items vertically for better UX */
    .others-option-for-responsive .others-option {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .others-option-for-responsive .option-item {
        margin: 10px 0;
        width: 100%;
    }
    
    .others-option-for-responsive .search-box {
        width: 100%;
    }
    
    .others-option-for-responsive .input-search {
        width: 100%;
    }
    
    .others-option-for-responsive .default-btn {
        width: 100%;
        text-align: center;
        display: block;
    }
    
    /* Prevent language switcher from affecting mean-menu */
    .mean-container .language-switcher {
        padding: 10px 15px;
        background-color: transparent;
    }
    
    .mean-container .language-select {
        width: 100%;
        background-color: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 5px;
    }
}

/* Tablet responsive */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    .language-select {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 100px;
    }
}

/* Add spacing between nav items */
.others-option .option-item {
    margin-left: 15px;
}

.others-option .option-item:first-child {
    margin-left: 0;
}

/* RTL Icon adjustments */
html[dir="rtl"] .flaticon-chevron:before {
    transform: scaleX(-1);
    display: inline-block;
}

html[dir="rtl"] .bx-chevron-right:before {
    content: "\ea64" !important; /* chevron-left */
}

html[dir="rtl"] .bx-chevron-left:before {
    content: "\ea61" !important; /* chevron-right */
}

/* RTL Form adjustments */
html[dir="rtl"] .form-control,
html[dir="rtl"] .input-search,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}

/* RTL Button adjustments */
html[dir="rtl"] .default-btn i {
    margin-left: 0;
    margin-right: 5px;
}

/* Smooth transition when switching languages */
* {
    transition: text-align 0.3s ease, direction 0.3s ease;
}

