/* Language Selector Styles */
.language-selector {
    display: flex;
    align-items: center;
    margin-left: 20px;
    position: relative;
}

.language-selector::after {
    content: attr(data-current-lang);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.language-label {
    margin-right: 8px;
    font-size: 14px;
    color: #fff;
}

#language-select {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

#language-select:hover, #language-select:focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive styles for language selector */
@media screen and (max-width: 768px) {
    .language-selector {
        margin: 10px auto;
    }
    
    .language-selector-item {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }
}

/* RTL language support */
html[lang="ar"] {
    direction: rtl;
}

/* Ensure emails are always displayed correctly in all languages */
.email-text {
    direction: ltr;
    unicode-bidi: embed;
    font-family: Arial, sans-serif;
}

/* Show translated elements with a subtle green border in debug mode */
.debug-i18n .i18n-translated {
    border: 1px solid rgba(0, 255, 0, 0.2);
    position: relative;
}

/* Show untranslated elements with a red dashed border in debug mode */
.debug-i18n .i18n-missing {
    border: 1px dashed rgba(255, 0, 0, 0.5);
    position: relative;
}

/* Add a subtle indicator to show which elements are translatable */
.debug-i18n [data-i18n]:hover::after {
    content: attr(data-i18n);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 1000;
    white-space: nowrap;
}

/* Special Bengali font class */
.lang-bn {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif !important;
}

/* Special Hindi font class */
.lang-hi {
    font-family: 'Noto Sans Devanagari', sans-serif !important;
}

/* Apply language-specific fonts when the lang attribute is set */
html[lang="bn"] body {
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif !important;
}

html[lang="hi"] body {
    font-family: 'Noto Sans Devanagari', sans-serif !important;
}