/* Language Selector Styles */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color, #333);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.lang-btn:hover {
    background: var(--primary-color, #007bff);
    color: white;
    border-color: var(--primary-color, #007bff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.lang-btn.active {
    background: var(--primary-color, #007bff);
    color: white;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

.lang-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
    pointer-events: none;
}

/* Flag Icons */
.flag-icon {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.flag-tr {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxOCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE4IiBoZWlnaHQ9IjEyIiBmaWxsPSIjRTMwQTEzIi8+CjxjaXJjbGUgY3g9IjcuNSIgY3k9IjYiIHI9IjIuNSIgZmlsbD0iI0UzMEExMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIwLjUiLz4KPHBhdGggZD0iTTkuNSA0TDEwLjUgNS41TDEyIDVMMTEgNi41TDEyIDhMMTAuNSA3TDkuNSA4TDEwIDYuNUw5LjUgNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=');
}

.flag-en {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxOCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE4IiBoZWlnaHQ9IjEyIiBmaWxsPSIjMDEyMTY5Ii8+CjxwYXRoIGQ9Ik0wIDBoMTh2MUgweiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTAgMmgxOHYxSDB6IiBmaWxsPSIjQ0UxMTI0Ii8+CjxwYXRoIGQ9Ik0wIDRoMTh2MUgweiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTAgNmgxOHYxSDB6IiBmaWxsPSIjQ0UxMTI0Ii8+CjxwYXRoIGQ9Ik0wIDhoMTh2MUgweiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTAgMTBoMTh2MUgweiIgZmlsbD0iI0NFMTEyNCIvPgo8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI2IiBmaWxsPSIjMDEyMTY5Ii8+Cjwvc3ZnPgo=');
}

.lang-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 8px;
        gap: 4px;
    }
    
    .lang-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .flag-icon {
        width: 16px;
        height: 10px;
    }
    
    .lang-text {
        display: none;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .lang-btn {
    color: var(--text-color-dark, #e0e0e0);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .lang-btn:hover {
    background: var(--primary-color-dark, #0056b3);
    border-color: var(--primary-color-dark, #0056b3);
}

[data-theme="dark"] .lang-btn.active {
    background: var(--primary-color-dark, #0056b3);
    border-color: var(--primary-color-dark, #0056b3);
}

/* Animation Effects */
.lang-btn {
    position: relative;
    overflow: hidden;
}

.lang-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.lang-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Tooltip Effect */
.lang-btn {
    position: relative;
}

.lang-btn::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.lang-btn:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Integration with Header */
.header-actions .language-selector {
    order: -1; /* Place before user icon */
}

/* Smooth Transitions */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    transition: color 0.3s ease, background-color 0.3s ease;
}

