/* Language Switcher Styles */
.language-switcher {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
}

/* RTL positioning */
body.rtl-mode .language-switcher,
[dir="rtl"] .language-switcher {
    right: auto;
    left: 30px;
}

.language-switcher-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.language-switcher-btn:hover {
    background-color: #2a2a2a;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.language-switcher-btn svg {
    width: 24px;
    height: 24px;
}

.language-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

body.rtl-mode .language-dropdown,
[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-list {
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

.language-list li {
    margin: 0;
}

.language-option {
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    display: block;
}

body.rtl-mode .language-option,
[dir="rtl"] .language-option {
    text-align: right;
}

.language-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-option.active {
    background-color: rgba(74, 144, 226, 0.3);
    color: #4a90e2;
    font-weight: 600;
}

.language-option.active::before {
    content: "✓ ";
    margin-right: 8px;
}

body.rtl-mode .language-option.active::before,
[dir="rtl"] .language-option.active::before {
    margin-right: 0;
    margin-left: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .language-switcher {
        bottom: 60px;
        right: 20px;
    }
    
    body.rtl-mode .language-switcher,
    [dir="rtl"] .language-switcher {
        right: auto;
        left: 20px;
    }
    
    .language-switcher-btn {
        width: 45px;
        height: 45px;
    }
    
    .language-dropdown {
        bottom: 55px;
    }
}

/* RTL Language Support */
body.rtl-mode body,
[dir="rtl"] body {
    text-align: right;
}

body.rtl-mode .ui.menu,
[dir="rtl"] .ui.menu {
    direction: rtl;
}

body.rtl-mode .ui.container,
[dir="rtl"] .ui.container {
    direction: rtl;
}

/* Ensure form inputs align properly in RTL */
body.rtl-mode input,
body.rtl-mode select,
body.rtl-mode textarea,
[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
    text-align: right;
}

body.rtl-mode .ui.form .field > label,
[dir="rtl"] .ui.form .field > label {
    text-align: right;
}
