/* translation-container.css - Main translation interface styles */

.translation-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

.language-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.language-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.language-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.language-select {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
}

.voice-controls {
    display: flex;
    gap: 10px;
}

.btn-voice {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #667eea;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-voice:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

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

.btn-voice.recording {
    background: #ff4757;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.text-area {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.text-area:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.text-area::placeholder {
    color: #999;
}

.text-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.translation-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

#detected-language {
    color: #667eea;
    font-weight: 500;
}

/* Translation Arrow */
.translation-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
}

.btn-swap {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-swap:hover {
    background: white;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .language-section {
        border: 2px solid #000;
    }
}

/* Responsive design for translation container */
@media (max-width: 768px) {
    .translation-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .translation-arrow {
        margin-top: 0;
        order: 2;
    }
    
    .target-section {
        order: 3;
    }
    
    .btn-swap {
        transform: rotate(90deg);
    }
    
    .btn-swap:hover {
        transform: rotate(270deg) scale(1.1);
    }
}

@media (max-width: 480px) {
    .language-section {
        padding: 15px;
    }
    
    .text-area {
        min-height: 150px;
        font-size: 14px;
    }
    
    .language-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .voice-controls {
        justify-content: center;
    }
}