/* C:\xampp\htdocs\frontend\language-preference.css */
/* TAM KAPSAMLI, HATASIZ CSS - 2024 */

/* ============================================ */
/* 1. DESKTOP BADGE STİLLERİ */
/* ============================================ */

.language-preference-badge.desktop {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

.language-preference-badge.desktop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.language-preference-badge.desktop:active {
    transform: translateY(0);
}

.badge-main {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.badge-text {
    white-space: nowrap;
    font-weight: 500;
}

.badge-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.badge-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 10px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    animation: badgeDropdownFade 0.2s ease;
}

@keyframes badgeDropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    font-size: 14px;
}

.languages-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.language-item.desktop-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.language-item.desktop-item:hover {
    background: #f5f7fa;
}

.language-item.desktop-item.active {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
}

.language-item.desktop-item:active {
    transform: scale(0.98);
}

.add-language-btn {
    width: 100%;
    padding: 14px 20px;
    background: #f8f9fa;
    border: none;
    border-top: 1px solid #eee;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
    font-size: 14px;
    pointer-events: auto;
}

.add-language-btn:hover {
    background: #e9ecef;
}

.add-language-btn:active {
    background: #dee2e6;
}

.no-languages {
    padding: 25px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ============================================ */
/* 2. MOBİL BADGE STİLLERİ */
/* ============================================ */

.mobile-language-badge {
    background: white;
    padding: 15px;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
}

.mobile-badge-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.mobile-badge-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    user-select: none;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-badge-content:active {
    background: #e9ecef;
    transform: scale(0.98);
}

.mobile-badge-text {
    font-weight: 500;
    color: #333;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    pointer-events: none;
}

.mobile-badge-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.mobile-add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.mobile-add-btn:active {
    transform: scale(0.95);
}

.mobile-badge-dropdown {
    margin-top: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    display: none;
    width: 100%;
    animation: mobileDropdownFade 0.2s ease;
}

@keyframes mobileDropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-dropdown-header {
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    font-size: 15px;
}

.mobile-languages-list {
    max-height: 300px;
    overflow-y: auto;
}

.language-item.mobile-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    transition: all 0.2s ease;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.language-item.mobile-item:active {
    background: #e9ecef;
    transform: scale(0.98);
}

.language-item.mobile-item.active {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
}

.mobile-no-languages {
    padding: 30px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ============================================ */
/* 3. DİL TERCIH FORMU */
/* ============================================ */

.language-preference-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: formOverlayFade 0.3s ease;
}

@keyframes formOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.language-preference-form {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: formSlideUp 0.3s ease;
}

@keyframes formSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.form-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    transition: color 0.3s;
}

.form-close-btn:hover {
    color: #333;
}

.form-content {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: border 0.3s;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

.form-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.form-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.form-btn.secondary {
    background: #f5f5f5;
    color: #333;
}

.form-btn.secondary:hover {
    background: #e9ecef;
}

.form-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.form-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.form-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================ */
/* 4. TOAST MESAJLARI */
/* ============================================ */

.language-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    animation: languageToastFade 3s ease;
}

@keyframes languageToastFade {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.language-toast-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.language-toast-error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.language-toast-info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

/* ============================================ */
/* 5. RESPONSIVE DÜZENLEMELER */
/* ============================================ */

@media (max-width: 768px) {
    .language-preference-badge.desktop {
        display: none;
    }
}

@media (max-width: 768px) {
    .language-preference-form {
        width: 95%;
        margin: 10px;
    }
    
    .form-content {
        padding: 20px;
    }
    
    .form-footer {
        padding: 15px 20px;
    }
    
    .mobile-badge-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mobile-add-btn {
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .mobile-badge-content {
        padding: 12px 15px;
    }
    
    .mobile-badge-text {
        font-size: 14px;
    }
    
    .language-item.mobile-item {
        padding: 12px 15px;
    }
    
    .form-header h3 {
        font-size: 16px;
    }
    
    .form-select {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .form-btn {
        padding: 12px;
        font-size: 15px;
    }
}
/* ============================================ */
/* MOBİL DİL BADGE - HAMBURGER MENÜ İÇİNDE */
/* ============================================ */

.mobile-language-badge-container {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: rgba(44, 85, 48, 0.03);
    width: 100%;
    box-sizing: border-box;
}

.mobile-badge-content-static {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #333;
}

.mobile-badge-content-static i {
    color: #2c5530;
    font-size: 1.1rem;
    width: 22px;
}

.mobile-badge-text {
    font-weight: 600;
    font-size: 14px;
    color: #2c5530;
    flex: 1;
}

/* Dark mode */
body.dark-mode .mobile-language-badge-container {
    background: rgba(143, 185, 150, 0.1);
    border-bottom-color: #333;
}

body.dark-mode .mobile-badge-content-static {
    background: #2a2a2a;
    color: #f0f0f0;
}

body.dark-mode .mobile-badge-content-static i {
    color: #8fb996;
}

body.dark-mode .mobile-badge-text {
    color: #8fb996;
}

/* ============================================ */
/* 6. SCROLLBAR STİLLERİ */
/* ============================================ */

.languages-list::-webkit-scrollbar,
.mobile-languages-list::-webkit-scrollbar {
    width: 6px;
}

.languages-list::-webkit-scrollbar-track,
.mobile-languages-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.languages-list::-webkit-scrollbar-thumb,
.mobile-languages-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.languages-list::-webkit-scrollbar-thumb:hover,
.mobile-languages-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}