/* Genevion Multi-Language System Styles */

.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    position: relative;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-current {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    outline: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.language-current:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-current:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.language-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.language-option {
    padding: 10px 12px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

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

.language-option.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

/* Flag Icons */
.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.flag-icon-tr {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjAwIj4KICA8cmVjdCB3aWR0aD0iOTAwIiBoZWlnaHQ9IjYwMCIgZmlsbD0iI0UzMEExNCIvPgogIDxjaXJjbGUgY3g9IjI4NSIgY3k9IjMwMCIgcj0iMTIwIiBmaWxsPSJ3aGl0ZSIvPgogIDxjaXJjbGUgY3g9IjMxNSIgY3k9IjMwMCIgcj0iMTAwIiBmaWxsPSIjRTMwQTE0Ii8+CiAgPHBvbHlnb24gcG9pbnRzPSI0MjAsMjMwIDQ0MCwyNzAgNDgwLDI3MCA0NTAsMzAwIDQ2MCwzNDAgNDIwLDMxMCAzODAsMzQwIDM5MCwzMDAgMzYwLDI3MCA0MDAsMjcwIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4=');
}

.flag-icon-gb {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MCA0MCI+CiAgPGNsaXBQYXRoIGlkPSJ0Ij4KICAgIDxwYXRoIGQ9Im0zMCwyMGgzMHYyMHpWMjBoMzB6bTAsNDB2LTIwaDMwem0wLDB2LTIwaDMwIi8+CiAgPC9jbGlwUGF0aD4KICA8cGF0aCBkPSJtMCwwdjQwaDYwVjB6IiBmaWxsPSIjMDEyMTY5Ii8+CiAgPHBhdGggZD0ibTAsMGw2MCw0MG0wLTQwbC02MCw0MCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjYiLz4KICA8cGF0aCBkPSJtMCwwbDYwLDQwbTAtNDBsLTYwLDQwIiBjbGlwLXBhdGg9InVybCgjdCkiIHN0cm9rZT0iI0MxMTMzNiIgc3Ryb2tlLXdpZHRoPSI0Ii8+CiAgPHBhdGggZD0ibTMwLDB2NDAnMDAtMzBoNjAiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxMCIvPgogIDxwYXRoIGQ9Im0zMCwwdjQwbTAtNDBoNjAiIHN0cm9rZT0iI0MxMTMzNiIgc3Ryb2tlLXdpZHRoPSI2Ii8+Cjwvc3ZnPg==');
}

.lang-text {
    font-weight: 500;
    flex: 1;
}

.language-current .fas {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-dropdown.open .language-current .fas {
    transform: rotate(180deg);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .language-select {
        min-width: 100px;
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Dark header için */
.header.dark .language-select {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
    color: #333;
}

.header.dark .language-select:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Panel için özel stil */
.admin-panel .language-switcher {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1000;
}

.admin-panel .language-select {
    background: var(--primary-color, #2c3e50);
    border-color: var(--secondary-color, #34495e);
    font-size: 13px;
    min-width: 110px;
}

.admin-panel .language-select:hover {
    background: var(--secondary-color, #34495e);
}

/* Loading animation */
.language-switcher.loading {
    opacity: 0.6;
    pointer-events: none;
}

.language-switcher.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Smooth transition for content changes */
[data-i18n], [data-i18n-html] {
    transition: opacity 0.2s ease;
}

.i18n-changing [data-i18n], 
.i18n-changing [data-i18n-html] {
    opacity: 0.7;
}

/* Flag icons */
.language-select option::before {
    margin-right: 8px;
}