/**
 * Language Switcher Styles
 * 
 * @package Developer_Hosting
 */

/* ===================================
   Language Switcher - Dropdown Style
   =================================== */

.language-switcher {
    position: relative;
    font-family: 'Inter', sans-serif;
}

.language-switcher-dropdown {
    display: inline-block;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-current:hover {
    border-color: #ff7a00;
}

.language-current .flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

.language-current .dropdown-arrow {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.3s ease;
}

.language-switcher-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 8px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.language-dropdown li {
    margin: 0;
}

.language-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.language-dropdown a:hover {
    background: rgba(255, 122, 0, 0.1);
    color: #ff7a00;
}

.language-dropdown .flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

/* ===================================
   Language Switcher - Inline Style
   =================================== */

.language-switcher-inline .language-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-switcher-inline .language-list li {
    margin: 0;
}

.language-switcher-inline .language-list a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.language-switcher-inline .language-list a:hover,
.language-switcher-inline .language-list a.active {
    background: linear-gradient(135deg, rgba(255, 122, 0, 0.1) 0%, rgba(255, 149, 0, 0.05) 100%);
    color: #ff7a00;
}

.language-switcher-inline .flag-icon {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
}

/* ===================================
   Language Switcher - Flags Only
   =================================== */

.language-switcher-flags .language-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-switcher-flags .language-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.language-switcher-flags .language-list a:hover,
.language-switcher-flags .language-list a.active {
    opacity: 1;
    background: rgba(255, 122, 0, 0.1);
}

.language-switcher-flags .flag-icon {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Language Switcher Widget
   =================================== */

.language-switcher-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.language-switcher-widget .language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.3s ease;
}

.language-switcher-widget .language-option:hover {
    border-color: #ff7a00;
    color: #ff7a00;
}

.language-switcher-widget .language-option.active {
    background: linear-gradient(135deg, #ff7a00 0%, #ff9500 100%);
    border-color: transparent;
    color: #ffffff;
}

.language-switcher-widget .flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

/* ===================================
   Header Language Switcher
   =================================== */

.header-language-switcher {
    margin-left: 10px;
}

.header-language-switcher .language-current {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 8px 14px;
}

.header-language-switcher .language-current:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 122, 0, 0.5);
}

.header-language-switcher .dropdown-arrow {
    color: rgba(255, 255, 255, 0.6);
}

/* Header Right Actions Language Switcher */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right-actions .language-switcher-dropdown .language-current {
    padding: 8px 12px;
    background: #f8fafc;
    border-color: #e2e8f0;
    border-radius: 8px;
}

.header-right-actions .language-switcher-dropdown .language-current:hover {
    border-color: #ff7a00;
}

.header-right-actions .language-dropdown {
    right: 0;
    left: auto;
    min-width: 150px;
}

.header-right-actions .flag-icon {
    width: 22px;
    height: 16px;
    border-radius: 3px;
}

/* ===================================
   Footer Language Switcher
   =================================== */

.footer-language-switcher .language-list {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-language-switcher .language-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-language-switcher .language-list a:hover,
.footer-language-switcher .language-list a.active {
    color: #ff7a00;
}

.footer-language-switcher .flag-icon {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    opacity: 0.8;
}

/* ===================================
   RTL Support
   =================================== */

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

.rtl-language .language-current {
    flex-direction: row-reverse;
}

.rtl-language .language-dropdown a,
.rtl-language .language-switcher-inline .language-list a {
    flex-direction: row-reverse;
}

/* ===================================
   Dark Mode
   =================================== */

.dark-mode .language-current {
    background: #1e293b;
    border-color: #334155;
    color: #ffffff;
}

.dark-mode .language-dropdown {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .language-dropdown a {
    color: #e2e8f0;
}

.dark-mode .language-dropdown a:hover {
    background: rgba(255, 122, 0, 0.2);
    color: #ff7a00;
}

.dark-mode .language-switcher-widget .language-option {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

/* ===================================
   Mobile Responsive
   =================================== */

@media (max-width: 768px) {
    .language-switcher-dropdown .language-dropdown {
        position: fixed;
        left: 20px !important;
        right: 20px !important;
        bottom: 20px;
        top: auto;
        transform: translateY(100%);
        border-radius: 16px;
    }
    
    .language-switcher-dropdown.open .language-dropdown {
        transform: translateY(0);
    }
    
    .language-dropdown a {
        padding: 14px 18px;
    }
    
    .language-switcher-inline .language-list {
        flex-wrap: wrap;
    }
    
    .header-language-switcher {
        margin-left: 0;
        margin-top: 10px;
    }
}

