/* yangoo WordPress Plugin Frontend Styles */

.yangoo-translator-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.yangoo-translator-widget h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.translator-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.translator-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.translator-controls button {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.translator-controls button:hover {
    background: #5a6fd8;
}

.translator-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#yangoo-text-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

#yangoo-text-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#yangoo-widget-result {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

#yangoo-widget-result h4 {
    margin-top: 0;
    color: #495057;
    font-size: 16px;
}

.translation-text {
    background: white;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
    min-height: 80px;
    line-height: 1.6;
    word-wrap: break-word;
}

.yangoo-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: yangoo-spin 1s linear infinite;
    margin-left: 10px;
}

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

.yangoo-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.yangoo-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .translator-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .translator-controls select,
    .translator-controls button {
        width: 100%;
        margin: 5px 0;
    }
    
    .yangoo-translator-widget {
        padding: 15px;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .yangoo-translator-widget h3 {
        font-size: 18px;
    }
    
    #yangoo-text-input {
        padding: 10px;
    }
    
    .translator-controls select,
    .translator-controls button {
        padding: 12px;
        font-size: 16px;
    }
}