/* Language switcher styles for StyleHub */

.language-switcher {
    position: relative;
    margin-left: 15px;
    z-index: 100;
}

.language-switcher-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.language-switcher-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.language-switcher-toggle i {
    margin-right: 5px;
    font-size: 16px;
}

.language-switcher-toggle .current-language {
    font-size: 14px;
    font-weight: 500;
}

.language-switcher-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.language-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: #f5f5f5;
}

.language-option.active {
    background-color: #f0f0f0;
    font-weight: 500;
}

.language-option .language-flag {
    width: 20px;
    height: 15px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-option .language-name {
    font-size: 14px;
}

/* RTL specific styles */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .language-switcher {
    margin-left: 0;
    margin-right: 15px;
}

body.rtl .language-switcher-toggle i {
    margin-right: 0;
    margin-left: 5px;
}

body.rtl .language-switcher-dropdown {
    right: auto;
    left: 0;
}

body.rtl .language-option .language-flag {
    margin-right: 0;
    margin-left: 10px;
}

body.rtl .header-tools {
    flex-direction: row-reverse;
}

body.rtl .search-container button {
    right: auto;
    left: 0;
}

body.rtl .search-container input {
    padding-right: 15px;
    padding-left: 40px;
}

body.rtl .user-tools {
    flex-direction: row-reverse;
}

body.rtl .tool-icon .tool-label {
    margin-left: 0;
    margin-right: 5px;
}

body.rtl .account-dropdown,
body.rtl .cart-dropdown {
    right: auto;
    left: 0;
}

body.rtl .nav-links {
    flex-direction: row-reverse;
}

body.rtl .submenu {
    left: auto;
    right: 0;
}

body.rtl .filter-options {
    flex-direction: row-reverse;
}

body.rtl .product-info {
    text-align: right;
}

body.rtl .product-actions {
    flex-direction: row-reverse;
}

body.rtl .footer-content {
    flex-direction: row-reverse;
}

/* Mobile responsive RTL adjustments */
@media (max-width: 768px) {
    body.rtl .menu-icon {
        margin-right: 0;
        margin-left: 15px;
    }
    
    body.rtl .nav-links {
        right: auto;
        left: -100%;
        transform: translateX(-100%);
    }
    
    body.rtl .nav-active .nav-links {
        right: auto;
        left: 0;
        transform: translateX(0);
    }
    
    body.rtl .submenu {
        left: auto;
        right: 0;
    }
}

/* Language switcher mobile styles */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }
    
    .language-switcher-toggle {
        padding: 5px;
    }
    
    .language-switcher-toggle .current-language {
        display: none;
    }
    
    body.rtl .language-switcher {
        margin-right: 10px;
        margin-left: 0;
    }
}
