/* ============================================
   INTERNATIONALIZATION STYLES
   ============================================ */

/* Language Selector Button */
.language-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 15px;
}

.language-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.language-btn i {
    font-size: 1rem;
    color: var(--primary-color);
}

.current-lang {
    font-weight: 600;
    color: var(--text-primary);
}

/* Language Modal */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.language-modal.active {
    opacity: 1;
    visibility: visible;
}

.language-modal-content {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.language-modal.active .language-modal-content {
    transform: scale(1) translateY(0);
}

.language-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.language-modal-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.language-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.language-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.language-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    overflow-y: auto;
    max-height: 60vh;
    padding-right: 0.5rem;
}

.language-option {
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    font-weight: 500;
}

.language-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 142, 35, 0.15);
}

.language-option.active {
    border-color: var(--primary-color);
    background: rgba(107, 142, 35, 0.1);
}

.language-option span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .language-btn {
    margin-right: 0;
    margin-left: 15px;
}

body.rtl .language-modal-header {
    flex-direction: row-reverse;
}

body.rtl .language-option {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-width: 400px;
        max-height: 85vh;
    }
    
    .language-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .language-options {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.6rem;
        max-height: 55vh;
    }
    
    .language-option {
        padding: 0.8rem 1rem;
    }
    
    .language-option span {
        font-size: 0.9rem;
    }
    
    .language-btn {
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .language-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        margin-right: 8px;
    }
    
    body.rtl .language-btn {
        margin-right: 0;
        margin-left: 8px;
    }
    
    .language-modal-content {
        padding: 1rem;
        max-width: 300px;
    }
    
    .language-modal-header {
        margin-bottom: 1.5rem;
    }
    
    .language-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .language-option {
        padding: 1rem;
    }
    
    .navbar-nav {
        gap: 0.2rem;
    }
}

/* Dark Mode Adjustments */
body.dark-mode .language-btn {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

body.dark-mode .language-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

body.dark-mode .language-modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

body.dark-mode .language-option {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

body.dark-mode .language-option:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* Animation for language switching */
.language-transition {
    transition: all 0.3s ease;
}

/* Loading state for translations */
.translating {
    opacity: 0.7;
    pointer-events: none;
}

.translating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

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