/* =====================================================
   MuğlaDayız - Otomatik Dil Çeviri Sistemi
   Mevcut siteye hiç dokunmadan çalışır
   ===================================================== */

/* ---- DİL SEÇİCİ BUTON (SABİT - SAĞ ALT) ---- */
#mugla-lang-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Poppins', -apple-system, sans-serif;
}

#mugla-lang-toggle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #0c6e3d, #10a85c);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(12, 110, 61, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

#mugla-lang-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(12, 110, 61, 0.5);
}

#mugla-lang-toggle .current-flag {
    font-size: 26px;
    line-height: 1;
}

/* ---- DROPDOWN PANEL ---- */
#mugla-lang-dropdown {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 280px;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

#mugla-lang-dropdown.open {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ---- BAŞLIK ---- */
.lang-dropdown-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lang-dropdown-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-detected {
    font-size: 0.7rem;
    color: #999;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ---- ARAMA ---- */
.lang-search {
    padding: 10px 14px;
}

.lang-search input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.lang-search input:focus {
    border-color: #0c6e3d;
}

/* ---- DİL LİSTESİ ---- */
.lang-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 8px 8px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.lang-list::-webkit-scrollbar { width: 4px; }
.lang-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: inherit;
}

.lang-item:hover {
    background: #f0fdf4;
}

.lang-item.active {
    background: linear-gradient(135deg, #0c6e3d, #10a85c);
    color: #fff;
    font-weight: 600;
}

.lang-item-flag {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.lang-item-name {
    flex: 1;
    font-weight: 500;
}

.lang-item-check {
    font-size: 14px;
    font-weight: bold;
}

/* ---- YÜKLEME GÖSTERGESİ ---- */
#mugla-translate-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 999999;
    pointer-events: none;
}

#mugla-translate-loading .bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0c6e3d, #10a85c, #ffd700);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

#mugla-translate-loading.active .bar {
    animation: loadingBar 2s ease-in-out;
}

@keyframes loadingBar {
    0%   { width: 0; }
    30%  { width: 60%; }
    60%  { width: 80%; }
    100% { width: 100%; }
}

/* ---- BİLDİRİM ---- */
#mugla-lang-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90vw;
    border-left: 4px solid #0c6e3d;
}

#mugla-lang-notification.show {
    top: 20px;
}

#mugla-lang-notification .notif-icon {
    font-size: 28px;
}

#mugla-lang-notification .notif-text {
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
}

#mugla-lang-notification .notif-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

/* ---- MOBİL ---- */
@media (max-width: 768px) {
    #mugla-lang-widget {
        bottom: 12px;
        right: 12px;
    }
    #mugla-lang-toggle {
        width: 48px;
        height: 48px;
    }
    #mugla-lang-dropdown {
        width: 260px;
        right: 0;
    }
    #mugla-lang-notification {
        font-size: 0.8rem;
        padding: 10px 16px;
    }
}